From b468fdf8776e52e01f67abfb3d68ae64f5c49066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Tue, 2 Sep 2014 09:43:36 +0200 Subject: [PATCH] Test files angefuegt --- .../plugindevelopment/TypeInsertTests/Add.jav | 8 +++++ .../TypeInsertTests/Add.java | 16 +++++++++ .../TypeInsertTests/Matrix.jav | 35 +++++++++++++++++++ .../TypeInsertTests/Matrix.java | 16 +++++++++ .../TypeInsertTests/Matrix_simple.jav | 14 ++++++++ .../TypeInsertTests/Matrix_simple.java | 16 +++++++++ 6 files changed, 105 insertions(+) create mode 100644 test/plugindevelopment/TypeInsertTests/Add.jav create mode 100644 test/plugindevelopment/TypeInsertTests/Add.java create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix.jav create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix.java create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix_simple.jav create mode 100644 test/plugindevelopment/TypeInsertTests/Matrix_simple.java diff --git a/test/plugindevelopment/TypeInsertTests/Add.jav b/test/plugindevelopment/TypeInsertTests/Add.jav new file mode 100644 index 00000000..4e7599b3 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Add.jav @@ -0,0 +1,8 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + mvmul(Vector v) { + return v.size() + 5; + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Add.java b/test/plugindevelopment/TypeInsertTests/Add.java new file mode 100644 index 00000000..6a00e7b0 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Add.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class Add { + private static final String TEST_FILE = "Add.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.jav b/test/plugindevelopment/TypeInsertTests/Matrix.jav new file mode 100644 index 00000000..33277653 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix.jav @@ -0,0 +1,35 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + mul(m){ + ret; + ret = new Matrix(); + i; + i = 0; + while(true) { + v1; + v2; + v1 = this.elementAt(i); + v2 = new Vector(); + j; + j = 0; + while(true) { + erg; + erg = 0; + k; + k = 0; + while(true) { + erg = erg + v1.elementAt(k).intValue() * m.elementAt(k).elementAt(j).intValue(); + k++; + } + v2.addElement(new Integer(erg)); + j++; + } + ret.addElement(v2); + i++; + } + return ret; + } + +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix.java b/test/plugindevelopment/TypeInsertTests/Matrix.java new file mode 100644 index 00000000..500f58d3 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class Matrix { + private static final String TEST_FILE = "Matrix.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix_simple.jav b/test/plugindevelopment/TypeInsertTests/Matrix_simple.jav new file mode 100644 index 00000000..5aa6ee45 --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix_simple.jav @@ -0,0 +1,14 @@ +import java.util.Vector; + +class Matrix extends Vector> { + + mvmul(Vector v) { + i; + ele; + v.add(1); + while (i < v.size()) { + + ele = 5 + v.elementAt(i); + } + } +} diff --git a/test/plugindevelopment/TypeInsertTests/Matrix_simple.java b/test/plugindevelopment/TypeInsertTests/Matrix_simple.java new file mode 100644 index 00000000..e9c16aaa --- /dev/null +++ b/test/plugindevelopment/TypeInsertTests/Matrix_simple.java @@ -0,0 +1,16 @@ +package plugindevelopment.TypeInsertTests; + +import java.util.Vector; + +import org.junit.Test; + +public class Matrix_simple { + private static final String TEST_FILE = "Matrix_simple.jav"; + + @Test + public void run(){ + Vector mustContain = new Vector(); + //mustContain.add("TestIfStmt var"); + MultipleTypesInsertTester.testSingleInsert(this.TEST_FILE, mustContain); + } +}