Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7eaf07a

Browse files
committed
Adapt test cases
1 parent 48c4322 commit 7eaf07a

10 files changed

+35
-26
lines changed
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
//> using options -Xmagic-offset-header:///TEST_MARKER
2-
val t1 = 1
3-
val t2 = 2
4-
val t3 = 3
5-
///TEST_MARKER
1+
62
def test1(): Int = "无穷" // error

‎tests/neg/magic-offset-header-a.check‎ renamed to ‎tests/neg/magic-offset-header-a_wrapper.check‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
-- [E007] Type Mismatch Error: tests/neg/magic-offset-header-a.scala:6:19 ----------------------------------------------
2-
1 |def test1(): Int = "无穷" // error
1+
-- [E007] Type Mismatch Error: tests/neg/magic-offset-header-a.scala:2:19 ----------------------------------------------
2+
2 |def test1(): Int = "无穷" // error
33
| ^^^^
44
| Found: ("无穷" : String)
55
| Required: Int
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//> using options -Ymagic-offset-header:TEST_MARKER
2+
val t1 = 1
3+
val t2 = 2
4+
val t3 = 3
5+
///TEST_MARKER:tests/neg/magic-offset-header-a.scala
6+
7+
def test1(): Int = "无穷" // anypos-error
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
1-
//> using options -Xmagic-offset-header:///TEST_MARKER
2-
3-
def x: Int = true // error
4-
5-
///TEST_MARKER
61

72
def y: Int = false // error

‎tests/neg/magic-offset-header-b.check‎ renamed to ‎tests/neg/magic-offset-header-b_wrapper.check‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
-- [E007] Type Mismatch Error: tests/neg/magic-offset-header-b.scala:3:13 ----------------------------------------------
1+
-- [E007] Type Mismatch Error: tests/neg/magic-offset-header-b_wrapper.scala:3:13 --------------------------------------
22
3 |def x: Int = true // error
33
| ^^^^
44
| Found: (true : Boolean)
55
| Required: Int
66
|
77
| longer explanation available when compiling with `-explain`
8-
-- [E007] Type Mismatch Error: tests/neg/magic-offset-header-b.scala:7:13 ----------------------------------------------
8+
-- [E007] Type Mismatch Error: tests/neg/magic-offset-header-b.scala:2:13 ----------------------------------------------
99
2 |def y: Int = false // error
1010
| ^^^^^
1111
| Found: (false : Boolean)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//> using options -Ymagic-offset-header:TEST_MARKER
2+
3+
def x: Int = true // error
4+
5+
///TEST_MARKER:tests/neg/magic-offset-header-b.scala
6+
7+
def y: Int = false // anypos-error

‎tests/neg/magic-offset-header-c.check‎

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
//> using options -Xmagic-offset-header:///SOURCE_CODE_START_MARKER
2-
3-
val generatedCode = 123
4-
5-
///SOURCE_CODE_START_MARKER
61

72
def userCode =
83
val x: String = 0 // error
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
bad option '-Xmagic-offset-header:SOURCE_CODE_START_MARKER' was ignored
2+
-- [E007] Type Mismatch Error: tests/neg/magic-offset-header-c_wrapper.scala:8:18 --------------------------------------
3+
8 | val x: String = 0 // anypos-error
4+
| ^
5+
| Found: (0 : Int)
6+
| Required: String
7+
|
8+
| longer explanation available when compiling with `-explain`
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//> using options -Xmagic-offset-header:SOURCE_CODE_START_MARKER
2+
3+
val generatedCode = 123
4+
5+
///SOURCE_CODE_START_MARKER:tests/neg/magic-offset-header-c.scala
6+
7+
def userCode =
8+
val x: String = 0 // anypos-error

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /