Bump all spec releases for mass rebuild to mingw32-gcc 4.4
[fedora-mingw.git] / ocaml-calendar / test_timezone.ml
1 (*i $Id: test_timezone.ml,v 1.8 2008/02/08 10:36:14 signoles Exp $ i*)
2
3 Printf.printf "Tests of Time_Zone:\n";;
4
5 open CalendarLib
6 open Time_Zone;;
7 include Gen_test;;
8 reset ();;
9
10 test (current () = UTC) "current () = UTC";;
11 change Local;;
12 test (current () = Local) "current () = Local";;
13 test (gap UTC (UTC_Plus (-5)) = -5) "gap UTC (UTC_Plus (-5)) = -5";;
14 let g6 = UTC_Plus 6;;
15 test 
16   (gap g6 Local = gap g6 UTC + gap UTC Local)
17   "gap g6 Local = gap g6 UTC + gap UTC Local";;
18 test_exn (lazy (change (UTC_Plus 13))) "change 13";;
19 test_exn (lazy (change (UTC_Plus (-15)))) "change (-15)";;
20 change (UTC_Plus 4);;
21 test (from_gmt () = 4) "from_gmt () = 4";;
22 test (to_gmt () = -4) "to_gmt () = -4";;
23
24 let ok = nb_ok ();;
25 let bug = nb_bug ();;
26 Printf.printf "tests ok : %d; tests ko : %d\n" ok bug;;
27 flush stdout;;