diff options
| author | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-24 21:09:02 +0100 |
|---|---|---|
| committer | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-24 21:09:02 +0100 |
| commit | bc245e5046124941bbdc7bb5c3bd7c739da4e03e (patch) | |
| tree | 5b780fbcbc1dd131ee635980dfe3e996ac72928f /runtime/test/mods_test.cpp | |
| parent | 30450e0e96e1df700bbfa9505433c9b9940e8694 (diff) | |
| parent | 58be9cdf8df9a31bc7f6c068991f1aed381f7f4d (diff) | |
Merge remote-tracking branch 'origin/main' into vcc-tuple-resync
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/mods_test.cpp')
| -rw-r--r-- | runtime/test/mods_test.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/test/mods_test.cpp b/runtime/test/mods_test.cpp index a29979b25..e95bc4e16 100644 --- a/runtime/test/mods_test.cpp +++ b/runtime/test/mods_test.cpp | |||
| @@ -41,6 +41,9 @@ int main() { | |||
| 41 | check(!parse_model_id("0x123456789", id), "a hash wider than 32 bits is refused"); | 41 | check(!parse_model_id("0x123456789", id), "a hash wider than 32 bits is refused"); |
| 42 | check(!parse_model_id("0xZZ", id), "a malformed hash is refused"); | 42 | check(!parse_model_id("0xZZ", id), "a malformed hash is refused"); |
| 43 | check(!parse_model_id("", id), "an empty name is refused"); | 43 | check(!parse_model_id("", id), "an empty name is refused"); |
| 44 | id = 0xCAFEBABEu; | ||
| 45 | check(!parse_model_id("0x", id) && id == 0xCAFEBABEu, "a bare 0x prefix is refused"); | ||
| 46 | check(!parse_model_id("0X", id) && id == 0xCAFEBABEu, "a bare 0X prefix is refused"); | ||
| 44 | 47 | ||
| 45 | Mod mod; | 48 | Mod mod; |
| 46 | std::string error; | 49 | std::string error; |
| @@ -53,6 +56,8 @@ int main() { | |||
| 53 | "a condition the runtime cannot honour yet is refused, not ignored"); | 56 | "a condition the runtime cannot honour yet is refused, not ignored"); |
| 54 | check(!parse_mod(R"({"archetype_swaps":[{"from":"cs_mandy","to":"0xD7C0CDFF"}]})", "m", mod, error), | 57 | check(!parse_mod(R"({"archetype_swaps":[{"from":"cs_mandy","to":"0xD7C0CDFF"}]})", "m", mod, error), |
| 55 | "a swap of a model with itself is refused"); | 58 | "a swap of a model with itself is refused"); |
| 59 | check(!parse_mod(R"({"archetype_swaps":[{"from":"0x","to":"cs_mandy"}]})", "m", mod, error), | ||
| 60 | "a bare 0x prefix in an archetype swap is refused"); | ||
| 56 | check(!parse_mod(R"({"enabled":"yes"})", "m", mod, error), "\"enabled\" must be a boolean"); | 61 | check(!parse_mod(R"({"enabled":"yes"})", "m", mod, error), "\"enabled\" must be a boolean"); |
| 57 | check(!parse_mod("[1,2]", "m", mod, error), "a manifest that is not an object is refused"); | 62 | check(!parse_mod("[1,2]", "m", mod, error), "a manifest that is not an object is refused"); |
| 58 | check(parse_mod("{}", "folder_name", mod, error) && mod.name == "folder_name", "the name defaults to the folder"); | 63 | check(parse_mod("{}", "folder_name", mod, error) && mod.name == "folder_name", "the name defaults to the folder"); |