mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Add support for filename flags to the flags parser. Allow setting config values
from the command line.
This commit is contained in:
@@ -29,11 +29,13 @@ static void test_setting(void)
|
||||
setProtoByString(&config, "m.s", "string");
|
||||
setProtoByString(&config, "r.s", "val1");
|
||||
setProtoByString(&config, "r.s", "val2");
|
||||
setProtoByString(&config, "firstoption.s", "1");
|
||||
setProtoByString(&config, "secondoption.s", "2");
|
||||
|
||||
std::string s;
|
||||
google::protobuf::TextFormat::PrintToString(config, &s);
|
||||
s = cleanup(s);
|
||||
AssertThat(s, Equals("i64: -1 i32: -2 u64: 3 u32: 4 d: 5.5 m { s: \"string\" } r { s: \"val2\" }"));
|
||||
AssertThat(s, Equals("i64: -1 i32: -2 u64: 3 u32: 4 d: 5.5 m { s: \"string\" } r { s: \"val2\" } secondoption { s: \"2\" }"));
|
||||
}
|
||||
|
||||
static void test_config(void)
|
||||
|
||||
Reference in New Issue
Block a user