Skip to content
Snippets Groups Projects
Commit f4f3791a authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

Add test verifying passing LLSD() to const char* parameter.

LLSDParam<const char*> is coded to pass NULL for an isUndefined() LLSD value,
so event-based caller can choose whether to pass NULL, "" or whatever string
value to such a parameter. Ensure this behavior.
parent e51ccdac
No related branches found
No related tags found
No related merge requests found
......@@ -1229,4 +1229,18 @@ namespace tut
}
}
}
template<> template<>
void object::test<21>()
{
set_test_name("verify that passing LLSD() to const char* sends NULL");
ensure_equals("Vars::cp init", v.cp, "");
work("methodna_map_mdft", LLSDMap("cp", LLSD()));
ensure_equals("passing LLSD()", v.cp, "NULL");
work("methodna_map_mdft", LLSDMap("cp", ""));
ensure_equals("passing \"\"", v.cp, "''");
work("methodna_map_mdft", LLSDMap("cp", "non-NULL"));
ensure_equals("passing \"non-NULL\"", v.cp, "'non-NULL'");
}
} // namespace tut
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment