From a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824 Mon Sep 17 00:00:00 2001 From: ยท๐‘‘๐‘ด๐‘•๐‘‘๐‘ฉ๐‘ค Date: Thu, 11 Dec 2025 17:39:31 +0000 Subject: QCheck input sameshape --- test/test_input.ml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'test') 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 + ); ] -- cgit v1.2.3