fix: fix binstore bugs according to test
This commit is contained in:
@@ -181,6 +181,9 @@ namespace yycc::carton::binstore::storage {
|
|||||||
auto ba = success_ser ? std::move(rv_ser.value()) : serdes.reset();
|
auto ba = success_ser ? std::move(rv_ser.value()) : serdes.reset();
|
||||||
// Assign it to setting's raw value.
|
// Assign it to setting's raw value.
|
||||||
this->set_raw_value(token, std::move(ba));
|
this->set_raw_value(token, std::move(ba));
|
||||||
|
|
||||||
|
// Return result
|
||||||
|
return success_ser;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ namespace yycctest::carton::binstore {
|
|||||||
protected:
|
protected:
|
||||||
CartonBinstoreVersion() {
|
CartonBinstoreVersion() {
|
||||||
// Create settings
|
// Create settings
|
||||||
auto settings = SettingCollection();
|
settings = SettingCollection();
|
||||||
setting = settings.add_setting(Setting(u8"int-setting"));
|
setting = settings.add_setting(Setting(u8"int-setting"));
|
||||||
}
|
}
|
||||||
~CartonBinstoreVersion() override = default;
|
~CartonBinstoreVersion() override = default;
|
||||||
@@ -302,7 +302,7 @@ namespace yycctest::carton::binstore {
|
|||||||
|
|
||||||
TEST_F(CartonBinstoreVersion, LoadStrategy) {
|
TEST_F(CartonBinstoreVersion, LoadStrategy) {
|
||||||
// Prepare buffer and essential settings
|
// Prepare buffer and essential settings
|
||||||
constexpr VersionIdentifier OLD_VERSION = 32;
|
constexpr VersionIdentifier OLD_VERSION = 16;
|
||||||
constexpr VersionIdentifier MID_VERSION = 32;
|
constexpr VersionIdentifier MID_VERSION = 32;
|
||||||
constexpr VersionIdentifier NEW_VERSION = 61;
|
constexpr VersionIdentifier NEW_VERSION = 61;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user