File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 1010
1111(test
1212 (name test_simple)
13- (libraries dscheck)
13+ (libraries dscheck alcotest )
1414 (modules test_simple))
1515
1616(test
1717 (name test_bug)
18- (libraries dscheck)
18+ (libraries dscheck alcotest )
1919 (modules test_bug))
Original file line number Diff line number Diff line change @@ -14,4 +14,17 @@ let test () =
1414 assert (Atomic. get cancelled) (* This bug should be detected *)
1515 )
1616
17- let () = Atomic. trace test
17+ let test () =
18+ match Atomic. trace test with
19+ | exception _ -> ()
20+ | _ -> failwith " expected failure"
21+
22+ let () =
23+ let open Alcotest in
24+ run " dscheck"
25+ [
26+ ( " bug" ,
27+ [
28+ test_case " test" `Quick test;
29+ ] );
30+ ]
Original file line number Diff line number Diff line change @@ -12,7 +12,20 @@ let test i =
1212 Atomic. set y 1 ;
1313 Atomic. final (fun () -> Atomic. check (fun () -> Atomic. get y <> 2 ))
1414
15+ let test_0 () = Atomic. trace (fun () -> test 0 )
16+
17+ let test_10 () =
18+ match Atomic. trace (fun () -> test 10 ) with
19+ | exception _ -> ()
20+ | _ -> failwith " expected failure"
21+
1522let () =
16- Atomic. trace (fun () -> test 0 ) ;
17- Printf. printf " \n -----------------------------\n\n %!" ;
18- Atomic. trace (fun () -> test 10 )
23+ let open Alcotest in
24+ run " dscheck"
25+ [
26+ ( " simple" ,
27+ [
28+ test_case " test-0" `Quick test_0;
29+ test_case " test-10" `Quick test_10;
30+ ] );
31+ ]
You can’t perform that action at this time.
0 commit comments