DatasetRepo's picture
Upload folder using huggingface_hub (#1)
0a33073 verified
module Main = struct
open OUnit2
(* Program start *)
(* Program end *)
(* Test cases *)
let test1 _ = assert_equal 2 (minimumBoxes [1;3;2] [4;3;1;5;2])
let test2 _ = assert_equal 4 (minimumBoxes [5;5;5] [2;4;2;7])
let test3 _ = assert_equal 6 (minimumBoxes [12; 39; 47; 10; 21; 26; 7; 50] [49; 43; 35; 30; 29; 28; 24; 7])
let test4 _ = assert_equal 6 (minimumBoxes [35; 48; 40; 16; 43; 36; 41; 4] [46; 45; 45; 44; 43; 40; 38; 38; 36; 34; 34; 33; 30; 29; 28; 26; 25; 24; 22; 22; 19; 18; 17; 7; 2; 2; 2; 1])
let test5 _ = assert_equal 21 (minimumBoxes [18; 45; 11; 47; 26; 2; 39; 48; 43; 16; 4; 17; 48; 44; 2; 21; 41; 40; 17; 29; 35; 23; 45; 30; 31; 34; 39] [205; 50; 45; 45; 45; 42; 39; 37; 35; 35; 31; 27; 26; 24; 24; 21; 21; 15; 14; 8; 6])
let test6 _ = assert_equal 16 (minimumBoxes [46; 5; 6; 15; 47; 20; 16; 19; 42; 44; 44; 28; 28; 19; 16; 26; 47; 12; 39; 40; 25; 25; 48; 3; 17; 6; 21; 22; 20; 2; 50; 50; 26; 26; 41; 5; 9; 31; 19; 40; 26] [719; 50; 49; 41; 31; 28; 28; 23; 22; 20; 15; 11; 11; 10; 8; 5])
let test7 _ = assert_equal 13 (minimumBoxes [14; 12; 1; 27; 27; 29; 14; 12; 7; 6; 8; 42; 34; 42; 44; 46; 27; 49; 36; 24] [163; 46; 44; 44; 40; 37; 35; 34; 25; 12; 9; 8; 4])
let test8 _ = assert_equal 8 (minimumBoxes [28; 3; 15; 44; 49; 25; 11; 50; 32; 2] [43; 39; 37; 36; 35; 35; 33; 32; 28; 25; 20; 16; 16; 6; 3; 2])
let test9 _ = assert_equal 4 (minimumBoxes [38; 42; 47; 16; 36] [50; 49; 48; 47; 47; 47; 44; 44; 42; 38; 36; 35; 35; 34; 34; 33; 31; 29; 29; 26; 26; 23; 19; 19; 18; 15; 14; 14; 13; 12; 12; 11; 8; 7; 7; 5; 4; 1; 1])
let test10 _ = assert_equal 19 (minimumBoxes [44; 26; 43; 38; 50; 35; 36; 44; 25; 39; 16; 14; 26; 12; 3; 45; 21; 1; 4; 8; 35; 2; 33; 30; 9; 26; 20; 16; 14; 24; 43; 7] [271; 46; 42; 40; 40; 40; 39; 38; 36; 34; 28; 28; 27; 23; 19; 13; 11; 8; 6])
(* Grouping test cases *)
let suite = "Test Suite for minimumBoxes" >::: [
"test1" >:: test1;
"test2" >:: test2;
"test3" >:: test3;
"test4" >:: test4;
"test5" >:: test5;
"test6" >:: test6;
"test7" >:: test7;
"test8" >:: test8;
"test9" >:: test9;
"test10" >:: test10;
]
(* Running the tests *)
let () = run_test_tt_main suite
end