Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
1.6-beta-1
-
None
-
None
-
Ubuntu 7.10 Gutsy Gibbon ; Groovy Subversion r11252
Description
I have a class (Factorial_G) implementing some algorithms for factorial – boring but short
I have a class with some Test'N'Groove tests and a class with some JUnit tests. The behaviour in both cases is the same so this is not a unit test framework problem.
If I compile Factorial_G and then run the tests as groovy scripts, then things work fine:
|> ./Factorial_G_TestNGroove.groovy [Parser] Running: Single script suite (Factorial_G_TestNGroove.groovy) =============================================== Single script suite (Factorial_G_TestNGroove.groovy) Total tests run: 6, Failures: 0, Skips: 0 ===============================================
If however there is no precompilation before execution then the result is:
|> ./Factorial_G_TestNGroove.groovy java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:101) at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130) Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, /home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$8' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$21' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$31' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$9' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$11' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$13' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$30' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$27' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$19' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$28' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$33' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$6' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$15' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$25' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$26' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$34' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$24' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$22' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$32' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$20' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$18' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$16' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$17' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$14' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$23' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$12' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$10' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$4' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$7' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$5' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$3' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$29' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$2' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$1' is declared multiple times. @ line -1, column -1./home/users/russel/Progs/Applications/Factorial/Factorial_G_TestNGroove.groovy: -1: The field '$const$0' is declared multiple times. @ line -1, column -1. 35 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:924) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:447) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:277) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:248) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:188) at org.codehaus.groovy.testng.GroovyTestNG.loadTests(GroovyTestNG.java:140) at org.codehaus.groovy.testng.GroovyTestNG.run(GroovyTestNG.java:46) at org.codehaus.groovy.testng.GroovyTestNG.main(GroovyTestNG.java:198) ... 6 more