Skip to content

Commit

Permalink
add functional test for qualifying issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
aldrikfr committed Nov 21, 2019
1 parent dfda29c commit bd07154
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(tests
(names testrange)
(libraries oUnit range)
(action (run %{test})))
20 changes: 20 additions & 0 deletions test/testrange.ml
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

0 comments on commit bd07154

Please sign in to comment.