LLSD-14: Add tests from Simon's server-trunk changeset 3852648182db.
That changeset provides most of the changes previously checked in on this Jira (viewer changeset 22b293aae639). Bring over the code he added to llsd_new_tut.cpp as well.master
parent
e62c691aab
commit
b0d869554b
|
|
@ -742,6 +742,42 @@ namespace tut
|
|||
LLSD w = v;
|
||||
w = "nice day";
|
||||
}
|
||||
|
||||
{
|
||||
SDAllocationCheck check("shared values test for threaded work", 9);
|
||||
|
||||
//U32 start_llsd_count = LLSD::outstandingCount();
|
||||
|
||||
LLSD m = LLSD::emptyMap();
|
||||
|
||||
m["one"] = 1;
|
||||
m["two"] = 2;
|
||||
m["one_copy"] = m["one"]; // 3 (m, "one" and "two")
|
||||
|
||||
m["undef_one"] = LLSD();
|
||||
m["undef_two"] = LLSD();
|
||||
m["undef_one_copy"] = m["undef_one"];
|
||||
|
||||
{ // Ensure first_array gets freed to avoid counting it
|
||||
LLSD first_array = LLSD::emptyArray();
|
||||
first_array.append(1.0f);
|
||||
first_array.append(2.0f);
|
||||
first_array.append(3.0f); // 7
|
||||
|
||||
m["array"] = first_array;
|
||||
m["array_clone"] = first_array;
|
||||
m["array_copy"] = m["array"]; // 7
|
||||
}
|
||||
|
||||
m["string_one"] = "string one value";
|
||||
m["string_two"] = "string two value";
|
||||
m["string_one_copy"] = m["string_one"]; // 9
|
||||
|
||||
//U32 llsd_object_count = LLSD::outstandingCount();
|
||||
//std::cout << "Using " << (llsd_object_count - start_llsd_count) << " LLSD objects" << std::endl;
|
||||
|
||||
//m.dumpStats();
|
||||
}
|
||||
}
|
||||
|
||||
template<> template<>
|
||||
|
|
|
|||
Loading…
Reference in New Issue