Permalink
Browse files

removed this too

svn path=/old-code/; revision=153277
  • Loading branch information...
1 parent 2e88757 commit a3e0eecf76b66bfbd79000cb835341b2e05e56bd @migueldeicaza migueldeicaza committed Mar 8, 2010
View
@@ -0,0 +1,20 @@
+2004-05-28 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
+
+ * switch.js: added clause after default
+
+2004-05-24 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
+ * Added switch.js
+
+2004-04-14 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
+
+ * Added log-ops.js, we'll be adding all sort of test for logic
+ operators here.
+
+2004-03-13 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
+
+ * func-form-params.js: exercise function's parameters.
+
+2004-01-25 Cesar Lopez Nataren <cesar@ciencias.unam.mx>
+
+ * Added tests for relational operators.
+
View
@@ -0,0 +1,47 @@
+thisdir = jtests
+SUBDIRS =
+INTERNAL_MJS = $(TEST_RUNTIME) $(topdir)/tools/mjs/mjs.exe
+all: test-compiler-jit
+include ../build/rules.make
+include Test.Sources
+
+all-local install-local:
+
+test-local:
+
+run-test-local: test-compiler-jit
+
+test-compiler-jit: test-compiler-jit-real
+
+test-compiler-jit-real:
+ @rm -f *.exe *.out; \
+ /bin/echo "*** Tests ***" > results.out; \
+ /bin/echo "*** Tests ***"; \
+ for i in $(TEST_SOURCES) ; do \
+ /bin/echo -n -e "===\n$$i: " >> results.out; \
+ /bin/echo -n "$$i: "; \
+ if $(INTERNAL_MJS) $$i.js 1>output ; then \
+ /bin/echo -n "COMPILED OK : " >> results.out; \
+ /bin/echo -n "COMPILED OK : " ; \
+ true; \
+ else \
+ /bin/echo -n -e "FAILED COMPILATION\n---\n" >> results.out; \
+ cat output >> results.out; \
+ /bin/echo "FAILED COMPILATION" ; \
+ continue; \
+ fi ; \
+ if $(TEST_RUNTIME) ./$$i.exe 1>output ; then \
+ /bin/echo "EXECUTED OK" >> results.out; \
+ /bin/echo "EXECUTED OK"; \
+ else \
+ /bin/echo -n -e "$$i : FAILED AT RUNTIME\n---\n" >> results.out; \
+ cat output >> results.out; \
+ /bin/echo "$$i : FAILED AT RUNTIME" ; \
+ fi ; \
+ rm -f ./$$i.exe output; \
+ done; \
+ /bin/echo "===" >> results.out
+
+clean-local:
+ rm *~
+
View
@@ -0,0 +1,6 @@
+TEST_SOURCES = \
+ var-decl init-var-num init-var-string simple-assign-num simple-assign-vars \
+ simple-assign-bool global-bool-lits global-id global-num global-sum \
+ global-assign-sum empty-func func-form-params func-total-locals func-nested \
+ greater-than less-than greater-than-eq less-than-eq assign-less-than-eq \
+ log-ops iteration-stms precedence
@@ -0,0 +1,3 @@
+var x, y, z;
+
+z = x <= y;
View
@@ -0,0 +1,7 @@
+function f ()
+{
+}
+
+function g ()
+{
+}
View
@@ -0,0 +1,14 @@
+function f (i, j)
+{
+}
+
+function g (i)
+{
+ i;
+}
+
+function h (i, j, k)
+{
+ var a;
+ a = i + j + k;
+}
View
@@ -0,0 +1,19 @@
+var global;
+
+function f (i, j)
+{
+ var x = 1, y = 2, z;
+ z = x + y;
+
+ function g (k, l, m)
+ {
+ var z;
+ z = 1;
+
+ function h ()
+ {
+ var w;
+ w + 45;
+ }
+ }
+}
@@ -0,0 +1,5 @@
+function f (i, j, k)
+{
+ var x;
+ var y;
+}
@@ -0,0 +1,4 @@
+var a, b, c, d, e, f, g, h, i, j, k, l;
+var x;
+
+x = a + b + c + d + e + f + g + h + i + j + k + l;
@@ -0,0 +1,2 @@
+true;
+false;
View
@@ -0,0 +1,3 @@
+var x;
+
+x;
View
@@ -0,0 +1 @@
+1;
View
@@ -0,0 +1,3 @@
+var a, b, c, d, e, f, g, h, i, j, k, l;
+
+a + b + c + d + e + f + g + h + i + j + k + l;
@@ -0,0 +1,3 @@
+var x, y;
+
+x >= y;
View
@@ -0,0 +1,3 @@
+var x, y;
+
+x > y;
View
@@ -0,0 +1 @@
+var x = 1;
@@ -0,0 +1 @@
+var x = "string";
View
@@ -0,0 +1,13 @@
+var x = 0;
+var y = 1;
+
+while (x)
+ print ("while stm failed");
+
+while (y)
+ print ("while stm succeeded"), y = y - 1;
+
+
+do
+ print ("hello do-while stm"), x = 0;
+while (x);
View
@@ -0,0 +1,3 @@
+var x, y;
+
+x <= y;
View
@@ -0,0 +1,3 @@
+var x, y;
+
+x < y;
View
@@ -0,0 +1,9 @@
+var x, y, z, w;
+
+x = true;
+y = false;
+z = true;
+
+w = x && y || z;
+
+print (w);
View
@@ -0,0 +1,45 @@
+var expected, result;
+
+print ("Test precedence of * over + (#1):");
+result = 3 + 2 * 2;
+expected = 7;
+if (expected != result)
+ print ("FAILED.");
+else
+ print ("SUCCEED.");
+
+
+print ("Test precedence of * over + (#2):");
+result = 3 * 2 + 2;
+expected = 8;
+if (expected != result)
+ print ("FAILED.");
+else
+ print ("SUCCEED.");
+
+
+print ("Test precedence of / over + (#3):");
+result = 3 + 2 / 2;
+expected = 4;
+if (expected != result)
+ print ("FAILED.");
+else
+ print ("SUCCEED.");
+
+
+print ("Test precedence of / over + (#4):");
+result = 3 / 2 + 2;
+expected = 3.5;
+if (expected != result)
+ print ("FAILED.");
+else
+ print ("SUCCEED.");
+
+
+print ("Test precedence of * over - (#5)");
+result = 3 - 2 * 2;
+expected = -1;
+if (expected != result)
+ print ("FAILED.");
+else
+ print ("SUCCEED.");
@@ -0,0 +1,3 @@
+var x;
+
+x = true;
@@ -0,0 +1,3 @@
+var x;
+
+x = 1;
@@ -0,0 +1,3 @@
+var x, y;
+
+x = y;
View
@@ -0,0 +1,18 @@
+var x = "b";
+
+switch (x) {
+case "hola":
+ print ("matched hola");
+ print ("Oh i rock");
+case "a":
+ print ("matched a");
+case "b":
+ print ("matched b");
+case 1:
+ print ("matched 1");
+default:
+ print ("blah this is default");
+ print ("this is default too ;-)");
+case "afterDefault":
+ print ("matched after default");
+}
View
@@ -0,0 +1 @@
+var y;

0 comments on commit a3e0eec

Please sign in to comment.