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:
46
spec/tests/c++/alternative_tokens.txt
Normal file
46
spec/tests/c++/alternative_tokens.txt
Normal file
@ -0,0 +1,46 @@
|
||||
---input---
|
||||
and
|
||||
and_eq
|
||||
bitand
|
||||
bitor
|
||||
compl
|
||||
not
|
||||
not_eq
|
||||
or
|
||||
or_eq
|
||||
xor
|
||||
xor_eq
|
||||
|
||||
---tokens---
|
||||
'and' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'and_eq' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'bitand' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'bitor' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'compl' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'not' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'not_eq' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'or' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'or_eq' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'xor' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'xor_eq' Keyword
|
||||
'\n' Text.Whitespace
|
17
spec/tests/c++/extension_keywords.txt
Normal file
17
spec/tests/c++/extension_keywords.txt
Normal file
@ -0,0 +1,17 @@
|
||||
---input---
|
||||
__restrict
|
||||
__int128
|
||||
_BitInt(2)
|
||||
|
||||
---tokens---
|
||||
'__restrict' Keyword
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'__int128' Keyword.Type
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'_BitInt' Keyword.Type
|
||||
'(' Punctuation
|
||||
'2' Literal.Number.Integer
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
6
spec/tests/c++/test_good_comment.txt
Normal file
6
spec/tests/c++/test_good_comment.txt
Normal file
@ -0,0 +1,6 @@
|
||||
---input---
|
||||
/* foo */
|
||||
|
||||
---tokens---
|
||||
'/* foo */' Comment.Multiline
|
||||
'\n' Text.Whitespace
|
5
spec/tests/c++/test_open_comment.txt
Normal file
5
spec/tests/c++/test_open_comment.txt
Normal file
@ -0,0 +1,5 @@
|
||||
---input---
|
||||
/* foo
|
||||
|
||||
---tokens---
|
||||
'/* foo\n' Comment.Multiline
|
146
spec/tests/c++/test_unicode_identifiers.txt
Normal file
146
spec/tests/c++/test_unicode_identifiers.txt
Normal file
@ -0,0 +1,146 @@
|
||||
---input---
|
||||
namespace 𝐨𝐩𝐭𝐢𝐨𝐧 {
|
||||
int _hello();
|
||||
}
|
||||
|
||||
int cześć = 2;
|
||||
|
||||
class 𝐨𝐩𝐭𝐢𝐨𝐧𝐬 final {
|
||||
𝐨𝐩𝐭𝐢𝐨𝐧𝐬() {
|
||||
爴:
|
||||
int a = 𝐨𝐩𝐭𝐢𝐨𝐧::hello();
|
||||
};
|
||||
|
||||
static 𝐨𝐩𝐭𝐢𝐨𝐧𝐬 𝔡𝔢𝔣𝔞𝔲𝔩𝔱;
|
||||
static 𝐨𝐩𝐭𝐢𝐨𝐧𝐬 𝔢𝔵𝔠𝔢𝔭𝔱𝔦𝔬𝔫𝔰;
|
||||
};
|
||||
|
||||
enum class ⅭⅤ { red, green = 15, blue };
|
||||
|
||||
---tokens---
|
||||
'namespace' Keyword
|
||||
' ' Text.Whitespace
|
||||
'𝐨𝐩𝐭𝐢𝐨𝐧' Name.Namespace
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'int' Keyword.Type
|
||||
' ' Text.Whitespace
|
||||
'_hello' Name.Function
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'int' Keyword.Type
|
||||
' ' Text.Whitespace
|
||||
'cześć' Name
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'2' Literal.Number.Integer
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'class' Keyword
|
||||
' ' Text.Whitespace
|
||||
'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name.Class
|
||||
' ' Text.Whitespace
|
||||
'final' Keyword
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'爴' Name.Label
|
||||
':' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'int' Keyword.Type
|
||||
' ' Text.Whitespace
|
||||
'a' Name
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'𝐨𝐩𝐭𝐢𝐨𝐧' Name
|
||||
':' Operator
|
||||
':' Operator
|
||||
'hello' Name
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'}' Punctuation
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'static' Keyword
|
||||
' ' Text.Whitespace
|
||||
'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name
|
||||
' ' Text.Whitespace
|
||||
'𝔡𝔢𝔣𝔞𝔲𝔩𝔱' Name
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
' ' Text.Whitespace
|
||||
'static' Keyword
|
||||
' ' Text.Whitespace
|
||||
'𝐨𝐩𝐭𝐢𝐨𝐧𝐬' Name
|
||||
' ' Text.Whitespace
|
||||
'𝔢𝔵𝔠𝔢𝔭𝔱𝔦𝔬𝔫𝔰' Name
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'}' Punctuation
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'enum' Keyword
|
||||
' ' Text.Whitespace
|
||||
'class' Keyword
|
||||
' ' Text.Whitespace
|
||||
'ⅭⅤ' Name.Class
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'red' Name
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'green' Name
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'15' Literal.Number.Integer
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'blue' Name
|
||||
' ' Text.Whitespace
|
||||
'}' Punctuation
|
||||
';' Punctuation
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user