File: nested.ml.corrected.expected

package info (click to toggle)
ppx-expect 0.17.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: ml: 3,399; ansic: 104; javascript: 19; makefile: 15; sh: 2
file content (29 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (2)
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
let run_test () =
  let module _ = struct
    let%expect_test "" = assert false
  end
  in
  ()
;;

let%expect_test ("" [@tags "fast-flambda"]) = run_test ()
[@@expect.uncaught_exn
  {|
  ( "Expect_test_runtime: reached one [let%expect_test] from another. Nesting expect\
   \ntests is prohibited." (outer_test ((file nested.ml) (line 9)))
    (inner_test ((file nested.ml) (line 3))))
  |}]
;;

(* This test is still silently ignored when running with [-require-tag fast-flambda], but
   I don't think there's much we can do about that. It will still complain about nesting
   when normal testing runs. *)
let run_test () =
  let module _ = struct
    let%expect_test ("" [@tags "fast-flambda"]) = assert false
  end
  in
  ()
;;

let%expect_test "" = run_test ()