Skip to content

Commit

Permalink
Remove usage of deprecated * - syntax
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 committed Jun 15, 2021
1 parent b222fcf commit 5573dc6
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 5573dc6

Please sign in to comment.