diff options
| author | Daniel Cabral <daniel.cabral@outlook.com> | 2026-11-02 16:06:33 -0300 |
|---|---|---|
| committer | Daniel Cabral <daniel.cabral@outlook.com> | 2026-11-02 16:06:33 -0300 |
| commit | 76f6aec860116ed2044e98770fda6e24289a5672 (patch) | |
| tree | 0f31d3fc9d85e77fd31e4c63d493da88d2f0fab1 | |
| parent | 62214094d6c698b70f51016e5c12af415f025be7 (diff) | |
tests when building on Windows: compare FindBestUpdatePackage with a size_t
FindBestUpdatePackage returns std::optional<std::size_t>, and comparing
it with an int makes MSVC emit C4388 inside <optional>, which WERROR
turns into an error, so the tests target does not build on Windows.
Part of #326.
Assisted-by: Claude Opus 5.5 (diagnosis, fix and commit message draft)
| -rw-r--r-- | src/tests/core/nup_writer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/core/nup_writer.cpp b/src/tests/core/nup_writer.cpp index c0230d8694..e598c98868 100644 --- a/src/tests/core/nup_writer.cpp +++ b/src/tests/core/nup_writer.cpp @@ -208,7 +208,7 @@ TEST_CASE("NUP packs base, updates and add-ons and reads back through NupContain REQUIRE(packages[3].kind == NupContainer::PackageKind::Addon); REQUIRE(packages[3].title_id == 0x0400ABCD00011001ULL); REQUIRE(packages[3].exefs_dir == 0xFFFFFFFF); - REQUIRE(nup.FindBestUpdatePackage() == 2); + REQUIRE(nup.FindBestUpdatePackage() == std::size_t{2}); REQUIRE(PackedTree(nup.GetExeFSDir(0)) == SourceTree(root / "Base/ExeFS")); REQUIRE(PackedTree(nup.GetRomFSDir(0)) == SourceTree(root / "Base/RomFS")); |
