diff --git a/tests/3/blch.zwei b/tests/3/blch.zwei new file mode 100755 index 0000000..890054f --- /dev/null +++ b/tests/3/blch.zwei @@ -0,0 +1 @@ +(if( a*b || c)a).func() diff --git a/tests/3/brackets.zwei b/tests/3/brackets.zwei new file mode 100755 index 0000000..bd5426e --- /dev/null +++ b/tests/3/brackets.zwei @@ -0,0 +1 @@ +(if (a) b else c).func() \ No newline at end of file diff --git a/tests/3/eyer.zwei b/tests/3/eyer.zwei new file mode 100755 index 0000000..ff67ed9 --- /dev/null +++ b/tests/3/eyer.zwei @@ -0,0 +1,94 @@ +//a class without extends +class TestSystematic { + + //test member definition + Int member; + + //Test function without parameter + Null functionNoPar() { + } + + //Test functions with one parameter + Null functionOne(Int x) { + } + + //Test functions with two parameters + Null functionTwo(Int x, Int y) { + } + + //Test statements + Null testStat() { + while (a == b) { + a; + b; + c; + } + + type name = init; + name = init; + a == b; + printInt(1); + printChar(1); + } + + Null testIf() { + if (a) b; + if (a) b else d; + } + + //Test the factors + Null testFactors() { + ident; + 123; + "hello"; + true; + false; + this; + null; + readInt; + readChar; + (a); + { + a; + }; + { + a; + return b + }; + new Test(); + new Test(a, b, c); + factor.ident; + factor.ident(); + factor.ident(a, b, c); + } + + //test syntactic sugar + Null syntaxSugar() { + true; + false; + a || b; + if (a) b; + {}; + "abcd"; + } + + //test operator precedence + Null operatorPrec() { + a + b * c; + a + b * -c; + (a+b) * c; + -(a+b) * c; + a == b + c * d && e; + } + + + + +} + +//a class with extends +class Systematic2 extends Systematic { + +} + +foobar.main() \ No newline at end of file diff --git a/tests/3/truefalse.zwei b/tests/3/truefalse.zwei new file mode 100755 index 0000000..a9b627e --- /dev/null +++ b/tests/3/truefalse.zwei @@ -0,0 +1 @@ +if (true) true else false