File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ class ScopeTimer_TestFriend {
4040 test_labelarg_literal_and_pointer_variants ();
4141 test_labeldata_manual_empty_view ();
4242 test_labelarg_empty_literal_to_labeldata ();
43+ test_labeldata_constructor_default_view ();
4344 test_labelarg_owned_to_labeldata ();
4445 test_scope_timer_string_view_ctor ();
4546 test_looped_work ();
@@ -263,6 +264,12 @@ class ScopeTimer_TestFriend {
263264 expect (data.storage .empty (), " LabelArg empty literal does not allocate storage" );
264265 }
265266
267+ static void test_labeldata_constructor_default_view () {
268+ ::xyzzy::scopetimer::detail::LabelData data (std::string_view{});
269+ expect (data.view == std::string_view (" ScopeTimer" ), " LabelData ctor defaults empty inputs to ScopeTimer" );
270+ expect (data.storage .empty (), " LabelData ctor leaves storage empty when no ownership provided" );
271+ }
272+
266273 static void test_labelarg_owned_to_labeldata () {
267274 std::string ownedSource = " tests:label:owned" ;
268275 ::xyzzy::scopetimer::detail::LabelArg arg{std::move (ownedSource)};
You can’t perform that action at this time.
0 commit comments