Skip to content

Commit

Permalink
Remove usage of deprecated * - syntax (#253)
Browse files Browse the repository at this point in the history
This syntax doesn't compile with `-Xsource:3` and thus prevents us from
running utest in the Scala 2 community build with this flag
enabled (scala/scala-dev#769).
  • Loading branch information
smarter authored Oct 6, 2021
1 parent 9090d45 commit 71ffa5e
Showing 1 changed file with 36 additions and 30 deletions.
66 changes: 36 additions & 30 deletions utest/test/src-2/test/utest/AssertsTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,46 @@ object AssertsTestsVersionSpecific extends utest.TestSuite{
test("failure"){
// Use compileError to check itself to verify that when it
// doesn't throw an error, it actually does (super meta!)
* - compileError("""
compileError("1 + 1").check(
test("1") {
compileError("""
compileError("1 + 1").check(
""
)
""").check(
"""
compileError("1 + 1").check(
^
""",
"compileError check failed to have a compilation error"
)
}
test("2") {
compileError("""
val x = 0
compileError("x + x").check(
""
)
""").check(
"""
compileError("1 + 1").check(
^
""",
"compileError check failed to have a compilation error"
)
* - compileError("""
val x = 0
compileError("x + x").check(
""
""").check(
"""
compileError("x + x").check(
^
""",
"compileError check failed to have a compilation error"
)
}
test("3") {
compileError("""
compileError("1" * 2).check(
""
)
""").check(
"""
compileError("x + x").check(
^
""",
"compileError check failed to have a compilation error"
)
* - compileError("""
compileError("1" * 2).check(
""
)
""").check(
"""
compileError("1" * 2).check(
^
""",
"You can only have literal strings in compileError"
)
"""
compileError("1" * 2).check(
^
""",
"You can only have literal strings in compileError"
)
}

}
test("compileTimeOnly"){
Expand Down

0 comments on commit 71ffa5e

Please sign in to comment.