From 498b1446e21478a5070b97527466075fae13162d Mon Sep 17 00:00:00 2001 From: Jan Midtgaard Date: Wed, 9 Nov 2022 20:27:21 +0100 Subject: [PATCH] update doc/ examples to new STM structure --- doc/example/dune | 2 +- doc/example/stm_tests.ml | 9 +++++---- doc/paper-examples/dune | 2 +- doc/paper-examples/stm_tests.ml | 9 +++++---- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/example/dune b/doc/example/dune index 761d9b86d..09899b094 100644 --- a/doc/example/dune +++ b/doc/example/dune @@ -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))) diff --git a/doc/example/stm_tests.ml b/doc/example/stm_tests.ml index 30cef071c..064967d7c 100644 --- a/doc/example/stm_tests.ml +++ b/doc/example/stm_tests.ml @@ -1,5 +1,5 @@ open QCheck -open STM +open STM_base (** parallel STM tests of Hashtbl *) @@ -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"; ]) diff --git a/doc/paper-examples/dune b/doc/paper-examples/dune index 761d9b86d..09899b094 100644 --- a/doc/paper-examples/dune +++ b/doc/paper-examples/dune @@ -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))) diff --git a/doc/paper-examples/stm_tests.ml b/doc/paper-examples/stm_tests.ml index ce9866892..2a5d123d9 100644 --- a/doc/paper-examples/stm_tests.ml +++ b/doc/paper-examples/stm_tests.ml @@ -1,5 +1,5 @@ open QCheck -open STM +open STM_base (** parallel STM tests of Hashtbl *) @@ -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"; ])