From 674e036864c6575239500a3697c377d86c6c2c2f Mon Sep 17 00:00:00 2001 From: raistlin7447 Date: Tue, 29 Sep 2026 08:52:48 -0500 Subject: [PATCH] tests: a key misplaced into an included template is reported and removed The misplaced-key test put its bad key only in the inherited base. A second one in the included template checks that an include diff cannot carry a key the collection default lacks into the presets that include it. --- tests/libslic3r/test_vendor_cache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/libslic3r/test_vendor_cache.cpp b/tests/libslic3r/test_vendor_cache.cpp index 45172404fa..585595ace9 100644 --- a/tests/libslic3r/test_vendor_cache.cpp +++ b/tests/libslic3r/test_vendor_cache.cpp @@ -797,7 +797,7 @@ TEST_CASE("a key misplaced into a vendor preset is reported and removed", "[Vend { InstallDirs dirs; write_process_vendor(dirs.system, "Acme", { - { "Acme template", R"({"type":"process","name":"Acme template","from":"system","instantiation":"false","wall_loops":"5"})" }, + { "Acme template", R"({"type":"process","name":"Acme template","from":"system","instantiation":"false","wall_loops":"5","filament_density":"1.2"})" }, { "Acme base", R"({"type":"process","name":"Acme base","from":"system","instantiation":"false","filament_cost":"5"})" }, { "0.20mm Standard @Acme", process_json("0.20mm Standard @Acme", R"("instantiation":"true","inherits":"Acme base","include":["Acme template"],"nozzle_temperature":["210"],)") } }); @@ -805,10 +805,11 @@ TEST_CASE("a key misplaced into a vendor preset is reported and removed", "[Vend bundle.load_vendor_configs_from_json(dirs.system.string(), "Acme", PresetBundle::LoadSystem, ForwardCompatibilitySubstitutionRule::EnableSilent); - CHECK(bundle.error_count() == 2); + CHECK(bundle.error_count() == 3); const Preset* preset = bundle.prints.find_preset("0.20mm Standard @Acme", false); REQUIRE(preset != nullptr); CHECK_FALSE(preset->config.has("filament_cost")); + CHECK_FALSE(preset->config.has("filament_density")); CHECK_FALSE(preset->config.has("nozzle_temperature")); CHECK(preset->config.opt_int("wall_loops") == 5); }