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.master
parent
e51ccdac0e
commit
f4f3791a5f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue