Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first tests for (mm0 parser, mmu parser, mm0+mmu proof checker) #79

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**Test files for mm0 and mmu**

This folder holds various tests for MM0, MM1, MMU, and MMB.

* `mm0_mmu/{pass, fail}`: Integration tests for MM0 + MMU that should pass or fail.
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id1.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- empty id
sort ;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id1.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- empty id
(sort )
3 changes: 3 additions & 0 deletions tests/mm0_mmu/fail/bad-id2.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- blank id
sort
;
3 changes: 3 additions & 0 deletions tests/mm0_mmu/fail/bad-id2.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- blank id
(sort
)
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id3.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- id starting with a digit
sort 0;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id3.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- id starting with a digit
(sort 0)
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id4.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- id with forbidden char -
sort sot-;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id4.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- id with forbidden char -
(sort sot-)
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id5.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- id that is a single underscore _
sort _;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-id5.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- id that is a single underscore _
(sort _)
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace1.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a TAB
sort s ;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace1.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a TAB
(sort s )
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace2.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a LINE TABULATION
sort s ;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace2.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a LINE TABULATION
(sort s )
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace3.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a FORM FEED
sort s ;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace3.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a FORM FEED
(sort s )
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace4.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a CARRIAGE RETURN
sort s;
Expand Down
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/bad-whitespace4.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a CARRIAGE RETURN
(sort s)
Expand Down
1 change: 1 addition & 0 deletions tests/mm0_mmu/fail/non-ascii1.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sort ß;
1 change: 1 addition & 0 deletions tests/mm0_mmu/fail/non-ascii1.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(sort ß)
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/non-ascii2.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v- non-break space
sort s ;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/fail/non-ascii2.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v- non-break space
(sort s )
4 changes: 4 additions & 0 deletions tests/mm0_mmu/pass/id.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- identifier ::= [a-zA-Z_][a-zA-Z0-9_]*
sort id_1;
sort Id2_;
sort _id3;
4 changes: 4 additions & 0 deletions tests/mm0_mmu/pass/id.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- identifier ::= [a-zA-Z_][a-zA-Z0-9_]*
(sort id_1)
(sort Id2_)
(sort _id3)
2 changes: 2 additions & 0 deletions tests/mm0_mmu/pass/whitespace1.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a SPACE
sort s ;
2 changes: 2 additions & 0 deletions tests/mm0_mmu/pass/whitespace1.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- v-- this is a SPACE
(sort s )
3 changes: 3 additions & 0 deletions tests/mm0_mmu/pass/whitespace2.mm0
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- v-- this is a LINE FEED
sort s
digama0 marked this conversation as resolved.
Show resolved Hide resolved
;
3 changes: 3 additions & 0 deletions tests/mm0_mmu/pass/whitespace2.mmu
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-- v-- this is a LINE FEED
(sort s
)
5 changes: 5 additions & 0 deletions tests/mm0_mmu/run-mm0-hs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

# Usage: ./run-mm0-hs.sh pass/TEST
# or fail/TEST
mm0-hs verify $1.mm0 $1.mmu