Browse Source

add infrastructure for qtest

nottui-full-sensor
Simon Cruanes 1 year ago
committed by Frédéric Bour
parent
commit
cfb5405bd7
2 changed files with 10 additions and 0 deletions
  1. +1
    -0
      lib/lwd/dune
  2. +9
    -0
      lib/lwd/lwd.ml

+ 1
- 0
lib/lwd/dune View File

@ -3,6 +3,7 @@
(public_name lwd)
(modules lwd lwd_table lwd_infix lwd_utils)
(libraries seq)
(inline_tests (backend qtest.lib))
(wrapped false))
(rule


+ 9
- 0
lib/lwd/lwd.ml View File

@ -567,3 +567,12 @@ module Infix = struct
let (>|=) = map'
let (<*>) = app
end
(*$R
let x = var 0 in
let y = map succ (get x) in
let o_y = Lwd.observe y in
assert_equal 1 (quick_sample o_y);
set x 10;
assert_equal 11 (quick_sample o_y);
*)

Loading…
Cancel
Save