Skip to content

Commit

Permalink
Effect handlers: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Dec 1, 2022
1 parent 694b994 commit abd5840
Show file tree
Hide file tree
Showing 41 changed files with 1,210 additions and 0 deletions.
305 changes: 305 additions & 0 deletions compiler/tests-ocaml/lib-effects/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,305 @@
(executables
(names
effects
evenodd
manylive
overflow
partial
reperform
sched
shallow_state_io
shallow_state
test10
test11
test1
test2
test3
test4
test5
test6
test_lazy
unhandled_unlinked
used_cont)
(modes js))

(rule
(target effects.referencejs)
(deps effects.bc.js)
(action
(with-stdout-to
%{target}
(run node ./effects.bc.js))))

(rule
(alias runtest)
(deps effects.reference effects.referencejs)
(action
(diff effects.reference effects.referencejs)))

(rule
(target evenodd.referencejs)
(deps evenodd.bc.js)
(action
(with-stdout-to
%{target}
(run node ./evenodd.bc.js))))

(rule
(alias runtest)
(deps evenodd.reference evenodd.referencejs)
(action
(diff evenodd.reference evenodd.referencejs)))

(rule
(target manylive.referencejs)
(deps manylive.bc.js)
(action
(with-stdout-to
%{target}
(run node ./manylive.bc.js))))

(rule
(alias runtest)
(deps manylive.reference manylive.referencejs)
(action
(diff manylive.reference manylive.referencejs)))

(rule
(target overflow.referencejs)
(deps overflow.bc.js)
(action
(with-stdout-to
%{target}
(run node ./overflow.bc.js))))

(rule
(alias runtest)
(deps overflow.reference overflow.referencejs)
(action
(diff overflow.reference overflow.referencejs)))

(rule
(target partial.referencejs)
(deps partial.bc.js)
(action
(with-stdout-to
%{target}
(run node ./partial.bc.js))))

(rule
(alias runtest)
(deps partial.reference partial.referencejs)
(action
(diff partial.reference partial.referencejs)))

(rule
(target reperform.referencejs)
(deps reperform.bc.js)
(action
(with-stdout-to
%{target}
(run node ./reperform.bc.js))))

(rule
(alias runtest)
(deps reperform.reference reperform.referencejs)
(action
(diff reperform.reference reperform.referencejs)))

(rule
(target sched.referencejs)
(deps sched.bc.js)
(action
(with-stdout-to
%{target}
(run node ./sched.bc.js))))

(rule
(alias runtest)
(deps sched.reference sched.referencejs)
(action
(diff sched.reference sched.referencejs)))

(rule
(target shallow_state_io.referencejs)
(deps shallow_state_io.bc.js)
(action
(with-stdout-to
%{target}
(run node ./shallow_state_io.bc.js))))

(rule
(alias runtest)
(deps shallow_state_io.reference shallow_state_io.referencejs)
(action
(diff shallow_state_io.reference shallow_state_io.referencejs)))

(rule
(target shallow_state.referencejs)
(deps shallow_state.bc.js)
(action
(with-stdout-to
%{target}
(run node ./shallow_state.bc.js))))

(rule
(alias runtest)
(deps shallow_state.reference shallow_state.referencejs)
(action
(diff shallow_state.reference shallow_state.referencejs)))

(rule
(target test10.referencejs)
(deps test10.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test10.bc.js))))

(rule
(alias runtest)
(deps test10.reference test10.referencejs)
(action
(diff test10.reference test10.referencejs)))

(rule
(target test11.referencejs)
(deps test11.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test11.bc.js))))

(rule
(alias runtest)
(deps test11.reference test11.referencejs)
(action
(diff test11.reference test11.referencejs)))

(rule
(target test1.referencejs)
(deps test1.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test1.bc.js))))

(rule
(alias runtest)
(deps test1.reference test1.referencejs)
(action
(diff test1.reference test1.referencejs)))

(rule
(target test2.referencejs)
(deps test2.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test2.bc.js))))

(rule
(alias runtest)
(deps test2.reference test2.referencejs)
(action
(diff test2.reference test2.referencejs)))

(rule
(target test3.referencejs)
(deps test3.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test3.bc.js))))

(rule
(alias runtest)
(deps test3.reference test3.referencejs)
(action
(diff test3.reference test3.referencejs)))

(rule
(target test4.referencejs)
(deps test4.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test4.bc.js))))

(rule
(alias runtest)
(deps test4.reference test4.referencejs)
(action
(diff test4.reference test4.referencejs)))

(rule
(target test5.referencejs)
(deps test5.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test5.bc.js))))

(rule
(alias runtest)
(deps test5.reference test5.referencejs)
(action
(diff test5.reference test5.referencejs)))

(rule
(target test6.referencejs)
(deps test6.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test6.bc.js))))

(rule
(alias runtest)
(deps test6.reference test6.referencejs)
(action
(diff test6.reference test6.referencejs)))

(rule
(target test_lazy.referencejs)
(deps test_lazy.bc.js)
(action
(with-stdout-to
%{target}
(run node ./test_lazy.bc.js))))

(rule
(alias runtest)
(deps test_lazy.reference test_lazy.referencejs)
(action
(diff test_lazy.reference test_lazy.referencejs)))

(rule
(target unhandled_unlinked.referencejs)
(deps unhandled_unlinked.bc.js)
(action
(with-accepted-exit-codes
2
(with-outputs-to
%{target}
(run node ./unhandled_unlinked.bc.js)))))

(rule
(alias runtest)
(deps unhandled_unlinked.reference unhandled_unlinked.referencejs)
(action
(diff unhandled_unlinked.reference unhandled_unlinked.referencejs)))

(rule
(target used_cont.referencejs)
(deps used_cont.bc.js)
(action
(with-stdout-to
%{target}
(run node ./used_cont.bc.js))))

(rule
(alias runtest)
(deps used_cont.reference used_cont.referencejs)
(action
(diff used_cont.reference used_cont.referencejs)))
Loading

0 comments on commit abd5840

Please sign in to comment.