A regression test to make sure new changes don't break the system
authorjjenista <jjenista>
Mon, 24 Aug 2009 16:34:32 +0000 (16:34 +0000)
committerjjenista <jjenista>
Mon, 24 Aug 2009 16:34:32 +0000 (16:34 +0000)
Robust/src/Tests/mlp/regression/makefile [new file with mode: 0644]
Robust/src/Tests/mlp/regression/runTests [new file with mode: 0755]
Robust/src/Tests/mlp/regression/test.java [new file with mode: 0644]

diff --git a/Robust/src/Tests/mlp/regression/makefile b/Robust/src/Tests/mlp/regression/makefile
new file mode 100644 (file)
index 0000000..22e1977
--- /dev/null
@@ -0,0 +1,26 @@
+PROGRAM1=testSingle
+PROGRAM2=testMulti
+
+SOURCE_FILES=test.java
+
+BUILDSCRIPT=~/research/Robust/src/buildscript
+
+USEMLP= -mlp 8 2 -mlpdebug # use to turn mlp on and off and make sure rest of build not broken
+BSFLAGS= -nooptimize -debug -garbagestats -mainclass Test -ownership -ownallocdepth 1 -enable-assertions -ownaliasfile aliases.txt
+
+all: $(PROGRAM1).bin $(PROGRAM2).bin
+
+$(PROGRAM1).bin: $(SOURCE_FILES)
+       $(BUILDSCRIPT) $(USEMLP) $(BSFLAGS) -o $(PROGRAM1) $(SOURCE_FILES)
+
+$(PROGRAM2).bin: $(SOURCE_FILES)
+       $(BUILDSCRIPT)           $(BSFLAGS) -o $(PROGRAM2) $(SOURCE_FILES)
+
+clean:
+       rm -f  $(PROGRAM1).bin
+       rm -f  $(PROGRAM2).bin
+       rm -fr tmpbuilddirectory
+       rm -f  *~
+       rm -f  *.dot
+       rm -f  *.png
+       rm -f  aliases.txt
diff --git a/Robust/src/Tests/mlp/regression/runTests b/Robust/src/Tests/mlp/regression/runTests
new file mode 100755 (executable)
index 0000000..31eb888
--- /dev/null
@@ -0,0 +1,3 @@
+./testSingle.bin 1
+
+./testMulti.bin 1
diff --git a/Robust/src/Tests/mlp/regression/test.java b/Robust/src/Tests/mlp/regression/test.java
new file mode 100644 (file)
index 0000000..ac7d948
--- /dev/null
@@ -0,0 +1,52 @@
+public class Foo {
+  int f;
+  public Foo() {}
+}
+
+
+public class Test {
+
+  public static void main( String args[] ) {
+        
+    int x = Integer.parseInt( args[0] );
+
+
+
+    //int y = Integer.parseInt( args[1] );
+
+    for( int i = 0; i < x; ++i ) {
+
+      sese calc {
+       int sum = 0;
+       for( int j = 0; j <= i; ++j ) {
+         sum = sum + j;
+       }
+      }
+
+      sese prnt {
+       mightPrint( x, i, sum );
+      }
+
+    }
+
+
+    
+    //Foo foo = new Foo();
+    //foo.f = x;
+    //setTo3( foo );
+  }
+
+  public static void mightPrint( int x, int i, int sum ) {
+    if( i == x - 1 ) {
+      System.out.println( "sum of integers 0-"+i+" is "+sum );
+    }
+  }
+
+  /*
+  public static void setTo3( Foo foo ) {
+    sese func {
+      foo.f = 3;
+    }   
+  }
+  */
+}