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:
@ -0,0 +1,27 @@
|
||||
---input---
|
||||
val (a: List<Something>, b: Set<Wobble>) =
|
||||
|
||||
---tokens---
|
||||
'val' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'a' Name.Variable
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'List' Name
|
||||
'<' Operator
|
||||
'Something' Name
|
||||
'>' Operator
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'b' Name.Variable
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'Set' Name
|
||||
'<' Operator
|
||||
'Wobble' Name
|
||||
'>' Operator
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,8 @@
|
||||
---input---
|
||||
fun `wo bble`
|
||||
|
||||
---tokens---
|
||||
'fun' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'`wo bble`' Name.Function
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,8 @@
|
||||
---input---
|
||||
fun `wo,-bble`
|
||||
|
||||
---tokens---
|
||||
'fun' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'`wo,-bble`' Name.Function
|
||||
'\n' Text.Whitespace
|
16
spec/tests/kotlin/test_can_cope_with_destructuring.txt
Normal file
16
spec/tests/kotlin/test_can_cope_with_destructuring.txt
Normal file
@ -0,0 +1,16 @@
|
||||
---input---
|
||||
val (a, b) =
|
||||
|
||||
---tokens---
|
||||
'val' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'(' Punctuation
|
||||
'a' Name.Variable
|
||||
',' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'b' Name.Variable
|
||||
')' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'\n' Text.Whitespace
|
34
spec/tests/kotlin/test_can_cope_with_generics.txt
Normal file
34
spec/tests/kotlin/test_can_cope_with_generics.txt
Normal file
@ -0,0 +1,34 @@
|
||||
---input---
|
||||
inline fun <reified T : ContractState> VaultService.queryBy(): Vault.Page<T> {
|
||||
|
||||
---tokens---
|
||||
'inline' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'fun' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'<' Operator
|
||||
'reified' Keyword
|
||||
' ' Text.Whitespace
|
||||
'T' Name
|
||||
' ' Text.Whitespace
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'ContractState' Name
|
||||
'>' Operator
|
||||
' ' Text.Whitespace
|
||||
'VaultService' Name
|
||||
'.' Punctuation
|
||||
'queryBy' Name.Function
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'Vault' Name
|
||||
'.' Punctuation
|
||||
'Page' Name.Attribute
|
||||
'<' Operator
|
||||
'T' Name
|
||||
'>' Operator
|
||||
' ' Text.Whitespace
|
||||
'{' Punctuation
|
||||
'\n' Text.Whitespace
|
18
spec/tests/kotlin/test_modifier_keyword.txt
Normal file
18
spec/tests/kotlin/test_modifier_keyword.txt
Normal file
@ -0,0 +1,18 @@
|
||||
---input---
|
||||
data class A(val data: String)
|
||||
|
||||
---tokens---
|
||||
'data' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'class' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'A' Name.Class
|
||||
'(' Punctuation
|
||||
'val' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'data' Name.Variable
|
||||
':' Punctuation
|
||||
' ' Text.Whitespace
|
||||
'String' Keyword.Type
|
||||
')' Punctuation
|
||||
'\n' Text.Whitespace
|
@ -0,0 +1,12 @@
|
||||
---input---
|
||||
"""
|
||||
this
|
||||
is
|
||||
a
|
||||
comment"""
|
||||
|
||||
---tokens---
|
||||
'"""' Literal.String
|
||||
'\nthis\nis\na\ncomment' Literal.String
|
||||
'"""' Literal.String
|
||||
'\n' Text.Whitespace
|
35
spec/tests/kotlin/test_string_interpolation.txt
Normal file
35
spec/tests/kotlin/test_string_interpolation.txt
Normal file
@ -0,0 +1,35 @@
|
||||
---input---
|
||||
val something = "something"
|
||||
"Here is $something"
|
||||
"Here is ${something.toUpperList()}"
|
||||
|
||||
---tokens---
|
||||
'val' Keyword.Declaration
|
||||
' ' Text.Whitespace
|
||||
'something' Name.Variable
|
||||
' ' Text.Whitespace
|
||||
'=' Operator
|
||||
' ' Text.Whitespace
|
||||
'"' Literal.String
|
||||
'something' Literal.String
|
||||
'"' Literal.String
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'"' Literal.String
|
||||
'Here is ' Literal.String
|
||||
'$' Literal.String.Interpol
|
||||
'something' Name
|
||||
'"' Literal.String
|
||||
'\n' Text.Whitespace
|
||||
|
||||
'"' Literal.String
|
||||
'Here is ' Literal.String
|
||||
'${' Literal.String.Interpol
|
||||
'something' Name
|
||||
'.' Punctuation
|
||||
'toUpperList' Name.Attribute
|
||||
'(' Punctuation
|
||||
')' Punctuation
|
||||
'}' Literal.String.Interpol
|
||||
'"' Literal.String
|
||||
'\n' Text.Whitespace
|
Reference in New Issue
Block a user