2015-08-10 01:35:47 +02:00
|
|
|
open OUnit2
|
|
|
|
|
|
|
|
|
2016-02-28 23:41:06 +01:00
|
|
|
let test_signed _ =
|
2015-08-10 01:35:47 +02:00
|
|
|
let n = 0xFA in
|
2016-02-28 23:25:19 +01:00
|
|
|
let s = Bit.signed_byte n in
|
2015-08-10 01:35:47 +02:00
|
|
|
assert_equal s (-6)
|
|
|
|
|
|
|
|
|
|
|
|
(* Name the test cases and group them together *)
|
|
|
|
let suite =
|
|
|
|
"suite">:::
|
|
|
|
[
|
|
|
|
"test signed">:: test_signed
|
|
|
|
]
|
|
|
|
|
|
|
|
let () =
|
|
|
|
run_test_tt_main suite
|