modified: ../../pom.xml
new file: Iteration.jav modified: Pair.jav modified: ../../src/main/java/de/dhbwstuttgart/core/JavaTXCompiler.java modified: ../../src/test/java/AllgemeinTest.java
This commit is contained in:
parent
dce3ed8051
commit
3c86eecf8b
2
pom.xml
2
pom.xml
@ -42,7 +42,7 @@ http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<dependency>
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>7.0</version>
|
||||
<version>9.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
36
resources/AllgemeinTest/Iteration.jav
Normal file
36
resources/AllgemeinTest/Iteration.jav
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
class Pair<T, U> {
|
||||
T x;
|
||||
U y;
|
||||
|
||||
public Pair() { }
|
||||
public Pair(T x, U y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public T fst () {
|
||||
return x;
|
||||
}
|
||||
|
||||
public U snd () {
|
||||
return y;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public class Iteration {
|
||||
m1(x, y) {
|
||||
var help;
|
||||
help = m2(x, y);
|
||||
var y2 = help.snd();
|
||||
return new Pair<>(y2,x);
|
||||
}
|
||||
|
||||
m2(x,y) {
|
||||
var help = m1(x, y);
|
||||
var x2 = help.fst();
|
||||
return new Pair<>(y, x2);
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ class Pair<U, T> {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
eq(a, b) {
|
||||
b = a;
|
||||
return a == b;
|
||||
|
@ -557,7 +557,7 @@ public class JavaTXCompiler {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) newClasses.add(clazz);
|
||||
if (!found) allClasses.add(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,8 @@ public class AllgemeinTest {
|
||||
//String className = "Pair";
|
||||
//String className = "UseWildcardPair";
|
||||
//String className = "Assign";
|
||||
String className = "StreamTest";
|
||||
//String className = "StreamTest";
|
||||
String className = "Iteration";
|
||||
//PL 2019-10-24: genutzt fuer unterschiedliche Tests
|
||||
path = System.getProperty("user.dir")+"/resources/AllgemeinTest/" + className + ".jav";
|
||||
//path = System.getProperty("user.dir")+"/src/test/resources/AllgemeinTest/Overloading_Generics.jav";
|
||||
|
Loading…
Reference in New Issue
Block a user