Parameterized test not compiling
Jeanette Winzenburg
fastegal at swingempire.de
Tue Oct 15 11:37:06 UTC 2019
Zitat von Jeanette Winzenburg <fastegal at swingempire.de>:
okay, probably found the reason:
dependencies {
testCompile group: "junit", name: "junit", version: "4.8.2"
if (BUILD_CLOSED && DO_JCOV) {
testCompile name: "jcov"
}
}
the version is too old, name parameter was introduced in 4.11. Any
plans to update?
For now, I will comment the name (which makes failing tests quite
unreadable, but can't be helped, a test for a fixed bug will not fail :)
> compiles fine in Eclipse, throws when compiling in cygwin with
> gradle :controls:test
>
> The test class (excerpt):
>
> @RunWith(Parameterized.class)
> public abstract class DefaultCancelButtonTest<C extends Control> {
>
> private ButtonType buttonType;
> private boolean consume;
> private boolean registerAfterShowing;
>
> @Parameterized.Parameters(name= "{index}: Button {0}, consuming
> {1}, registerAfterShowing {2} " )
> public static Collection<Object[]> data() {
> Object[][] data = new Object[][] {
> // buttonType, consuming, registerAfterShowing
> {new ButtonType(ButtonState.DEFAULT), true, true},
> {new ButtonType(ButtonState.DEFAULT), true, false},
> {new ButtonType(ButtonState.DEFAULT), false, true},
> {new ButtonType(ButtonState.DEFAULT), false, false},
> {new ButtonType(ButtonState.CANCEL), true, true},
> {new ButtonType(ButtonState.CANCEL), true, false},
> {new ButtonType(ButtonState.CANCEL), false, true},
> {new ButtonType(ButtonState.CANCEL), false, false},
> };
> return Arrays.asList(data);
> }
>
> public DefaultCancelButtonTest(ButtonType buttonType, boolean consume,
> boolean registerAfterShowing) {
> this.buttonType = buttonType;
> this.consume = consume;
> this.registerAfterShowing = registerAfterShowing;
> }
>
> }
>
> the error:
>
> C:\Daten\data-for-work\eclipse\gitrep-openjdk\jfx-fork\modules\javafx.controls\src\test\java\test\javafx\scene\control\DefaultCancelButtonTest.java:172: error: cannot find
> symbol
> @Parameterized.Parameters(name= "{index}: Button {0}, consuming
> {1}, registerAfterShowing {2} " )
> ^
> symbol: method name()
> location: @interface Parameters
>
> Any idea what's wrong?
More information about the openjfx-dev
mailing list