File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
compiler/test/dotty/tools/dotc/reporting Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,23 @@ class CodeActionTest extends DottyTest:
119119 afterPhase = " patternMatcher"
120120 )
121121
122+ @ Test def insertMissingCasesUsingBracelessSyntax =
123+ checkCodeAction(
124+ code =
125+ """ object Test:
126+ | def foo(text: 1 | 2) = text match
127+ | case 2 => ???
128+ |""" .stripMargin,
129+ title = " Insert missing cases (1)" ,
130+ expected =
131+ """ object Test:
132+ | def foo(text: 1 | 2) = text match
133+ | case 2 => ???
134+ | case 1 => ???
135+ |""" .stripMargin,
136+ afterPhase = " patternMatcher"
137+ )
138+
122139 // Make sure we're not using the default reporter, which is the ConsoleReporter,
123140 // meaning they will get reported in the test run and that's it.
124141 private def newContext =
You can’t perform that action at this time.
0 commit comments