Reorganize tests into a real spec suite

This commit is contained in:
2024-08-04 19:18:43 -03:00
parent 57c160173c
commit e7c2053222
693 changed files with 136 additions and 116 deletions

31
spec/tests/promela/do.txt Normal file
View 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

View 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
View 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

View 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

View 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

View 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

View 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

View 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