Skip to content

Commit

Permalink
Update Ortac/Dune cram tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n-osborne committed Apr 17, 2024
1 parent 0983b03 commit 1baf463
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions plugins/dune-rules/test/test.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Without the optional output argument (for the dune rules, output for the generat
has to be set), the rules are printed on stdout. This is useful to check what will be
generated.

$ ortac dune qcheck-stm intf_spec "init_sut ()" "int sut" test --include=included --package=my_package
$ ortac dune qcheck-stm intf_spec.mli config_mod.ml test.ml --package=my_package
(rule
(alias runtest)
(mode promote)
Expand All @@ -22,11 +22,9 @@ generated.
ortac
dune
qcheck-stm
intf_spec
"init_sut ()"
"int sut"
test
--include=included
intf_spec.mli
config_mod.ml
test.ml
--package=my_package))))

(rule
Expand All @@ -46,14 +44,12 @@ generated.
ortac
qcheck-stm
%{dep:intf_spec.mli}
"init_sut ()"
"int sut"
--include=included
%{dep:config_mod.ml}
--quiet)))))

(test
(name test)
(modules test included)
(modules test)
(libraries
intf_spec
qcheck-stm.stm
Expand All @@ -69,10 +65,10 @@ generated.
When the optional output argument is set, rules will be written in the file and will reflect
this fact.

$ ortac dune qcheck-stm intf_spec "init_sut ()" "int sut" test --include=included --package=my_package --with-stdout-to=dune.inc
$ ortac dune qcheck-stm intf_spec.mli config_mod.ml test.ml --package=my_package --with-stdout-to=dune.inc
$ cat dune.inc
; This file is generated by ortac dune qcheck-stm
; It contains the rules for generating and running QCheck-STM tests for intf_spec
; It contains the rules for generating and running QCheck-STM tests for intf_spec.mli
; It also contains the rule to generate itself, so you can edit this rule to
; change some options rather that running ortac on the command line again

Expand All @@ -91,11 +87,9 @@ this fact.
ortac
dune
qcheck-stm
intf_spec
"init_sut ()"
"int sut"
test
--include=included
intf_spec.mli
config_mod.ml
test.ml
--package=my_package
--with-stdout-to=dune.inc))))

Expand All @@ -116,14 +110,12 @@ this fact.
ortac
qcheck-stm
%{dep:intf_spec.mli}
"init_sut ()"
"int sut"
--include=included
%{dep:config_mod.ml}
--quiet)))))

(test
(name test)
(modules test included)
(modules test)
(libraries
intf_spec
qcheck-stm.stm
Expand Down

0 comments on commit 1baf463

Please sign in to comment.