File tree 1 file changed +36
-0
lines changed
compiler/test/dotty/tools/dotc/printing
1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -138,5 +138,41 @@ class SyntaxHighlightingTests extends DottyTest {
138
138
test(" val inline = 2" , " <K|val> <V|inline> = <L|2>" )
139
139
test(" def inline = 2" , " <K|def> <V|inline> = <L|2>" )
140
140
test(" def foo(inline: Int) = 2" , " <K|def> <V|foo>(<V|inline>: <T|Int>) = <L|2>" )
141
+ test(
142
+ """ enum Foo:
143
+ | case foo
144
+ |end Foo""" .stripMargin,
145
+ """ <K|enum> <T|Foo>:
146
+ | <K|case> <T|foo>
147
+ |<K|end> <T|Foo>""" .stripMargin
148
+ )
149
+ test(
150
+ """ class Foo:
151
+ |end Foo""" .stripMargin,
152
+ """ <K|class> <T|Foo>:
153
+ |<K|end> <T|Foo>""" .stripMargin
154
+ )
155
+ test(
156
+ """ object Foo:
157
+ |end Foo""" .stripMargin,
158
+ """ <K|object> <T|Foo>:
159
+ |<K|end> <T|Foo>""" .stripMargin
160
+ )
161
+ test(
162
+ """ def foo =
163
+ | ()
164
+ |end foo""" .stripMargin,
165
+ """ <K|def> <V|foo> =
166
+ | ()
167
+ |<K|end> <V|foo>""" .stripMargin
168
+ )
169
+ test(
170
+ """ val foo =
171
+ | ()
172
+ |end foo""" .stripMargin,
173
+ """ <K|val> <V|foo> =
174
+ | ()
175
+ |<K|end> <V|foo>""" .stripMargin
176
+ )
141
177
}
142
178
}
You can’t perform that action at this time.
0 commit comments