From e27d6ba93a930bd0a8374437e584658890235cf1 Mon Sep 17 00:00:00 2001 From: Bartosz Modelski Date: Wed, 5 Apr 2023 17:52:12 +0100 Subject: [PATCH] another conditional test --- tests/dune | 9 +++++++-- tests/test_simple2.ml | 20 -------------------- 2 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 tests/test_simple2.ml diff --git a/tests/dune b/tests/dune index 5ff04b6..ace0ad8 100644 --- a/tests/dune +++ b/tests/dune @@ -19,6 +19,11 @@ (modules test_simple)) (test - (name test_simple2) + (name test_conditional1) (libraries dscheck) - (modules test_simple2)) + (modules test_conditional1)) + +(test + (name test_conditional2) + (libraries dscheck) + (modules test_conditional2)) diff --git a/tests/test_simple2.ml b/tests/test_simple2.ml deleted file mode 100644 index 1a8e98e..0000000 --- a/tests/test_simple2.ml +++ /dev/null @@ -1,20 +0,0 @@ -module Atomic = Dscheck.TracedAtomic - -let test () = - let c = Atomic.make 0 in - let b = Atomic.make 0 in - let ok = Atomic.make false in - - Atomic.spawn (fun () -> Atomic.set b 1); - Atomic.spawn (fun () -> - Atomic.set c 1; - Atomic.set b 2); - Atomic.spawn (fun () -> - if Atomic.get c = 0 then if Atomic.get b = 0 then Atomic.set ok true); - - Atomic.final (fun () -> - Format.printf "b=%i c=%i ok=%b@." (Atomic.get b) (Atomic.get c) - (Atomic.get ok)) - - -let () = Atomic.trace test