Skip to content

Commit c53be04

Browse files
authored
Updates conformance tests and enables easier conformance debugging (#1470)
1 parent 07d8d46 commit c53be04

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/executor/EvalExecutor.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ class EvalExecutor(
6464
if (actual is PartiQLResult.Value && expect is PartiQLResult.Value) {
6565
return valueComparison(actual.value, expect.value)
6666
}
67-
error("Cannot compare different types of PartiQLResult")
67+
val errorMessage = buildString {
68+
appendLine("Cannot compare different types of PartiQLResult.")
69+
appendLine(" - Expected : $expect")
70+
appendLine(" - Actual : $actual")
71+
}
72+
error(errorMessage)
6873
}
6974

7075
// Value comparison of PartiQL Value that utilized Ion Hashcode.

test/partiql-tests-runner/src/test/kotlin/org/partiql/runner/test/TestRunner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TestRunner<T, V>(private val factory: TestExecutor.Factory<T, V>) {
4646
}
4747
} catch (e: Exception) {
4848
when (case.assertion) {
49-
is Assertion.EvaluationSuccess -> error("Expected success but exception thrown: $e")
49+
is Assertion.EvaluationSuccess -> throw IllegalStateException("Expected success but exception thrown.", e)
5050
is Assertion.EvaluationFailure -> {} // skip
5151
}
5252
}

0 commit comments

Comments
 (0)