Skip to content

Commit

Permalink
Updates conformance tests and enables easier conformance debugging (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
johnedquinn authored May 28, 2024
1 parent 07d8d46 commit c53be04
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ class EvalExecutor(
if (actual is PartiQLResult.Value && expect is PartiQLResult.Value) {
return valueComparison(actual.value, expect.value)
}
error("Cannot compare different types of PartiQLResult")
val errorMessage = buildString {
appendLine("Cannot compare different types of PartiQLResult.")
appendLine(" - Expected : $expect")
appendLine(" - Actual : $actual")
}
error(errorMessage)
}

// Value comparison of PartiQL Value that utilized Ion Hashcode.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TestRunner<T, V>(private val factory: TestExecutor.Factory<T, V>) {
}
} catch (e: Exception) {
when (case.assertion) {
is Assertion.EvaluationSuccess -> error("Expected success but exception thrown: $e")
is Assertion.EvaluationSuccess -> throw IllegalStateException("Expected success but exception thrown.", e)
is Assertion.EvaluationFailure -> {} // skip
}
}
Expand Down

0 comments on commit c53be04

Please sign in to comment.