diff options
| author | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-11 17:39:31 +0000 |
|---|---|---|
| committer | ยท๐๐ด๐๐๐ฉ๐ค | 2025-12-11 17:39:31 +0000 |
| commit | a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824 (patch) | |
| tree | 4fb777bf1d85c5d784ac99710d51b5bf42574328 /test/test_input.ml | |
| parent | a9d4d2402d20617d27bf5b1bbc510f5f90890c09 (diff) | |
| download | nixtaml-a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824.tar nixtaml-a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824.tar.gz nixtaml-a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824.tar.bz2 nixtaml-a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824.tar.lz nixtaml-a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824.tar.xz nixtaml-a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824.tar.zst nixtaml-a0bd1aa8ea87054e9b240b9ea2a2b8ce44193824.zip | |
QCheck input sameshape
Diffstat (limited to 'test/test_input.ml')
| -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 + ); ] |
