tests: add test_deep_copy test

Seems to perform better than outputting to string
and re-parsing it.

BENCHMARK - 1000000 iterations of 'dst2 = json_tokener_parse(json_object_get_string(src2))' took 20 seconds
BENCHMARK - 1000000 iterations of 'dst2 = json_tokener_parse(json_object_get_string(src2))' took 7 seconds

It should make a difference on embedded systems.
The test was performed on a i5 desktop CPU [~3.5 years of age].

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
Alexandru Ardelean
2017-06-16 10:50:49 +03:00
parent bf80d5ad0e
commit 1eab22f0da
5 changed files with 318 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ TESTS+= test2.test
TESTS+= test4.test
TESTS+= testReplaceExisting.test
TESTS+= test_parse_int64.test
TESTS+= test_deep_copy.test
TESTS+= test_null.test
TESTS+= test_cast.test
TESTS+= test_double_serializer.test