Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In preparation for adding nanosecond date support to date diff, this PR expands the test coverage and better integrates with the test generation framework. Using random data for date diff is extremely difficult, due to the vast range of units and the constraints of the integer return type. For example, nanosecond resolution differences of more than a couple of seconds will overflow the return value. So, instead of using a fully randomized dataset, I took the existing data set we were running against just the processing function, and formalized that to run against the whole test suite. It should be easy from here to add in cases for the same values as nanoseconds.
I was able to integrate the overflow error case into the normal test framework, but the incorrect unit error doesn't play nicely with the framework (I believe this is because it fails in
toEvaluator
rather than inprocess
, but I didn't dig in much). I've moved it to another test file so we don't run it for every case in the parameterized test file.