-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add tests for Kotlin inline value class #5145
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
base: main
Are you sure you want to change the base?
Add tests for Kotlin inline value class #5145
Conversation
|
Hi @marcphilipp 👋 Sorry for the delay — this is actually my first attempt at contributing to an open-source project like JUnit, As discussed in #5081, I’ve based this Draft PR on the There are still a few points I’d like to clarify, since I might have misunderstood parts of the earlier discussion:
I’m happy to adjust the scope based on your guidance. |
|
@marcphilipp 👋 |
marcphilipp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an entry to the 6.1.0-M2 release notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a good reason to keep this class now that we have the more specific test classes?
| * @see <a href="https://github.com/junit-team/junit-framework/issues/5081">Issue #5081</a> | ||
| */ | ||
| @Disabled("POC only supports kotlin.Result, not custom inline value classes") | ||
| class CustomInlineValueClassTest { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our convention is to suffix test classes with Tests because they contain tests rather than being a test themselves. Please rename the new test classes accordingly.
Resolves: #5081
Overview
This Draft PR is based on @marcphilipp’s proof-of-concept branch
marc/5081-kotlin-value-class-support,which introduces initial support for Kotlin inline value class parameter resolution.
Currently, the POC supports only
kotlin.Resultparameters in parameterized tests.This PR extends the existing test coverage to highlight the current behavior and limitations,
and prepares the ground for supporting arbitrary Kotlin
@JvmInlinevalue classes in future updates.Changes
org.junit.jupiter.api.kotlin:MultipleInlineValueClassTest: covers multiple inline and normal parameters in one test.CustomInlineValueClassTest: covers user-defined inline classes (UserId,Email).NullableInlineValueClassTest: covers nullable inline and Result parameters.CustomInlineValueClassTestwith@Disabled, since current POC supports onlykotlin.Result.I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@APIannotations