From 01fd396d29b34eba14ebfc2f95df5ba926f4f1c1 Mon Sep 17 00:00:00 2001 From: Fayez Abu Alia Date: Wed, 20 Dec 2017 15:04:03 +0100 Subject: [PATCH] Test generics --- test/bytecode/Gen.jav | 5 +++++ test/bytecode/Generics.jav | 15 +++++++++++++++ test/bytecode/JavaTXCompilerTest.java | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 test/bytecode/Gen.jav create mode 100644 test/bytecode/Generics.jav diff --git a/test/bytecode/Gen.jav b/test/bytecode/Gen.jav new file mode 100644 index 00000000..1f873919 --- /dev/null +++ b/test/bytecode/Gen.jav @@ -0,0 +1,5 @@ +public class Gen{ + Vector m(Vector v){ + return v; + } +} \ No newline at end of file diff --git a/test/bytecode/Generics.jav b/test/bytecode/Generics.jav new file mode 100644 index 00000000..2c7a67b6 --- /dev/null +++ b/test/bytecode/Generics.jav @@ -0,0 +1,15 @@ + +class Generics { + B mt1(B b){ + return mt1(b); + } +} + + +/* +Problem: +auto test = new List(); +auto test2 = new List(); +... //code, welcher möglicherweise test und test2 vertauscht +test.add("hallo"); +*/ \ No newline at end of file diff --git a/test/bytecode/JavaTXCompilerTest.java b/test/bytecode/JavaTXCompilerTest.java index 39413991..f43a0740 100644 --- a/test/bytecode/JavaTXCompilerTest.java +++ b/test/bytecode/JavaTXCompilerTest.java @@ -29,7 +29,7 @@ public class JavaTXCompilerTest { @Test public void test() throws IOException, java.lang.ClassNotFoundException { System.out.println(rootDirectory); - String fileName = "LamAssign"; + String fileName = "Generics"; filesToTest.add(new File(rootDirectory+fileName+".jav")); System.out.println(rootDirectory+fileName+".jav"); JavaTXCompiler compiler = new JavaTXCompiler(filesToTest);