@@ -23,7 +23,9 @@ class SyntaxHighlightingTests extends DottyTest {
2323
2424 if (expected != highlighted) {
2525 // assertEquals produces weird expected/found message
26- fail(s " expected: $expected but was: $highlighted" )
26+ fail(s """ |
27+ |expected: $expected
28+ |highlighted: $highlighted""" .stripMargin)
2729 }
2830 }
2931
@@ -41,6 +43,8 @@ class SyntaxHighlightingTests extends DottyTest {
4143 test(" type Foo = Int" , " <K|type> <T|Foo> = <T|Int>" )
4244 test(" type A = String | Int" , " <K|type> <T|A> = <T|String> <T||> <T|Int>" )
4345 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>]" )
4448 }
4549
4650 @ Test
@@ -88,6 +92,10 @@ class SyntaxHighlightingTests extends DottyTest {
8892 test(" val foo" , " <K|val> <V|foo>" )
8993 test(" val foo =" , " <K|val> <V|foo> =" )
9094 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+ )
9199
92100 test(" var" , " <K|var>" )
93101 test(" var foo" , " <K|var> <V|foo>" )
@@ -111,7 +119,7 @@ class SyntaxHighlightingTests extends DottyTest {
111119 test(" def f1(x: Int) = 123" , " <K|def> <V|f1>(<V|x>: <T|Int>) = <L|123>" )
112120 test(" def f2[T](x: T) = { 123 }" , " <K|def> <V|f2>[<T|T>](<V|x>: <T|T>) = { <L|123> }" )
113121
114- test(" def f3[T[_" , " <K|def> <V|f3>[<T|T>[<T|_> " )
122+ test(" def f3[T[_" , " <K|def> <V|f3>[<T|T>[_ " )
115123 }
116124
117125 @ Test
0 commit comments