diff --git a/tests/golden/bitwise/basic.expected b/tests/golden/bitwise/basic.expected new file mode 100644 index 0000000..26d186e --- /dev/null +++ b/tests/golden/bitwise/basic.expected @@ -0,0 +1,5 @@ +8 +14 +24 +6 +-1 diff --git a/tests/golden/bitwise/basic.sqt b/tests/golden/bitwise/basic.sqt new file mode 100644 index 0000000..6ca9317 --- /dev/null +++ b/tests/golden/bitwise/basic.sqt @@ -0,0 +1,10 @@ +int main() { + int a = 12; + int b = 10; + print(a & b); + print(a | b); + print(a << 1); + print(a >> 1); + print(~0); + return 0; +} diff --git a/tests/golden/bitwise/compound.expected b/tests/golden/bitwise/compound.expected new file mode 100644 index 0000000..b810a1e --- /dev/null +++ b/tests/golden/bitwise/compound.expected @@ -0,0 +1,4 @@ +6 +14 +56 +28 diff --git a/tests/golden/bitwise/compound.sqt b/tests/golden/bitwise/compound.sqt new file mode 100644 index 0000000..9364d76 --- /dev/null +++ b/tests/golden/bitwise/compound.sqt @@ -0,0 +1,12 @@ +int main() { + int x = 15; + x &= 6; + print(x); + x |= 8; + print(x); + x <<= 2; + print(x); + x >>= 1; + print(x); + return 0; +} diff --git a/tests/golden/global/basic.expected b/tests/golden/global/basic.expected new file mode 100644 index 0000000..e191f63 --- /dev/null +++ b/tests/golden/global/basic.expected @@ -0,0 +1,3 @@ +5 +105 +8 diff --git a/tests/golden/global/basic.sqt b/tests/golden/global/basic.sqt new file mode 100644 index 0000000..2671704 --- /dev/null +++ b/tests/golden/global/basic.sqt @@ -0,0 +1,12 @@ +int counter = 0; +int total = 100; + +int main() { + counter = 5; + total = total + counter; + print(counter); + print(total); + counter += 3; + print(counter); + return 0; +} diff --git a/tests/golden/global/init_expr.expected b/tests/golden/global/init_expr.expected new file mode 100644 index 0000000..3b86147 --- /dev/null +++ b/tests/golden/global/init_expr.expected @@ -0,0 +1,2 @@ +10 +20 diff --git a/tests/golden/global/init_expr.sqt b/tests/golden/global/init_expr.sqt new file mode 100644 index 0000000..9a4d130 --- /dev/null +++ b/tests/golden/global/init_expr.sqt @@ -0,0 +1,9 @@ +int base = 10; +int doubled = 0; + +int main() { + doubled = base * 2; + print(base); + print(doubled); + return 0; +}