+++ /dev/null
-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.
-
+++ /dev/null
-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 *~
-
+++ /dev/null
-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
+++ /dev/null
-var x, y, z;
-
-z = x <= y;
+++ /dev/null
-function f ()
-{
-}
-
-function g ()
-{
-}
+++ /dev/null
-function f (i, j)
-{
-}
-
-function g (i)
-{
- i;
-}
-
-function h (i, j, k)
-{
- var a;
- a = i + j + k;
-}
+++ /dev/null
-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;
- }
- }
-}
+++ /dev/null
-function f (i, j, k)
-{
- var x;
- var y;
-}
+++ /dev/null
-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;
+++ /dev/null
-true;
-false;
+++ /dev/null
-var x;
-
-x;
+++ /dev/null
-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;
+++ /dev/null
-var x, y;
-
-x >= y;
+++ /dev/null
-var x, y;
-
-x > y;
+++ /dev/null
-var x = 1;
+++ /dev/null
-var x = "string";
+++ /dev/null
-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);
+++ /dev/null
-var x, y;
-
-x <= y;
+++ /dev/null
-var x, y;
-
-x < y;
+++ /dev/null
-var x, y, z, w;
-
-x = true;
-y = false;
-z = true;
-
-w = x && y || z;
-
-print (w);
+++ /dev/null
-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.");
+++ /dev/null
-var x;
-
-x = true;
+++ /dev/null
-var x;
-
-x = 1;
+++ /dev/null
-var x, y;
-
-x = y;
+++ /dev/null
-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");
-}