Skip to content
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

Merged
merged 5 commits into from
Sep 26, 2022

Conversation

alancai98
Copy link
Member

@alancai98 alancai98 commented Sep 17, 2022

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 from partiql-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:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

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
Copy link
Member Author

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

@alancai98 alancai98 marked this pull request as ready for review September 21, 2022 00:37
am357
am357 previously approved these changes Sep 22, 2022
Copy link
Contributor

@am357 am357 left a 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.

partiql-tests-kotlin-test-runner/README.md Outdated Show resolved Hide resolved
}

// typed nulls
if (!left.isMissing() && !right.isMissing() && (left.isNullValue || right.isNullValue)) {
Copy link
Contributor

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.

@alancai98
Copy link
Member Author

After discussing with Josh, it makes sense to move the Kotlin test runner to partiql-lang-kotlin (#36). In an upcoming PR I will remove the Kotlin test runner gradle module from this repo and create a separate PR to add it to partiql-lang-kotlin.

jpschorr
jpschorr previously approved these changes Sep 23, 2022
@alancai98 alancai98 dismissed stale reviews from jpschorr and am357 via 58204d9 September 23, 2022 23:25
@alancai98 alancai98 merged commit 066da8f into partiql:main Sep 26, 2022
@alancai98 alancai98 deleted the add-kotlin-test-runner branch September 26, 2022 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants