Eric Haszlakiewicz
fcad0ec015
PR #336 : since we can't use function overriding (due to problems with it on
...
OSX) always include the _json_c_strerror function but only enable it with a flag
during tests.
2017-07-15 07:12:44 -07:00
Alexandru Ardelean
fb72160caf
build: make strerror() override-able
...
If we want to override `strerror()` in libjson-c
to make tests consistent across platforms, we
need to do it build-wide as configure/build
option.
Apple linkers make it really hard to override functions
at link-time, and this seems to be locked down on travis-ci.org
[ for security reasons I assume ].
While I got it to work locally, it did not work
when running on travis.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-07-13 10:27:24 +03:00
Alexandru Ardelean
7b9432d564
tests: fix leak in test_util_file ; found by cppcheck
...
Which now seems to fail the build.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com >
2017-07-13 09:05:13 +03:00
Eric Haszlakiewicz
e8e574fbe4
Issue #161 : add a json_object_to_fd() function.
2017-06-18 18:44:45 +00:00
Eric Haszlakiewicz
9a64fd7d55
Issue #300 : Use %p instead of %lx in test_util_file since some platforms' pointers are larger than "unsigned long".
...
Also, there's no need to worry about output consistency here, since it'll be
different anyway due to different pointer values.
2017-02-05 04:38:53 +00:00
Eric Haszlakiewicz
0fcf1d1ae7
Fix memory leak and inconsistent output (due to varying fd numbers) in test_util_file.
2016-08-20 23:06:22 -04:00
Nicola Spanti (RyDroid)
8215c0ac0e
Very minor changes to some tests
2016-08-13 00:53:33 +02:00
Eric Haszlakiewicz
7d637362b7
Linux's %p format doesn't return "0x0" for NULL pointers, so switch to using %lx for consistency.
2016-07-30 15:09:51 -04:00
Eric Haszlakiewicz
2b255d0ebf
Fix absolute paths in test_util_file that vary depending on where it is run.
2016-06-27 04:30:10 +00:00
Eric Haszlakiewicz
29ef73f21d
Issue #189 : Eliminate use of MC_ERROR from json_util.c, and add a json_util_get_last_err() function to retrieve the error for those callers that care about it.
...
Add tests and descriptions for the functions in json_util.c
2016-06-26 02:20:33 +00:00