]> git.ipfire.org Git - thirdparty/json-c.git/commit
tests: test1: add test cases for json_object_array_insert_idx()
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Tue, 20 Apr 2021 13:07:26 +0000 (16:07 +0300)
committerEric Hawicz <erh+git@nimenees.com>
Tue, 1 Aug 2023 02:17:30 +0000 (22:17 -0400)
commitd5c5b2caec671dd2235dddac5b9c790e36cb0671
treeabd4b331f5a857a31de833541e5725751cd2020d
parenta86d7a8f5aa5d47a315931fe11e9316a2be5045f
tests: test1: add test cases for json_object_array_insert_idx()

This change adds a few test cases to test the behavior of the new
json_object_array_insert_idx() function, to make sure it behaves according
to specification in doc-string.

This test uses assert() vs the old method of comparing outputs.
This will cause the test to fail because the outputs won't match, since the
assert() will kick in.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
tests/test1.c