Testcase extended, new Testcase
authorMartin Perner <martin@perner.cc>
Tue, 18 May 2010 14:02:50 +0000 (16:02 +0200)
committerMartin Perner <martin@perner.cc>
Tue, 18 May 2010 14:02:50 +0000 (16:02 +0200)
codea/skinner33_15.0
codea/skinner33_15.call
codea/skinner33_15.instr
codea/skinner33_16.0 [new file with mode: 0644]
codea/skinner33_16.call [new file with mode: 0644]
codea/skinner33_16.instr [new file with mode: 0644]

index 5294f18c6c3d1e66fa2befec5fcddfb4017bf48f..028c96d8eff640ae1e544b20eb60833352ac8194 100644 (file)
@@ -35,3 +35,51 @@ end;
 method f9(a b)
        return 0x11EEEEFF or this;
 end;
 method f9(a b)
        return 0x11EEEEFF or this;
 end;
+
+method f10(a b)
+       return (a.foo - 5) or 6;
+end;
+
+method f11(a b)
+       return 7 or (b.bar - 3);
+end;
+
+method f12(a b)
+       return (a.bar - 3) or b.foo;
+end;
+
+method f13(a b)
+       return a.foo or (b.bar - -3);
+end;
+
+method f14(a b)
+       return this or a.foo;
+end;
+
+method f15(a b)
+       return b.bar or this;
+end;
+
+method f16(a b)
+       return b.bar or 0;
+end;
+
+method f17(a b)
+       return 0 or a.foo;
+end;
+
+method f18(a b)
+       return 0 or this;
+end;
+
+method f19(a b)
+       return this or 0;
+end;
+
+method f20(a b)
+       return 0 or (b.foo * 1);
+end;
+
+method f21(a b)
+       return (a.foo * 1) or 0;
+end;
index 0cd43a99c4e802276461a2ca40790946ee3c3432..371933d95f0d9ef5aa062d4ede36ffd6f70573e4 100644 (file)
@@ -1,26 +1,50 @@
 #define OR(a,b)     ((long)(a) | (long)(b))
 
 #define OR(a,b)     ((long)(a) | (long)(b))
 
-long f1(long, long*, long*);
-long f2(long, long*, long*);
-long f3(long, long*, long*);
-long f4(long, long*, long*);
-long f5(long, long*, long*);
-long f6(long, long*, long*);
-long f7(long, long*, long*);
-long f8(long, long*, long*);
-long f9(long, long*, long*);
+long  f1(long, long*, long*);
+long  f2(long, long*, long*);
+long  f3(long, long*, long*);
+long  f4(long, long*, long*);
+long  f5(long, long*, long*);
+long  f6(long, long*, long*);
+long  f7(long, long*, long*);
+long  f8(long, long*, long*);
+long  f9(long, long*, long*);
+long f10(long, long*, long*);
+long f11(long, long*, long*);
+long f12(long, long*, long*);
+long f13(long, long*, long*);
+long f14(long, long*, long*);
+long f15(long, long*, long*);
+long f16(long, long*, long*);
+long f17(long, long*, long*);
+long f18(long, long*, long*);
+long f19(long, long*, long*);
+long f20(long, long*, long*);
+long f21(long, long*, long*);
 
 long muh[] = {0x05f05f, 0x223344};
 long kuh[] = {0x00AACC, 0x563425};
 
 
 long muh[] = {0x05f05f, 0x223344};
 long kuh[] = {0x00AACC, 0x563425};
 
-RET(f1(5, muh, kuh) == OR(            4,             5) &&
-    f2(5, muh, kuh) == OR(       muh[0],    0x55555555) &&
-    f3(5, muh, kuh) == OR(   0x55555555,        kuh[1]) &&
-    f4(5, muh, kuh) == OR(muh[1]-kuh[0], muh[0]-kuh[1]) &&
-    f5(5, muh, kuh) == OR(            0,             5) &&
-    f6(5, muh, kuh) == OR(            5,             0) &&
-    f7(5, muh, kuh) == OR(          muh,           kuh) &&
-    f8(5, muh, kuh) == OR(            5,      0x112233) &&
-    f9(5, muh, kuh) == OR(   0x11EEEEFF,             5) 
+RET( f1(5, muh, kuh) == OR(            4,             5) &&
+     f2(5, muh, kuh) == OR(       muh[0],    0x55555555) &&
+     f3(5, muh, kuh) == OR(   0x55555555,        kuh[1]) &&
+     f4(5, muh, kuh) == OR(muh[1]-kuh[0], muh[0]-kuh[1]) &&
+     f5(5, muh, kuh) == OR(            0,             5) &&
+     f6(5, muh, kuh) == OR(            5,             0) &&
+     f7(5, muh, kuh) == OR(          muh,           kuh) &&
+     f8(5, muh, kuh) == OR(            5,      0x112233) &&
+     f9(5, muh, kuh) == OR(   0x11EEEEFF,             5) &&
+    f10(5, muh, kuh) == OR(     muh[0]-5,             6) &&
+    f11(5, muh, kuh) == OR(            7,      kuh[1]-3) &&
+    f12(5, muh, kuh) == OR(     muh[1]-3,        kuh[0]) &&
+    f13(5, muh, kuh) == OR(       muh[0],      kuh[1]+3) &&
+    f14(5, muh, kuh) == OR(            5,        muh[0]) &&
+    f15(5, muh, kuh) == OR(       kuh[1],             5) &&
+    f16(5, muh, kuh) == OR(       kuh[1],             0) &&
+    f17(5, muh, kuh) == OR(            0,        muh[0]) &&
+    f18(5, muh, kuh) == OR(            0,             5) &&
+    f19(5, muh, kuh) == OR(            5,             0) &&
+    f20(5, muh, kuh) == OR(            0,        kuh[0]) &&
+    f21(5, muh, kuh) == OR(       muh[0],             0) 
    );
 
    );
 
index 8f92bfdd49766b1907d4aec8d3b0f9ed6129d0e6..b5489e5e51a9e547d42a398df654a8dfee00b82f 100644 (file)
@@ -1 +1 @@
-35
+69
diff --git a/codea/skinner33_16.0 b/codea/skinner33_16.0
new file mode 100644 (file)
index 0000000..ddec0ea
--- /dev/null
@@ -0,0 +1,33 @@
+struct foo bar end;
+
+method f1(a)
+       return not(this-a.bar);
+end;
+
+method f2(a)
+       return not(a.foo);
+end;
+
+method f3(a)
+       return not(not(a.foo));
+end;
+
+method f4(a)
+       return not(a.bar);
+end;
+
+method f5(a)
+       return not(not(a.bar));
+end;
+
+method f6(a)
+       return not(not(a.foo - a.bar));
+end;
+
+method f7(a)
+       return not(not(a.foo * a.bar));
+end;
+
+method f8(a)
+       return not(this*a.bar);
+end;
diff --git a/codea/skinner33_16.call b/codea/skinner33_16.call
new file mode 100644 (file)
index 0000000..fba7203
--- /dev/null
@@ -0,0 +1,25 @@
+long f1(long, long*);
+long f2(long, long*);
+long f3(long, long*);
+long f4(long, long*);
+long f5(long, long*);
+long f6(long, long*);
+long f7(long, long*);
+long f8(long, long*);
+
+long muh[] = {6,4};
+long kuh[] = {1,0};
+long zod[] = {0,1};
+long pui[] = {1,1};
+
+printf("%d = %d , %d = %d, %d = %d, %d = %d \n", f8(5,muh) ,  1 ,  f8(4,muh) ,  1 ,  f8(0,muh) ,  0 ,  f8(0,zod) ,  0 );
+
+RET(f1(5,muh) == 0 && f1(4,muh) == 1 &&
+       f2(5,kuh) == 0 && f2(5,zod) == 1 &&
+       f3(5,kuh) == 1 && f3(5,zod) == 0 && f3(5,muh) == 1 &&
+       f4(5,kuh) == 1 && f4(5,zod) == 0 && f4(5,muh) == 0 &&
+       f5(5,kuh) == 0 && f5(5,zod) == 1 &&
+       f6(5,muh) == 1 && f6(5,kuh) == 1 && f6(5,pui) == 0 &&
+       f7(5,muh) == 1 && f7(5,kuh) == 0 && f7(5,pui) == 1 && 
+       f8(5,muh) == 0 && f8(4,muh) == 0 && f8(0,muh) == 1 && f8(0,zod) == 1 
+   );
diff --git a/codea/skinner33_16.instr b/codea/skinner33_16.instr
new file mode 100644 (file)
index 0000000..a57f6ce
--- /dev/null
@@ -0,0 +1 @@
+131