Browse Source

new tests

Kajetan Johannes Hammerle 4 years ago
parent
commit
1ef0e85822

+ 4 - 0
test/basic/unicode

@@ -0,0 +1,4 @@
+print("▇");
+print("äöü");
+print("ÄÖÜ");
+print("ß");

+ 8 - 0
test/basic/unicode.cout

@@ -0,0 +1,8 @@
+push "▇"
+use print(1)
+push "äöü"
+use print(1)
+push "ÄÖÜ"
+use print(1)
+push "ß"
+use print(1)

+ 4 - 0
test/basic/unicode.out

@@ -0,0 +1,4 @@
+▇
+äöü
+ÄÖÜ

+ 21 - 0
test/basic/unicode.tout

@@ -0,0 +1,21 @@
+(1, LITERAL, "print")
+(1, OPEN_BRACKET)
+(1, STRING, "▇")
+(1, CLOSE_BRACKET)
+(1, SEMICOLON)
+(2, LITERAL, "print")
+(2, OPEN_BRACKET)
+(2, STRING, "äöü")
+(2, CLOSE_BRACKET)
+(2, SEMICOLON)
+(3, LITERAL, "print")
+(3, OPEN_BRACKET)
+(3, STRING, "ÄÖÜ")
+(3, CLOSE_BRACKET)
+(3, SEMICOLON)
+(4, LITERAL, "print")
+(4, OPEN_BRACKET)
+(4, STRING, "ß")
+(4, CLOSE_BRACKET)
+(4, SEMICOLON)
+(5, EOF)

+ 1 - 0
test/calc/comma

@@ -0,0 +1 @@
+print(5.125 + 3.125 + 1.25 + 0.5);

+ 8 - 0
test/calc/comma.cout

@@ -0,0 +1,8 @@
+push 5.125
+push 3.125
+use +(2)
+push 1.25
+use +(2)
+push 0.5
+use +(2)
+use print(1)

+ 1 - 0
test/calc/comma.out

@@ -0,0 +1 @@
+10.0

+ 12 - 0
test/calc/comma.tout

@@ -0,0 +1,12 @@
+(1, LITERAL, "print")
+(1, OPEN_BRACKET)
+(1, NUMBER, 5.125)
+(1, ADD)
+(1, NUMBER, 3.125)
+(1, ADD)
+(1, NUMBER, 1.25)
+(1, ADD)
+(1, NUMBER, 0.5)
+(1, CLOSE_BRACKET)
+(1, SEMICOLON)
+(2, EOF)