diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 18:47:24 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-24 18:47:24 -0500 |
| commit | b06d096ad0943d5eda9bf1b17b3c3346688fc1f6 (patch) | |
| tree | 3bfef3cbd5215cf0c7aa6b933419d31313fa3f3c /runtime/test/mods_test.cpp | |
| parent | dfd62d7e2637f181516cfe14d7cbfd0e6dc0710d (diff) | |
| parent | 94c9e43154c003acfb0b659104560c58423a7c5d (diff) | |
Merge main into RT-ALLOC9 (#395)
Merged on top of the merge made for #391 (main 507029d1e plus RT-QUEUE35).
One conflict, in docs/d3d12_vulkan.md: both sides added a row at the same
place of the Xbox-only table. Both are kept: this branch's
"Command-allocator slot 9" row, then main's "Device slot 81, queue
PresentX/SuspendX/ResumeX" row. The code and the tests merged without
conflicts.
Co-Authored-By: Claude Fable 5.2 <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"); |