Skip to content

Commit

Permalink
Use alcotest
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Jun 19, 2023
1 parent 354496d commit d888bc5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions domain-local-await.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ depends: [
"dune" {>= "3.3"}
"ocaml" {>= "4.12.0"}
"thread-table" {>= "0.1.0"}
"alcotest" {>= "1.7.0" & with-test}
"mdx" {>= "1.10.0" & with-test}
"odoc" {with-doc}
]
Expand Down
1 change: 1 addition & 0 deletions dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
(depends
(ocaml (>= 4.12.0))
(thread-table (>= 0.1.0))
(alcotest (and (>= 1.7.0) :with-test))
(mdx (and (>= 1.10.0) :with-test))))
(using mdx 0.2)
2 changes: 1 addition & 1 deletion test/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
(test
(name test)
(libraries domain-local-await threads))
(libraries domain-local-await threads alcotest))
9 changes: 6 additions & 3 deletions test/test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ let test_all_threads_are_woken_up () =

threads |> List.iter Thread.join

let () =
let basics () =
test_all_threads_are_woken_up ();
Domain_local_await.per_thread (module Thread);
test_all_threads_are_woken_up ();
()
test_all_threads_are_woken_up ()

let () =
Alcotest.run "Domain_local_await"
[ ("basics", [ Alcotest.test_case "" `Quick basics ]) ]

0 comments on commit d888bc5

Please sign in to comment.