Skip to content

Commit

Permalink
update doc/ examples to new STM structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jmid committed Nov 11, 2022
1 parent 4e66879 commit 498b144
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion doc/example/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
(executable
(name stm_tests)
(modules stm_tests)
(libraries qcheck-stm)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show)))
9 changes: 5 additions & 4 deletions doc/example/stm_tests.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open QCheck
open STM
open STM_base

(** parallel STM tests of Hashtbl *)

Expand Down Expand Up @@ -57,9 +57,10 @@ struct
| _ -> false
end

module HTest = STM.Make(HashtblModel)
module HT_seq = STM_sequential.Make(HashtblModel)
module HT_dom = STM_domain.Make(HashtblModel)
;;
QCheck_base_runner.run_tests_main
(let count = 200 in
[HTest.agree_test ~count ~name:"Hashtbl test";
HTest.agree_test_par ~count ~name:"Hashtbl test"; ])
[HT_seq.agree_test ~count ~name:"Hashtbl test";
HT_dom.agree_test_par ~count ~name:"Hashtbl test"; ])
2 changes: 1 addition & 1 deletion doc/paper-examples/dune
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
(executable
(name stm_tests)
(modules stm_tests)
(libraries qcheck-stm)
(libraries qcheck-stm.sequential qcheck-stm.domain)
(preprocess (pps ppx_deriving.show)))
9 changes: 5 additions & 4 deletions doc/paper-examples/stm_tests.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open QCheck
open STM
open STM_base

(** parallel STM tests of Hashtbl *)

Expand Down Expand Up @@ -68,10 +68,11 @@ struct
| _ -> false
end

module HTest = STM.Make(HashtblModel)
module HT_seq = STM_sequential.Make(HashtblModel)
module HT_dom = STM_domain.Make(HashtblModel)
;;
QCheck_base_runner.run_tests_main
(let count = 200 in
[HTest.agree_test ~count ~name:"Hashtbl test";
HTest.agree_test_par ~count ~name:"Hashtbl test";
[HT_seq.agree_test ~count ~name:"Hashtbl test";
HT_dom.agree_test_par ~count ~name:"Hashtbl test";
])

0 comments on commit 498b144

Please sign in to comment.