-
Notifications
You must be signed in to change notification settings - Fork 288
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
Improve handling of JUnit support with regard to Kotlin #77
Comments
I am working on this |
Thanks 😃 Let me know if you need any further support!! |
I've noticed, that another problem is, that non-Java source files create wrong links, e.g.
or similar, which is obviously wrong. The info seems commonly recorded in Java/Kotlin class files, so I'll fix this on this issue as well. |
Also what is your status on this issue @maheshksd? Because this weekend I'll probably merge the JUnit 5 feature branch back into master, which will mean, that this issue needs to be tackled in two places. |
…ion(..) assumed that the file name will always be simpleName of enclosing class + ".java". ASM allows to read the source file name from Java bytecode, provided it was compiled into the class-file. This patch adds Optional<sourceFileName> to Source and a 2-step approach within formatLocation(..) that will first try to derive the location from the real source file name, and only if that is not present will use the old heuristic to determine the source file name. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
… as well, so tests can just be written naturally in Kotlin without any need for a companion object. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
… as well. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…on object anymore. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
… as well, so tests can just be written naturally in Kotlin without any need for a companion object. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
… as well. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…on object anymore. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…ion(..) assumed that the file name will always be simpleName of enclosing class + ".java". ASM allows to read the source file name from Java bytecode, provided it was compiled into the class-file. This patch adds Optional<sourceFileName> to Source and a 2-step approach within formatLocation(..) that will first try to derive the location from the real source file name, and only if that is not present will use the old heuristic to determine the source file name. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
… as well, so tests can just be written naturally in Kotlin without any need for a companion object. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
… as well. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
…on object anymore. Issue: #77 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
When Kotlin is used together with the JUnit support, writing rules becomes too bloated, since it's necessary to create a companion object due to the static requirements for fields.
I.e. at the moment ArchUnit JUnit tests in Kotlin have to be written like
This seems unnecessary bloated, what we would want, is
The text was updated successfully, but these errors were encountered: