mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
VL unit test.
This commit is contained in:
@@ -545,6 +545,21 @@ void STObject::unitTest()
|
|||||||
ssw.write(std::cerr, copy.getJson(0));
|
ssw.write(std::cerr, copy.getJson(0));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
for (int i = 0; i < 1000; i++)
|
||||||
|
{
|
||||||
|
std::cerr << "tol: i=" << i << std::endl;
|
||||||
|
std::vector<unsigned char> j(i, 2);
|
||||||
|
object1.setValueFieldVL(sfTest1, j);
|
||||||
|
|
||||||
|
Serializer s;
|
||||||
|
object1.add(s);
|
||||||
|
SerializerIterator it(s);
|
||||||
|
STObject object3(testSOElements[0], it, "TestElement3");
|
||||||
|
|
||||||
|
if (object1.getValueFieldVL(sfTest1) != j) throw std::runtime_error("STObject error");
|
||||||
|
if (object3.getValueFieldVL(sfTest1) != j) throw std::runtime_error("STObject error");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// vim:ts=4
|
// vim:ts=4
|
||||||
|
|||||||
Reference in New Issue
Block a user