From b44584bc7e36128fc740b8300e900f5e416bd8a1 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Sun, 4 Jan 2015 19:34:23 +0100 Subject: [PATCH] =?UTF-8?q?Tests=20angef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/plugindevelopment/TypeInsertTests/OL.jav | 16 ++++++++++++++++ .../plugindevelopment/TypeInsertTests/OL.java | 17 +++++++++++++++++ .../TypeInsertTests/OverloadingExample.jav | 13 +++++++++++++ .../TypeInsertTests/OverloadingExample.java | 16 ++++++++++++++++ .../TypeInsertTests/OverloadingRecursive.jav | 8 ++++++++ .../TypeInsertTests/OverloadingRecursive.java | 18 ++++++++++++++++++ .../WildcardTestForLambda2.jav | 5 +++++ .../WildcardTestForLambda2.java | 19 +++++++++++++++++++ 8 files changed, 112 insertions(+) create mode 100755 test/plugindevelopment/TypeInsertTests/OL.jav create mode 100644 test/plugindevelopment/TypeInsertTests/OL.java create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingExample.jav create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingExample.java create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingRecursive.jav create mode 100644 test/plugindevelopment/TypeInsertTests/OverloadingRecursive.java create mode 100644 test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.jav create mode 100644 test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.java diff --git a/test/plugindevelopment/TypeInsertTests/OL.jav b/test/plugindevelopment/TypeInsertTests/OL.jav new file mode 100755 index 000000000..66e95aeb3 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OL.jav @@ -0,0 +1,16 @@ +class OL { + + Integer m(Integer x) { return x + x; } + + Boolean m(Boolean x) {return x || x; } +} + +class Main { + + main(x) { + ol; + ol = new OL(); + return ol.m(x); + } + +} diff --git a/test/plugindevelopment/TypeInsertTests/OL.java b/test/plugindevelopment/TypeInsertTests/OL.java new file mode 100644 index 000000000..4e50e1741 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OL.java @@ -0,0 +1,17 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class OL { + private static final String TEST_FILE = "OL.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Integer main"); + mustContain.add("Boolean main"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingExample.jav b/test/plugindevelopment/TypeInsertTests/OverloadingExample.jav new file mode 100644 index 000000000..5ac198d8b --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingExample.jav @@ -0,0 +1,13 @@ +class Example { + test(){ + variable1; + variable2; + variable1 = this; + variable2 = variable1.intValue(); + return variable1.intValue(); + } + + int intValue(){ + return 1; + } +} diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingExample.java b/test/plugindevelopment/TypeInsertTests/OverloadingExample.java new file mode 100644 index 000000000..45088fd7e --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingExample.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class OverloadingExample { + private static final String TEST_FILE = "OverloadingExample.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + mustContain.add("Example variable"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingRecursive.jav b/test/plugindevelopment/TypeInsertTests/OverloadingRecursive.jav new file mode 100644 index 000000000..70829c746 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingRecursive.jav @@ -0,0 +1,8 @@ +class OverloadingRecursive{ + + + m (f) { + f.apply(f); + } +} + diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingRecursive.java b/test/plugindevelopment/TypeInsertTests/OverloadingRecursive.java new file mode 100644 index 000000000..6c394ab42 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/OverloadingRecursive.java @@ -0,0 +1,18 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class OverloadingRecursive { + + private static final String TEST_FILE = "OverloadingRecursive.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + + //mustContain.add("Fun0>> op"); + MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.jav b/test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.jav new file mode 100644 index 000000000..adae1646d --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.jav @@ -0,0 +1,5 @@ +class LambdaTest{ + +op = (f) -> f.apply(this); + +} \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.java b/test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.java new file mode 100644 index 000000000..c302fbdb1 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/WildcardTestForLambda2.java @@ -0,0 +1,19 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class WildcardTestForLambda2 { + + private static final String TEST_FILE = "WildcardTestForLambda2.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + + //mustContain.add("Fun0>> op"); + MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); + } + +}