Skip to content

Update code samples on landing to kotlin.test (from JUnit) #4768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bartekpacia
Copy link
Member

@bartekpacia bartekpacia commented Mar 25, 2025

:)

I can run tests annotated with kotlin.test.Test on Kotlin/Native.

@nikpachoo
Copy link
Collaborator

Hi @bartekpacia,
Thanks for the contribution.
Agreed, we can drop the comment - but removing import org.junit.Test breaks the sample.

Screenshot 2025-03-26 at 17 40 28

Copy link
Collaborator

@nikpachoo nikpachoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, adjust the code as follows above.

@bartekpacia
Copy link
Member Author

Then I suspect something's wrong with dependencies (but not sure at all, I don't know this codebase).

Agreed, we can drop the comment - but removing import org.junit.Test breaks the sample.

This doesn't make sense – if we import org.junit, then the comment makes sense, because JUnit is a JVM-only dependency.

Here's my project where I use org.jetbrains.kotlin:kotlin-test:2.1.20 and the tests run fine on Kotlin/Native. This is a pure Kotlin Multiplatform project, no JVM-dependencies.

Screenshot 2025-03-26 at 23 06 12

@nikpachoo
Copy link
Collaborator

@dkrasnoff, could you please take a look? Is it as designed, or do we have an issue with the Compiler-Server?

@nikpachoo nikpachoo requested a review from dkrasnoff April 8, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants