Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use (number | IntervalBounds) for specifying unittests (#2456)
* Use (number | IntervalBounds) for specifying unittests This allows tests that only need a point value to be listed as `1` instead of `[1]`. This helps readability, especially for tests where there are arrays of values, i.e. (number | IntervalBounds)[], since [[1], [2], ...], can be written as [1, 2, ...] This require changing the signatures of toVector and toMatrix (and related functions) to support mixed arrays, i.e. (number | IntervalBounds)[] instead of number[] | IntervalBuilder[], which honestly is just more ergonomic, and the code already supported it. Some tests that were calling the F32Interval constructor directly have been flipped to using `toInterval`, since they are not testing the constructor and that is the preferred pattern. A bunch of documentation lines in the test file have been re-formatted to be 80 cols, which I think is easier to read, since this PR is all about readability/ergonomics anyway. I was not super consistent about line length when writing the tests originally. Issue #2416 Fixes #2254
- Loading branch information