File tree 3 files changed +70
-0
lines changed
3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 54
54
(libraries qcheck-stm.sequential threads.posix)
55
55
(action
56
56
(with-accepted-exit-codes 1 (run ./%{test} --verbose --seed 229109553))))
57
+
58
+ (test
59
+ (name uncaught_lin)
60
+ (package qcheck-lin)
61
+ (modules uncaught_lin)
62
+ (libraries qcheck-lin.domain)
63
+ (enabled_if (>= %{ocaml_version} 5))
64
+ (action
65
+ (pipe-outputs
66
+ (with-accepted-exit-codes 1
67
+ (run %{test} --no-colors --verbose --seed 260395858))
68
+ ; filter out output that is not deterministic enough across
69
+ ; versions and platforms
70
+ (run sed -e "/^[[]/d" -e "s/ ([0-9]* shrink steps)//"))))
Original file line number Diff line number Diff line change
1
+ random seed: 260395858
2
+ generated error fail pass / total time test name
3
+
4
+ === Error ======================================================================
5
+
6
+ Test Lin DSL test of uncaught exceptions errored on:
7
+
8
+ |
9
+ always_fail t
10
+ |
11
+ .---------------------.
12
+ | |
13
+
14
+
15
+ exception Failure("unexpected") raised but not caught while running always_fail t
16
+
17
+
18
+ === Error ======================================================================
19
+
20
+ Test neg Lin DSL test of uncaught exceptions errored on:
21
+
22
+ |
23
+ always_fail t
24
+ |
25
+ .---------------------.
26
+ | |
27
+
28
+
29
+ exception Failure("unexpected") raised but not caught while running always_fail t
30
+
31
+ ================================================================================
32
+ failure (0 tests failed, 2 tests errored, ran 2 tests)
Original file line number Diff line number Diff line change
1
+ (* Test of the behaviour of Lin tests with uncaught exceptions *)
2
+
3
+ let always_fail () = failwith " unexpected"
4
+
5
+ module UncaughtExcConf = struct
6
+ open Lin
7
+
8
+ type t = unit
9
+
10
+ let init () = ()
11
+ let cleanup _ = ()
12
+ let api = [ val_ " always_fail" always_fail (t @-> returning unit ) ]
13
+ end
14
+
15
+ module UncaughtExc_domain = Lin_domain. Make (UncaughtExcConf )
16
+
17
+ let _ =
18
+ QCheck_base_runner. run_tests_main
19
+ [
20
+ UncaughtExc_domain. lin_test ~count: 10
21
+ ~name: " Lin DSL test of uncaught exceptions" ;
22
+ UncaughtExc_domain. neg_lin_test ~count: 10
23
+ ~name: " neg Lin DSL test of uncaught exceptions" ;
24
+ ]
You can’t perform that action at this time.
0 commit comments