You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CoffeeTest[jvm] > initializationError[jvm] FAILED
java.lang.IllegalArgumentException: Test class can only have one constructor
at org.junit.runners.model.TestClass.<init>(TestClass.java:48)
at org.junit.runners.JUnit4.<init>(JUnit4.java:23)
at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:10)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70)
As a side-effect of some value class implementation details, the compiler generates an extra constructor overload. Unfortunately that overload is generated after Burst does its edits.
The JUnit API expects a single public constructor.
I can’t think of an easy way to make this work.
The text was updated successfully, but these errors were encountered:
If any constructor parameter is a value class, we treat it as if there’s no default specialization. That’ll send us into a code path that marks the class as abstract and causes JUnit to ignore both constructors.
// There's no default specialization. Make the class abstract so JUnit skips it.
original.modality = Modality.ABSTRACT
Here’s a test class that accepts a value class as a parameter:
It fails like this:
As a side-effect of some value class implementation details, the compiler generates an extra constructor overload. Unfortunately that overload is generated after Burst does its edits.
The JUnit API expects a single public constructor.
I can’t think of an easy way to make this work.
The text was updated successfully, but these errors were encountered: