llvm.org GIT mirror llvm / 4468440
Don't send checkpoints to stderr for the vmcore.ml test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52218 91177308-0d34-0410-b5e6-96231b3b80d8 Gordon Henriksen 12 years ago
1 changed file(s) with 20 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
1212
1313 (* Tiny unit test framework - really just to help find which line is busted *)
1414 let exit_status = ref 0
15 let suite_name = ref ""
16 let group_name = ref ""
1517 let case_num = ref 0
18 let print_checkpoints = false
1619
1720 let group name =
21 group_name := !suite_name ^ "/" ^ name;
1822 case_num := 0;
19 prerr_endline (" " ^ name ^ "...")
23 if print_checkpoints then
24 prerr_endline (" " ^ name ^ "...")
2025
2126 let insist cond =
2227 incr case_num;
23 if not cond then exit_status := 10;
24 prerr_endline (" " ^ (string_of_int !case_num) ^ if cond then ""
25 else " FAIL")
28 if not cond then
29 exit_status := 10;
30 match print_checkpoints, cond with
31 | false, true -> ()
32 | false, false ->
33 prerr_endline ("FAILED: " ^ !suite_name ^ "/" ^ !group_name ^ " #" ^ (string_of_int !case_num))
34 | true, true ->
35 prerr_endline (" " ^ (string_of_int !case_num))
36 | true, false ->
37 prerr_endline (" " ^ (string_of_int !case_num) ^ " FAIL")
2638
2739 let suite name f =
28 prerr_endline (name ^ ":");
40 suite_name := name;
41 if print_checkpoints then
42 prerr_endline (name ^ ":");
2943 f ()
3044
3145
244258 ignore (define_global "Const08" c m);
245259 insist ((vector_type i16_type 8) = (type_of c));
246260
247 (* RUN: grep {Const09.*\{ i16, i16, i32, i32 \} \{} < %t.ll
261 (* RUN: grep {Const09.*. i16, i16, i32, i32 . .} < %t.ll
248262 *)
249263 group "structure";
250264 let c = const_struct [| one; two; three; four |] in