summaryrefslogtreecommitdiff
path: root/indra/llcommon/tests/llsdserialize_test.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-07-20 22:24:10 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-07-20 22:24:10 +0300
commit7bbf3f5f7f37330281d36ca087fe7091c2492ebe (patch)
treec926a151f950e24207c75e9764280b58daccf017 /indra/llcommon/tests/llsdserialize_test.cpp
parentbbee0658c3a7837e47d171dacfda55cac803e3ed (diff)
parent72423372d6cd7f763a5567ad75752fa4e7131d60 (diff)
Merge branch 'master' into DRTVWR-501-maint
# Conflicts: # autobuild.xml # indra/newview/llimprocessing.cpp
Diffstat (limited to 'indra/llcommon/tests/llsdserialize_test.cpp')
-rw-r--r--indra/llcommon/tests/llsdserialize_test.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/indra/llcommon/tests/llsdserialize_test.cpp b/indra/llcommon/tests/llsdserialize_test.cpp
index 6ac974e659..642c1c3879 100644
--- a/indra/llcommon/tests/llsdserialize_test.cpp
+++ b/indra/llcommon/tests/llsdserialize_test.cpp
@@ -271,10 +271,10 @@ namespace tut
LLSD w;
mParser->reset(); // reset() call is needed since test code re-uses mParser
mParser->parse(stream, w, stream.str().size());
-
+
try
{
- ensure_equals(msg.c_str(), w, v);
+ ensure_equals(msg, w, v);
}
catch (...)
{
@@ -432,6 +432,7 @@ namespace tut
const char source[] = "it must be a blue moon again";
std::vector<U8> data;
+ // note, includes terminating '\0'
copy(&source[0], &source[sizeof(source)], back_inserter(data));
v = data;
@@ -468,28 +469,36 @@ namespace tut
checkRoundTrip(msg + " many nested maps", v);
}
- typedef tut::test_group<TestLLSDSerializeData> TestLLSDSerialzeGroup;
- typedef TestLLSDSerialzeGroup::object TestLLSDSerializeObject;
- TestLLSDSerialzeGroup gTestLLSDSerializeGroup("llsd serialization");
+ typedef tut::test_group<TestLLSDSerializeData> TestLLSDSerializeGroup;
+ typedef TestLLSDSerializeGroup::object TestLLSDSerializeObject;
+ TestLLSDSerializeGroup gTestLLSDSerializeGroup("llsd serialization");
template<> template<>
void TestLLSDSerializeObject::test<1>()
{
- mFormatter = new LLSDNotationFormatter();
+ mFormatter = new LLSDNotationFormatter(false, "", LLSDFormatter::OPTIONS_PRETTY_BINARY);
mParser = new LLSDNotationParser();
- doRoundTripTests("notation serialization");
+ doRoundTripTests("pretty binary notation serialization");
}
-
+
template<> template<>
void TestLLSDSerializeObject::test<2>()
{
+ mFormatter = new LLSDNotationFormatter(false, "", LLSDFormatter::OPTIONS_NONE);
+ mParser = new LLSDNotationParser();
+ doRoundTripTests("raw binary notation serialization");
+ }
+
+ template<> template<>
+ void TestLLSDSerializeObject::test<3>()
+ {
mFormatter = new LLSDXMLFormatter();
mParser = new LLSDXMLParser();
doRoundTripTests("xml serialization");
}
-
+
template<> template<>
- void TestLLSDSerializeObject::test<3>()
+ void TestLLSDSerializeObject::test<4>()
{
mFormatter = new LLSDBinaryFormatter();
mParser = new LLSDBinaryParser();