1
0

fix: fix binstore bugs according to test

This commit is contained in:
2025-12-16 14:37:46 +08:00
parent fcd0b3364f
commit 194f055039
2 changed files with 5 additions and 2 deletions

View File

@ -181,6 +181,9 @@ namespace yycc::carton::binstore::storage {
auto ba = success_ser ? std::move(rv_ser.value()) : serdes.reset();
// Assign it to setting's raw value.
this->set_raw_value(token, std::move(ba));
// Return result
return success_ser;
}
};

View File

@ -265,7 +265,7 @@ namespace yycctest::carton::binstore {
protected:
CartonBinstoreVersion() {
// Create settings
auto settings = SettingCollection();
settings = SettingCollection();
setting = settings.add_setting(Setting(u8"int-setting"));
}
~CartonBinstoreVersion() override = default;
@ -302,7 +302,7 @@ namespace yycctest::carton::binstore {
TEST_F(CartonBinstoreVersion, LoadStrategy) {
// Prepare buffer and essential settings
constexpr VersionIdentifier OLD_VERSION = 32;
constexpr VersionIdentifier OLD_VERSION = 16;
constexpr VersionIdentifier MID_VERSION = 32;
constexpr VersionIdentifier NEW_VERSION = 61;