diff options
| -rw-r--r-- | test/test_input.ml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test_input.ml b/test/test_input.ml index a9c63a9..92eb308 100644 --- a/test/test_input.ml +++ b/test/test_input.ml @@ -153,4 +153,29 @@ let suite = | Error err -> QCheck.Test.fail_reportf "%a" Fmt.(list ~sep: semi Util.KDL.Valid.pp_err) err; ); + QCheck.Test.make + ~name: "Input sameshape" + (QCheck.make ~print: (Fmt.str "%a" Input.pp) Input.gen) + (fun input -> + let manifest_input = + Manifest.Input'.to_manifest input + and lockfile_input = + let models = Input.jg_models2 input in + Lockfile.Input'.to_lock ~models input + in + let melded = + meld_input_with_lock + (Manifest.Input'.of_manifest manifest_input) + lockfile_input + in + if melded = input then + true + else + QCheck.Test.fail_reportf + "Aimed for:@,%a@.@.But got:@,%a@." + Input.pp + input + Input.pp + melded + ); ] |
