From 822376d14276ae137b117b18417613b45e37f2a0 Mon Sep 17 00:00:00 2001 From: Curle Date: Sun, 13 Sep 2020 02:26:18 +0100 Subject: [PATCH] Add new tests to help debugging --- tests/for | 2 +- tests/funcs2 | 3 ++- tests/funcs3 | 19 +++++++++++++++++++ tests/funcs4 | 10 ++++++++++ tests/print | 13 +++++++++++++ 5 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 tests/funcs3 create mode 100644 tests/funcs4 create mode 100644 tests/print diff --git a/tests/for b/tests/for index 80e36c2..250a07e 100644 --- a/tests/for +++ b/tests/for @@ -1,4 +1,4 @@ -{ +void :: main() { int x; x = 0; diff --git a/tests/funcs2 b/tests/funcs2 index 2bf9282..b5e1beb 100644 --- a/tests/funcs2 +++ b/tests/funcs2 @@ -11,5 +11,6 @@ void :: main() { PrintInteger(Result); - PrintInteger(Testings(10) + 10); + PrintInteger(Testings(10) + i); + } \ No newline at end of file diff --git a/tests/funcs3 b/tests/funcs3 new file mode 100644 index 0000000..9460b4b --- /dev/null +++ b/tests/funcs3 @@ -0,0 +1,19 @@ +int :: Testings() { + return (40); +} + +void :: main() { + int Result; + + PrintInteger(10); + + Result = Testings(10); + + PrintInteger(Result); + + int i; + for(i = 0; i < 5; i = i + 1) { + + PrintInteger(Testings(10) + i); + } +} \ No newline at end of file diff --git a/tests/funcs4 b/tests/funcs4 new file mode 100644 index 0000000..04f9468 --- /dev/null +++ b/tests/funcs4 @@ -0,0 +1,10 @@ +void :: main() { + + + int i; + for(i = 0; i < 5; i = i + 1) { + + PrintInteger(i); + + } +} \ No newline at end of file diff --git a/tests/print b/tests/print new file mode 100644 index 0000000..f6f44d4 --- /dev/null +++ b/tests/print @@ -0,0 +1,13 @@ +void :: main() { + int x; + int y; + int m; + + x = 5; + y = 50; + m = 300; + + print m; + print y; + print x; +} \ No newline at end of file