@@ -23,7 +23,9 @@ class SyntaxHighlightingTests extends DottyTest {
23
23
24
24
if (expected != highlighted) {
25
25
// assertEquals produces weird expected/found message
26
- fail(s " expected: $expected but was: $highlighted" )
26
+ fail(s """ |
27
+ |expected: $expected
28
+ |highlighted: $highlighted""" .stripMargin)
27
29
}
28
30
}
29
31
@@ -41,6 +43,8 @@ class SyntaxHighlightingTests extends DottyTest {
41
43
test(" type Foo = Int" , " <K|type> <T|Foo> = <T|Int>" )
42
44
test(" type A = String | Int" , " <K|type> <T|A> = <T|String> <T||> <T|Int>" )
43
45
test(" type B = String & Int" , " <K|type> <T|B> = <T|String> <T|&> <T|Int>" )
46
+ test(" type Id[A] = A" , " <K|type> <T|Id>[<T|A>] = <T|A>" )
47
+ test(" type Foo = [X] =>> List[X]" , " <K|type> <T|Foo> = [<T|X>] =>> <T|List>[<T|X>]" )
44
48
}
45
49
46
50
@ Test
@@ -88,6 +92,10 @@ class SyntaxHighlightingTests extends DottyTest {
88
92
test(" val foo" , " <K|val> <V|foo>" )
89
93
test(" val foo =" , " <K|val> <V|foo> =" )
90
94
test(" val foo = 123" , " <K|val> <V|foo> = <L|123>" )
95
+ test(
96
+ " val foo: List[List[Int]] = List(List(1))" ,
97
+ " <K|val> <V|foo>: <T|List>[<T|List>[<T|Int>]] = List(List(<L|1>))"
98
+ )
91
99
92
100
test(" var" , " <K|var>" )
93
101
test(" var foo" , " <K|var> <V|foo>" )
@@ -111,7 +119,7 @@ class SyntaxHighlightingTests extends DottyTest {
111
119
test(" def f1(x: Int) = 123" , " <K|def> <V|f1>(<V|x>: <T|Int>) = <L|123>" )
112
120
test(" def f2[T](x: T) = { 123 }" , " <K|def> <V|f2>[<T|T>](<V|x>: <T|T>) = { <L|123> }" )
113
121
114
- test(" def f3[T[_" , " <K|def> <V|f3>[<T|T>[<T|_> " )
122
+ test(" def f3[T[_" , " <K|def> <V|f3>[<T|T>[_ " )
115
123
}
116
124
117
125
@ Test
0 commit comments