clone https://github.com/jjvraw/TestSuiteALAN.git
into the directory/folder which holds your alan folder.- Navigate to directory
cd TestSuiteALAN
- Run a script
python3 test.py xxx
- Test funcdef and vardef
python3 test.py codegen all
- runs all testcases
need to first export jasmin environment variable before running
- Test HashTable
python3 test.py hash
- should run without any problems
- inserts 100,196 random strings in hashtable
python3 test.py typechecking official
- runs through and compares official test cases
Can only be used before any TypeChecking additions have been made
-
Run test cases
python3 test.py most
-
Run 10k generated test cases
python3 test.py tenthousand
- thanks Iain.
-
Run official tests
python3 test.py official
-
Comments
python3 test.py comments
- nested comments
- error messages; testing position
- curly brackets inside string literals
- block comments with error; testing position
-
String Literals
python3 test.py strings
- escape codes
- multi line string literal error
- illegal escape codes
- " at end
- empty string
- "untidy"strings"
-
Error handling
python3 test.py errors
- illegal characters
- numbers too long
- identifiers too long
- error precedence
- string not closed
- comment not closed; normal and nested testing position
-
All available
python3 test.py all
- tests all above, and more.
-
Official Test Script provided
python3 test.py official
- unit tests provided.