| module Main = struct | |
| open OUnit2 | |
| (* Program start *) | |
| let returnToBoundaryCount (nums: int list) : int = failwith "Not implemented" | |
| (* Program end *) | |
| (* Test cases *) | |
| let test1 _ = assert_equal 1 (returnToBoundaryCount [2;3;-5]) | |
| let test2 _ = assert_equal 0 (returnToBoundaryCount [3;2;-3;-4]) | |
| let test3 _ = assert_equal 0 (returnToBoundaryCount [-10; 9; -10; 10; 1; -8; 5; 9; -7; -9; 2; -8; -1; -5; -7; 7; -5; -2; -3; 9; -9; -9; 9; -3; -7; -6; -9; -7; 0; 4; -1; -10; 0; 8; 8; -7; -1; 3; 8; -3; -1; -6]) | |
| let test4 _ = assert_equal 0 (returnToBoundaryCount [-6; 0; 7; -4; -2; 5; 3; 4; 3; -7; 4; -6; 7; 8; -1; 5; 1; 10; -7; -6; 1; -5; 3; 8; -6; 5; -8; 10; -4; 3; -10; -3; -1; 10; 9; 10; -9; 10; -3; -3; -6; 0; 7; 4; 2; 0; 7; 2; -6]) | |
| let test5 _ = assert_equal 0 (returnToBoundaryCount [-2; 5; 1; -2; 7; -6; 6; 2; -2; -10; 10; 8; -3; 6]) | |
| let test6 _ = assert_equal 0 (returnToBoundaryCount [-2; -7; -7; -10; -10]) | |
| let test7 _ = assert_equal 0 (returnToBoundaryCount [-10; -9; 0]) | |
| (* Grouping test cases *) | |
| let suite = "Test Suite for returnToBoundaryCount" >::: [ | |
| "test1" >:: test1; | |
| "test2" >:: test2; | |
| "test3" >:: test3; | |
| "test4" >:: test4; | |
| "test5" >:: test5; | |
| "test6" >:: test6; | |
| "test7" >:: test7; | |
| ] | |
| (* Running the tests *) | |
| let () = run_test_tt_main suite | |
| end | |