Skip to content

Commit

Permalink
upd make & test
Browse files Browse the repository at this point in the history
  • Loading branch information
RuixiangJiang committed Oct 28, 2023
1 parent 01ef1f9 commit 7808b84
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions phase1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ lexer: syntax.tab.* lex.yy.c # For debugging lex.l

.PHONY: test clean
test: splc
@bin/splc extratest/test1.spl > extratest/test1.myout
diff extratest/test1.out extratest/test1.myout
@bin/splc extratest/test2.spl > extratest/test2.myout
diff extratest/test2.out extratest/test2.myout
@bin/splc extratest/test3.spl > extratest/test3.myout
diff extratest/test3.out extratest/test3.myout

@bin/splc test-base/test_1_r01.spl > test-base/test_1_r01.myout
diff test-base/test_1_r01.myout test-base/test_1_r01.out
@bin/splc test-base/test_1_r02.spl > test-base/test_1_r02.myout
Expand Down
2 changes: 1 addition & 1 deletion phase1/extratest/test1.out
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,4 @@ Program (1)
Exp (12)
ID: a
SEMI
RC
RC
2 changes: 1 addition & 1 deletion phase1/extratest/test2.out
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ Program (1)
Exp (11)
FLOAT: 2.3
SEMI
RC
RC
2 changes: 1 addition & 1 deletion phase1/extratest/test3.out
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Error type A at Line 6: unknown lexeme 'breaking my own rules'
Error type A at Line 9: unknown lexeme 5the
Error type A at Line 10: unknown lexeme '\n'
Error type B at Line 12: syntax error, probably Missing SEMI
Error type B at Line 15: syntax error, probably missing RP
Error type B at Line 15: syntax error, probably missing RP

0 comments on commit 7808b84

Please sign in to comment.