source: java2python/geniuswebtranslator/target/surefire-reports/geniuswebtranslator.TranslatorTest.txt@ 595

Last change on this file since 595 was 595, checked in by wouter, 16 months ago

#197 working on translating @Test annotations.
added (expected-..) support.
Fixed poms that suddenly require https and /maven2

File size: 4.7 KB
Line 
1-------------------------------------------------------------------------------
2Test set: geniuswebtranslator.TranslatorTest
3-------------------------------------------------------------------------------
4Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.926 sec <<< FAILURE!
5translate(geniuswebtranslator.TranslatorTest) Time elapsed: 0.007 sec <<< ERROR!
6java.lang.IllegalArgumentException: Failed to translate geniusweb/issuevalue/BidTest.java
7 at tudelft.utilities.j2p.PyModule.fromJavaFile(PyModule.java:86)
8 at tudelft.utilities.j2p.PyProgram.fromDirectory(PyProgram.java:95)
9 at geniuswebtranslator.TranslatorTest.<init>(TranslatorTest.java:17)
10 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
11 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
12 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
13 at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
14 at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
15 at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
16 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
17 at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
18 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
19 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
20 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
21 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
22 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
23 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
24 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
25 at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
26 at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
27 at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
28 at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
29 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
30 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
31 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
32 at java.lang.reflect.Method.invoke(Method.java:498)
33 at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
34 at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
35 at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
36 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
37 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
38Caused by: tudelft.utilities.j2p.t.TranslationException: Node of type not (yet) handled: class com.github.javaparser.ast.body.InitializerDeclaration at static {
39 Map<String, Value> issuevalues = new HashMap<>();
40 issuevalues.put(ISSUE1, new DiscreteValue("b"));
41 issuevalues.put(ISSUE2, new NumberValue(BigDecimal.ONE));
42 issuevalues.put("issue3", new NumberValue(new BigDecimal("9012345678901234567.89")));
43 bid = new Bid(issuevalues);
44 // different order but that shouldn't matter
45 Map<String, Value> issuevalues1 = new HashMap<>();
46 issuevalues1.put("issue3", new NumberValue(new BigDecimal("9012345678901234567.89")));
47 issuevalues1.put(ISSUE2, new NumberValue(BigDecimal.ONE));
48 issuevalues1.put(ISSUE1, new DiscreteValue("b"));
49 bid1 = new Bid(issuevalues1);
50 Map<String, Value> issuevaluesb = new HashMap<>();
51 issuevaluesb.put(ISSUE1, new DiscreteValue("b"));
52 issuevaluesb.put(ISSUE2, new NumberValue(BigDecimal.ONE));
53 bidb = new Bid(issuevaluesb);
54 // bidc and bidd have values swapped, so different issuevalues.
55 Map<String, Value> issuevaluesc = new HashMap<>();
56 issuevaluesc.put(ISSUE1, VALUE1);
57 issuevaluesc.put(ISSUE2, VALUE2);
58 bidc = new Bid(issuevaluesc);
59 Map<String, Value> issuevaluesd = new HashMap<>();
60 issuevaluesd.put(ISSUE1, VALUE3);
61 bidd = new Bid(issuevaluesd);
62 issuevaluesd.put(ISSUE1, VALUE3b);
63 bidd2 = new Bid(issuevaluesd);
64} (line 31,col 2)-(line 64,col 2)
65 at tudelft.utilities.j2p.t.Translator.translateAll(Translator.java:193)
66 at tudelft.utilities.j2p.t.Translator.translate(Translator.java:618)
67 at tudelft.utilities.j2p.t.Translator.translateAll(Translator.java:151)
68 at tudelft.utilities.j2p.t.Translator.translate(Translator.java:282)
69 at tudelft.utilities.j2p.PyModule.fromJavaFile(PyModule.java:83)
70 ... 30 more
71
Note: See TracBrowser for help on using the repository browser.