Skip to content

Commit

Permalink
Make -unused-code-warning tests actual tests
Browse files Browse the repository at this point in the history
In their previous form they were not executed as part of the default
build or as part of the runtest alias.

They relied on a deriving_inline workflow which wasn't great for tests
and it lacked a bit of context on what was being tested so I converted
them to cram tests. It's a bit harder to read the generated code than
it was but the whole setup is not spread across 3 different directories
anymore and the tests are now documented.

Signed-off-by: Nathan Rebours <[email protected]>
  • Loading branch information
NathanReb committed May 28, 2024
1 parent 5bf8c9c commit a20f5a8
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 193 deletions.
4 changes: 0 additions & 4 deletions test/deriving_warning/disable/dune

This file was deleted.

48 changes: 0 additions & 48 deletions test/deriving_warning/disable/ppx_warning_flags_test.ml

This file was deleted.

54 changes: 0 additions & 54 deletions test/deriving_warning/disable/ppx_warning_flags_test.mli

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ let () =
(* The derivers are added from right to left *)
Deriving.add_alias "alias_warn" [ alias_no_warn; alias_do_warn ]
|> Deriving.ignore

let () = Driver.standalone ()
8 changes: 8 additions & 0 deletions test/deriving_warning/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(executable
(name driver)
(libraries ppxlib)
(preprocess
(pps ppxlib.metaquot)))

(cram
(deps driver.exe))
4 changes: 0 additions & 4 deletions test/deriving_warning/enable/dune

This file was deleted.

37 changes: 0 additions & 37 deletions test/deriving_warning/enable/ppx_warning_flags_test.ml

This file was deleted.

39 changes: 0 additions & 39 deletions test/deriving_warning/enable/ppx_warning_flags_test.mli

This file was deleted.

6 changes: 0 additions & 6 deletions test/deriving_warning/ppx/dune

This file was deleted.

1 change: 0 additions & 1 deletion test/deriving_warning/ppx/ppx_warning_flags.mli

This file was deleted.

Loading

0 comments on commit a20f5a8

Please sign in to comment.