package ppx_quick_test
Spiritual equivalent of let%expect_test, but for property based tests as an ergonomic wrapper to write quickcheck tests.
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=d9556f991f7a75fb534a4a808fed3a18d0fd7ed55ecaa9a9bfefe9867d73b0d8
doc/src/ppx_quick_test.async/ppx_quick_test_async.ml.html
Source file ppx_quick_test_async.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 43 44 45 46 47 48 49
open! Core open Async_kernel let run (type a) ~here_pos ?(config : Base_quickcheck.Test.Config.t option) ~examples (module M : Base_quickcheck.Test.S with type t = a) ~(f : a -> unit Or_error.t Deferred.t) = let seed = Option.map config ~f:(fun config -> match config.Base_quickcheck.Test.Config.seed with | Base_quickcheck.Test.Config.Seed.Nondeterministic -> `Nondeterministic | Base_quickcheck.Test.Config.Seed.Deterministic seed -> `Deterministic seed) in let sizes = Option.map config ~f:(fun config -> config.Base_quickcheck.Test.Config.sizes) in let trials = Option.map config ~f:(fun config -> config.Base_quickcheck.Test.Config.test_count) in let shrink_attempts = Option.map config ~f:(fun config -> `Limit config.Base_quickcheck.Test.Config.shrink_count) in Async_quickcheck.async_test_or_error ?seed ?sizes ?trials ?shrink_attempts ~examples ~shrinker:M.quickcheck_shrinker M.quickcheck_generator ~f:(fun elt -> let%bind result = f elt in Ppx_quick_test_runtime_lib.assert_no_expect_test_trailing_output here_pos M.sexp_of_t elt; return result) ;; module Ppx_quick_test_core = Ppx_quick_test_runtime_lib.Make (struct module IO = Deferred let run = run end)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>