-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add functional test for qualifying issue #1
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(tests | ||
(names testrange) | ||
(libraries oUnit range) | ||
(action (run %{test}))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
open OUnit2 | ||
open Base | ||
|
||
|
||
let equality_tests = | ||
[ | ||
("Issue #1 : Modified range can be equal to a natural one" >:: fun _ctxt -> | ||
let data_a = Range.from 3 6 in | ||
let data_b = Range.from 2 5 |> Range.map Int.succ in | ||
assert_bool "equality failed" (Range.equal data_a data_b) | ||
) | ||
] | ||
|
||
let non_reg_tests = [ | ||
equality_tests | ||
] |> List.concat | ||
|
||
|
||
let () = | ||
"Range non regression bug testing" >::: non_reg_tests |> run_test_tt_main |