From: Michal K. <mic...@gm...> - 2008-08-13 13:07:54
|
Hello, I'm trying to run my JUnit tests through JPF but I still cannot succeed. The test looks like this: import org.junit.Test; import static org.junit.Assert.*; public class Simple { public static void main(String[] args) { System.out.println("Hello"); assertEquals( 4, 4 ); } @Test public void add() { assertEquals( 4, 4 ); } } When I run it using: ./jpf +vm.classpath=/mypath/junit/junit-4.4.jar:/mypath/junit org.junit.runner.JUnitCore Simple the following error occurs: gov.nasa.jpf.jvm.NoUncaughtExceptionsProperty java.lang.reflect.InvocationTargetException: in java.lang.Class.getAnnotations : java.lang.NullPointerException at java.lang.Class.getAnnotations(Native Method) at org.junit.internal.runners.JUnit4ClassRunner.classAnnotations(JUnit4ClassRunner.java:64) at org.junit.internal.runners.JUnit4ClassRunner.getDescription(JUnit4ClassRunner.java:56) at org.junit.internal.runners.CompositeRunner.getDescription(CompositeRunner.java:40) at org.junit.runner.JUnitCore.run(JUnitCore.java:129) at org.junit.runner.JUnitCore.run(JUnitCore.java:109) at org.junit.runner.JUnitCore.run(JUnitCore.java:100) at org.junit.runner.JUnitCore.runMain(JUnitCore.java:81) at org.junit.runner.JUnitCore.main(JUnitCore.java:44) When I run the test without JPF, it works fine. When I run JPF with 'Simple' program as an input, it also works fine. Is there some way how to run JPF on that test without explicitly writing the main method for each test class as you do in your JPF Test Tystem? Is this problem connected with some reflection limitations in JPF as can be found here: http://sourceforge.net/mailarchive/message.php?msg_id=e3a26fee0605222246x6f3f600as1f9d0484047fa3ce%40mail.google.com Thanks for answer. Michal Kebrt |