Sha256: 10d5994849a7ea962b5ab4d0cb05bc8f29d89c09bda06b1323490ce998635bfc
Contents?: true
Size: 1.29 KB
Versions: 150
Compression:
Stored size: 1.29 KB
Contents
(* Test/exercise version: "1.0.0" *) open Core open OUnit2 open Roman_numerals let ae expected actual _ctx = assert_equal ~printer:Fn.id expected actual let tests = [ "1 is a single I" >:: ae "I" (to_roman 1); "2 is two I's" >:: ae "II" (to_roman 2); "3 is three I's" >:: ae "III" (to_roman 3); "4, being 5 - 1, is IV" >:: ae "IV" (to_roman 4); "5 is a single V" >:: ae "V" (to_roman 5); "6, being 5 + 1, is VI" >:: ae "VI" (to_roman 6); "9, being 10 - 1, is IX" >:: ae "IX" (to_roman 9); "20 is two X's" >:: ae "XXVII" (to_roman 27); "48 is not 50 - 2 but rather 40 + 8" >:: ae "XLVIII" (to_roman 48); "50 is a single L" >:: ae "LIX" (to_roman 59); "90, being 100 - 10, is XC" >:: ae "XCIII" (to_roman 93); "100 is a single C" >:: ae "CXLI" (to_roman 141); "60, being 50 + 10, is LX" >:: ae "CLXIII" (to_roman 163); "400, being 500 - 100, is CD" >:: ae "CDII" (to_roman 402); "500 is a single D" >:: ae "DLXXV" (to_roman 575); "900, being 1000 - 100, is CM" >:: ae "CMXI" (to_roman 911); "1000 is a single M" >:: ae "MXXIV" (to_roman 1024); "3000 is three M's" >:: ae "MMM" (to_roman 3000); ] let () = run_test_tt_main ("roman-numerals test" >::: tests)
Version data entries
150 entries across 150 versions & 1 rubygems