-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds Kotlin test runner to verify ported tests are ported correctly #34
Conversation
...ql-tests-kotlin-test-runner/src/test/kotlin/org/partiql/tests/kotlintestrunner/TestRunner.kt
Show resolved
Hide resolved
sealed class Assertion { | ||
data class EvaluationSuccess(val expectedResult: IonValue) : Assertion() | ||
object EvaluationFailure : Assertion() | ||
// TODO: other assertion and test categories: https://github.com/partiql/partiql-tests/issues/35 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the test runner came out of discussion related to evaluation tests, I decided to only test the evaluation and evaluation equivalence tests in this PR. Other test categories will be added in a future PR as part of #35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM—some minor comments which I don't see a blocker to merge.
Thanks for taking on the follow-up action promptly.
...ql-tests-kotlin-test-runner/src/test/kotlin/org/partiql/tests/kotlintestrunner/TestRunner.kt
Show resolved
Hide resolved
partiql-tests-kotlin-test-runner/src/test/kotlin/org/partiql/tests/kotlintestrunner/Parse.kt
Show resolved
Hide resolved
...lin-test-runner/src/test/kotlin/org/partiql/tests/kotlintestrunner/PartiQLEqualityChecker.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
// typed nulls | ||
if (!left.isMissing() && !right.isMissing() && (left.isNullValue || right.isNullValue)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: The long if could be moved to a function for better readability.
After discussing with Josh, it makes sense to move the Kotlin test runner to |
Issue #, if available: #33.
Adds a Kotlin test runner to verify that the ported evaluation and evaluation equivalence tests are ported correctly using
partiql-lang-kotlin
's evaluator. This should help us verify the evaluation tests are ported correctly frompartiql-lang-kotlin
and help speed up the future review process for those PRs.Found a few mistakes in about 8 existing tests. Also went through and identified about ~60 tests that the
partiql-lang-kotlin
implementation diverges from the defined conformance tests (see this review comment for further discussion).Future work:
partiql-lang-kotlin
's evaluation tests are all ported topartiql-tests
): Create apartiql-tests
Test Runner and replace duplicated tests partiql-lang-kotlin#789By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.