File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ class SchemaBase
59
59
Ptr <Meta_<Mutex,Ptr ,This>> m_pSchema;
60
60
};
61
61
62
- using Schema = SchemaBase<kit::dummy_mutex, kit::local_shared_ptr, kit::enable_shared_from_this>;
62
+ using Schema = SchemaBase<kit::dummy_mutex, META_STORAGE, META_THIS>;
63
+ using SchemaL = SchemaBase<kit::dummy_mutex, kit::local_shared_ptr, kit::enable_shared_from_this>;
64
+ using SchemaS = SchemaBase<kit::dummy_mutex, std::shared_ptr, std::enable_shared_from_this>;
63
65
using SchemaMT = SchemaBase<std::recursive_mutex, std::shared_ptr, std::enable_shared_from_this>;
64
66
65
67
#include " schema.inl"
Original file line number Diff line number Diff line change @@ -62,8 +62,16 @@ TEST_CASE("Args","[args]") {
62
62
REQUIRE (not args.has (' b' , " bchar" ));
63
63
REQUIRE (args.has (' c' , " cchar" ));
64
64
}
65
+
66
+ SECTION (" key-value" ) {
67
+ Args args;
68
+ REQUIRE_NOTHROW (args = Args (vector<string>{" --foo=bar" }));
69
+ REQUIRE (args.value (" foo" ) == " bar" );
70
+ REQUIRE (args.value_or (" foo" ," baz" ) == " bar" );
71
+ REQUIRE (args.value_or (" bin" ," baz" ) == " baz" );
72
+ }
65
73
66
- SECTION (" schemas " ) {
74
+ SECTION (" expected " ) {
67
75
Args args;
68
76
69
77
REQUIRE_NOTHROW (args = Args (vector<string>{" --foo" }, " -f --foo" ));
@@ -87,7 +95,6 @@ TEST_CASE("Args","[args]") {
87
95
// -c invalid
88
96
REQUIRE_THROWS (Args (vector<string>{" -abc" }, " -a -b" ));
89
97
}
90
-
91
98
}
92
99
}
93
100
You can’t perform that action at this time.
0 commit comments