Fix scripting testdata for changed diagnostics in K2
This commit is contained in:
committed by
Space Team
parent
8a10070772
commit
a182c907bc
+2
-2
@@ -28,10 +28,10 @@ class ResolveTest {
|
||||
val res = evalFile(File("testData/hello-unresolved-junit.scriptwithdeps.kts"))
|
||||
|
||||
Assert.assertTrue(
|
||||
"test failed - expecting a failure with the message \"Unresolved reference: junit\" but received " +
|
||||
"test failed - expecting a failure with the message \"Unresolved reference 'junit'\" but received " +
|
||||
(if (res is ResultWithDiagnostics.Failure) "failure" else "success") +
|
||||
":\n ${res.reports.joinToString("\n ") { it.message + if (it.exception == null) "" else ": ${it.exception}" }}",
|
||||
res is ResultWithDiagnostics.Failure && res.reports.any { it.message.contains("Unresolved reference: junit") })
|
||||
res is ResultWithDiagnostics.Failure && res.reports.any { it.message.contains("Unresolved reference 'junit'.") })
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+2
-2
@@ -28,9 +28,9 @@ class SimpleTest {
|
||||
val res = evalFile(File("testData/error.simplescript.kts"))
|
||||
|
||||
Assert.assertTrue(
|
||||
"test failed - expecting a failure with the message \"Unresolved reference: abracadabra\" but received " +
|
||||
"test failed - expecting a failure with the message \"Unresolved reference 'abracadabra'.\" but received " +
|
||||
(if (res is ResultWithDiagnostics.Failure) "failure" else "success") +
|
||||
":\n ${res.reports.joinToString("\n ") { it.message + if (it.exception == null) "" else ": ${it.exception}" }}",
|
||||
res is ResultWithDiagnostics.Failure && res.reports.any { it.message.contains("Unresolved reference: abracadabra") })
|
||||
res is ResultWithDiagnostics.Failure && res.reports.any { it.message.contains("Unresolved reference 'abracadabra'.") })
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -110,7 +110,7 @@ class MainKtsTest {
|
||||
@Test
|
||||
fun testUnresolvedJunit() {
|
||||
val res = evalFile(File("$TEST_DATA_ROOT/hello-unresolved-junit.main.kts"))
|
||||
assertFailed("Unresolved reference: junit", res)
|
||||
assertFailed("Unresolved reference 'junit'.", res)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user