package qcheck-stm
State-machine testing library for sequential and parallel model-based tests
Install
dune-project
Dependency
Authors
Maintainers
Sources
0.9.tar.gz
md5=ce75e64a125c5593d8e3c91752406067
sha512=cbac110fcf490a4c71229937936eb705699489d666c55938df6ce2e31d224494a92d8dc36946e24a506f1962c23d9ac10bf1c0c2685b237e111241ee0a9049b8
doc/src/qcheck-stm.sequential/STM_sequential.ml.html
Source file STM_sequential.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
open STM module MakeExt (Spec: SpecExt) = struct open QCheck open Internal.Make(Spec) [@alert "-internal"] (* re-export some functions *) let cmds_ok = cmds_ok let arb_cmds = arb_cmds let print_seq_trace trace = List.fold_left (fun acc (c,r) -> Printf.sprintf "%s\n %s : %s" acc (Spec.show_cmd c) (show_res r)) "" trace let agree_prop cs = assume (cmds_ok Spec.init_state cs); let sut = Spec.init_sut () in (* reset system's state *) let res = try Ok (Spec.wrap_cmd_seq @@ fun () -> check_disagree Spec.init_state sut cs) with exn -> Error exn in let () = Spec.cleanup sut in let res = match res with Ok res -> res | Error exn -> raise exn in match res with | None -> true | Some trace -> Test.fail_reportf " Results incompatible with model\n%s" @@ print_seq_trace trace let agree_test ~count ~name = Test.make ~name ~count (arb_cmds Spec.init_state) agree_prop let neg_agree_test ~count ~name = Test.make_neg ~name ~count (arb_cmds Spec.init_state) agree_prop end module Make (Spec : Spec) = MakeExt (struct include SpecDefaults include Spec end)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>