We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I applied this change:
diff --git a/test/closed_intervals_test.exs b/test/closed_intervals_test.exs index 36f1c90..9348dbb 100644 --- a/test/closed_intervals_test.exs +++ b/test/closed_intervals_test.exs @@ -50,7 +50,7 @@ defmodule ClosedIntervalsTest do end test "get_interval" do - tree = from([1, 2, 3, 4]) + tree = from([1, 2, 3, 4], eq: &==/2) assert {1, 2} == get_interval(tree, 2) assert {1, 2} == get_interval(tree, 1.5) assert {2, 3} == get_interval(tree, 2.5)
It crashes:
$ mix test test/closed_intervals_test.exs:52 Excluding tags: [:test] Including tags: [line: "52"] 1) test default order get_interval (ClosedIntervalsTest) test/closed_intervals_test.exs:52 ** (CaseClauseError) no case clause matching: [{1, 2}, {2, 3}] code: assert {1, 2} == get_interval(tree, 2) stacktrace: (closed_intervals 0.5.0) lib/closed_intervals.ex:166: ClosedIntervals.get_interval/2 test/closed_intervals_test.exs:54: (test) Finished in 0.1 seconds (0.00s async, 0.1s sync) 11 doctests, 2 properties, 6 tests, 1 failure, 18 excluded Randomized with seed 659730
I find that surprising since this is the most straightforward equality function I can think of. Found while working at a PR for #15
The text was updated successfully, but these errors were encountered:
Interesting. This crashes because the interval for 2 is not unique. Maybe this should be signaled instead of crashing.
2
Sorry, something went wrong.
No branches or pull requests
I applied this change:
It crashes:
I find that surprising since this is the most straightforward equality function I can think of. Found while working at a PR for #15
The text was updated successfully, but these errors were encountered: