Skip to content

Commit 87db32f

Browse files
committed
Add snippet compiler reporting tests
1 parent 39e7fec commit 87db32f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package tests
2+
3+
package snippetTestcase3
4+
5+
class SnippetTestcase3:
6+
/** Text on line 0.
7+
*
8+
* SNIPPET(OUTERLINEOFFSET:11,OUTERCOLUMNOFFSET:6,INNERLINEOFFSET:5,INNERCOLUMNOFFSET:2)
9+
* ERROR(LINE:11,COLUMN:8)
10+
* ```scala sc:fail
11+
* 2 + List()
12+
* ```
13+
*/
14+
def a = 3
15+
/**
16+
* Text on line 1.
17+
*
18+
* SNIPPET(OUTERLINEOFFSET:21,OUTERCOLUMNOFFSET:6,INNERLINEOFFSET:5,INNERCOLUMNOFFSET:2)
19+
* ERROR(LINE:21,COLUMN:8)
20+
* ```scala sc:fail
21+
* 2 + List()
22+
* ```
23+
*/
24+
def b = 3
25+
/**
26+
*
27+
* Text on line 2.
28+
*
29+
* SNIPPET(OUTERLINEOFFSET:32,OUTERCOLUMNOFFSET:6,INNERLINEOFFSET:5,INNERCOLUMNOFFSET:2)
30+
* ERROR(LINE:32,COLUMN:8)
31+
* ```scala sc:fail
32+
* 2 + List()
33+
* ```
34+
*/
35+
def c = 3

scaladoc/test/dotty/tools/scaladoc/snippets/SnippetsE2eTestcases.scala

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ class SnippetE2eTestcase1 extends SnippetsE2eTest("snippetTestcase1", SCFlags.Co
66

77
class SnippetE2eTestcase2 extends SnippetsE2eTest("snippetTestcase2", SCFlags.Compile)
88

9+
10+
class SnippetE2eTestcase3 extends SnippetsE2eTest("snippetTestcase3", SCFlags.Compile)

0 commit comments

Comments
 (0)