Changeset View
Changeset View
Standalone View
Standalone View
src/test/util_tests.cpp
Show First 20 Lines • Show All 226 Lines • ▼ Show 20 Lines | struct Expect { | ||||
bool default_int = false; | bool default_int = false; | ||||
bool default_bool = false; | bool default_bool = false; | ||||
const char *string_value = nullptr; | const char *string_value = nullptr; | ||||
Optional<int64_t> int_value; | Optional<int64_t> int_value; | ||||
Optional<bool> bool_value; | Optional<bool> bool_value; | ||||
Optional<std::vector<std::string>> list_value; | Optional<std::vector<std::string>> list_value; | ||||
const char *error = nullptr; | const char *error = nullptr; | ||||
Expect(util::SettingsValue s) : setting(std::move(s)) {} | explicit Expect(util::SettingsValue s) : setting(std::move(s)) {} | ||||
Expect &DefaultString() { | Expect &DefaultString() { | ||||
default_string = true; | default_string = true; | ||||
return *this; | return *this; | ||||
} | } | ||||
Expect &DefaultInt() { | Expect &DefaultInt() { | ||||
default_int = true; | default_int = true; | ||||
return *this; | return *this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,830 Lines • Show Last 20 Lines |