-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bounds and warning checks to test case generators (#99068)
This expands on Nik's work to centralize test case generation. In order to avoid needing to write extremely specific oracle functions, which can degenerate into re-implementations of the code under test, we adapt the data generation functions to accept a range of values, and optionally a collection of expected warnings. This will let test writers define tests in terms of ranges where we expect specific behavior (e.g. sqrt can define one test that expects null for all negative values, and another that expects square roots for only positive values).
- Loading branch information
1 parent
3284903
commit b105b4a
Showing
69 changed files
with
1,329 additions
and
788 deletions.
There are no files selected for viewing
467 changes: 46 additions & 421 deletions
467
.../test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java
Large diffs are not rendered by default.
Oops, something went wrong.
590 changes: 590 additions & 0 deletions
590
...esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/TestCaseSupplier.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.