Final bug fixes.

Worklog.
Added test diff.py demonstrating the differences between the reference compiler.
This commit is contained in:
bill
2021-04-03 02:54:25 +08:00
parent 617dbdd3b5
commit c86e536fe3
11 changed files with 3052 additions and 106 deletions
Executable
+8
View File
@@ -0,0 +1,8 @@
#!/bin/bash
echo "Running all test cases inside src/test/data/pa2/sample/ folder)"
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=rr --reset --dir src/test/data/pa2/
# good.py can't be parsed by reference compiler, because it contains our improvements in PA1. Therefore, we generate the ast with our parser and then use the reference semantic checker to generate the reference type information for testing.
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=s --reset --dir src/test/data/pa2/student_contributed/good.py
java -cp "chocopy-ref.jar:target/assignment.jar" chocopy.ChocoPy --pass=.r --reset --dir src/test/data/pa2/student_contributed/good.py.ast