mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
Reorganize tests into a real spec suite
This commit is contained in:
31
spec/tests/promela/do.txt
Normal file
31
spec/tests/promela/do.txt
Normal file
@ -0,0 +1,31 @@
|
||||
---input---
|
||||
init {
|
||||
a ? b -> a ! b;
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'init' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'a' Name
|
||||
' ' Text.Whitespace
|
||||
'?' Operator
|
||||
' ' Text.Whitespace
|
||||
'b' Name
|
||||
' ' Text.Whitespace
|
||||
'-' Operator
|
||||
'>' Operator
|
||||
' ' Text.Whitespace
|
||||
'a' Name
|
||||
' ' Text.Whitespace
|
||||
'!' Operator
|
||||
' ' Text.Whitespace
|
||||
'b' Name
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
48
spec/tests/promela/dotted-assign.txt
Normal file
48
spec/tests/promela/dotted-assign.txt
Normal file
@ -0,0 +1,48 @@
|
||||
---input---
|
||||
init {
|
||||
intercepted.key = data.key
|
||||
r.b[a] = a * 4 + 7;
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'init' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'intercepted' Name
|
||||
'.' Operator
|
||||
'key' Name.Attribute
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'data' Name
|
||||
'.' Operator
|
||||
'key' Name.Attribute
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'r' Name
|
||||
'.' Operator
|
||||
'b' Name.Attribute
|
||||
'[' Punctuation
|
||||
'a' Name
|
||||
']' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'a' Name
|
||||
' ' Text.Whitespace
|
||||
'*' Operator
|
||||
' ' Text.Whitespace
|
||||
'4' Literal.Number.Integer
|
||||
' ' Text.Whitespace
|
||||
'+' Operator
|
||||
' ' Text.Whitespace
|
||||
'7' Literal.Number.Integer
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
38
spec/tests/promela/if.txt
Normal file
38
spec/tests/promela/if.txt
Normal file
@ -0,0 +1,38 @@
|
||||
---input---
|
||||
init {
|
||||
if
|
||||
:: skip;
|
||||
fi;
|
||||
skip
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'init' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'if' Keyword
|
||||
' ' Text.Whitespace
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
':' Operator
|
||||
':' Operator
|
||||
' ' Text.Whitespace
|
||||
'skip' Keyword
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'fi' Keyword
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'skip' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
27
spec/tests/promela/intruder.txt
Normal file
27
spec/tests/promela/intruder.txt
Normal file
@ -0,0 +1,27 @@
|
||||
---input---
|
||||
Crypt x;
|
||||
init {
|
||||
Crypt x;
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'Crypt' Name
|
||||
' ' Text.Whitespace
|
||||
'x' Name
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'init' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'Crypt' Name
|
||||
' ' Text.Whitespace
|
||||
'x' Name
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
37
spec/tests/promela/ltl.txt
Normal file
37
spec/tests/promela/ltl.txt
Normal file
@ -0,0 +1,37 @@
|
||||
---input---
|
||||
ltl alwayserr { [] ((statusa == err) || (statusb == err)) }
|
||||
|
||||
---tokens---
|
||||
'ltl' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'alwayserr' Name
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'[]' Operator
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'(' Punctuation
|
||||
'statusa' Name
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'err' Name
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'|' Operator
|
||||
'|' Operator
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'statusb' Name
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'err' Name
|
||||
')' Punctuation
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
28
spec/tests/promela/msg.txt
Normal file
28
spec/tests/promela/msg.txt
Normal file
@ -0,0 +1,28 @@
|
||||
---input---
|
||||
|
||||
init {
|
||||
1 == 1 -> 3
|
||||
}
|
||||
|
||||
---tokens---
|
||||
'init' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'1' Literal.Number.Integer
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'1' Literal.Number.Integer
|
||||
' ' Text.Whitespace
|
||||
'-' Operator
|
||||
'>' Operator
|
||||
' ' Text.Whitespace
|
||||
'3' Literal.Number.Integer
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
12
spec/tests/promela/skip.txt
Normal file
12
spec/tests/promela/skip.txt
Normal file
@ -0,0 +1,12 @@
|
||||
---input---
|
||||
init { skip }
|
||||
|
||||
---tokens---
|
||||
'init' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'skip' Keyword
|
||||
' ' Text.Whitespace
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
15
spec/tests/promela/welfare.txt
Normal file
15
spec/tests/promela/welfare.txt
Normal file
@ -0,0 +1,15 @@
|
||||
---input---
|
||||
active proctype cr() {}
|
||||
|
||||
---tokens---
|
||||
'active' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'proctype' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'cr' Name
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user