File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ depends: [
1414 "qcheck" {with-test & >= "0.18.1"}
1515 "qcheck-alcotest" {with-test & >= "0.18.1"}
1616 "yojson" {>= "2.0.2"}
17+ "qcheck-lin" {with-test}
1718]
1819depopts: []
1920build: ["dune" "build" "-p" name "-j" jobs]
Original file line number Diff line number Diff line change 2121(test
2222 (name qcheck_mpsc_queue)
2323 (libraries lockfree qcheck qcheck-alcotest)
24- (modules qcheck_mpsc_queue))
24+ (modules qcheck_mpsc_queue))
25+
26+ (test
27+ (name lin_mpmc_queue)
28+ (libraries lockfree qcheck-lin.domain)
29+ (modules lin_mpmc_queue))
Original file line number Diff line number Diff line change 1+ module Q = Lockfree. Mpmc_queue
2+
3+ module Test = struct
4+ type t = int Q .t
5+
6+ let init () = Q. make ~capacity: 1 ()
7+
8+ let cleanup _ = ()
9+
10+ open Lin_base
11+
12+ let api =
13+ [ val_ " push" Q. push (t @-> int @-> returning unit )
14+ ; val_ " pop" Q. pop (t @-> returning (option int ))
15+ ]
16+ end
17+
18+ module T = Lin_domain. Make (Test )
19+
20+ let () =
21+ QCheck_base_runner. run_tests_main
22+ [ T. lin_test ~count: 10_000 ~name: " MPMC Queue" ]
You can’t perform that action at this time.
0 commit comments