The following tests, in compact source file formats, should be supported by jtreg.
Note that for this enhancement, the "java" launcher shoud NOT be run in source mode. The normal "javac" + "java" way like with any other "main" based test is to be taken.
/**
* @test
* @run main CompactTest
*/
public static void main(String... args) {
System.err.println("Hello!");
}
test result: Error. java.lang.IllegalAccessException: class com.sun.javatest.regtest.agent.MainWrapper$MainTask cannot access a member of class CompactTest with modifiers "public static transient"
/**
* @test
* @run main CompactTest
*/
void main() {
System.err.println("Hello!");
}
test result: Error. Can't find `main' method
Note that for this enhancement, the "java" launcher shoud NOT be run in source mode. The normal "javac" + "java" way like with any other "main" based test is to be taken.
/**
* @test
* @run main CompactTest
*/
public static void main(String... args) {
System.err.println("Hello!");
}
test result: Error. java.lang.IllegalAccessException: class com.sun.javatest.regtest.agent.MainWrapper$MainTask cannot access a member of class CompactTest with modifiers "public static transient"
/**
* @test
* @run main CompactTest
*/
void main() {
System.err.println("Hello!");
}
test result: Error. Can't find `main' method
- links to
-
Review(master)
openjdk/jtreg/313