In the "/* perform the same update again */" area the error
message should be "unable to update an non-empty object"
instead of "unable to update an empty object".
Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
We should use json_int_t instead of int, since this can be different
depending on platform. Also MSVC warns that this can cause "loss of
information" since it's converting long long to int.
gcc 4.2.1 warns about a possible incorrect cast to ssize_t when comparing against refcount, which is of type size_t. signed vs unsigned comparison.
Sinc warnings are treated as errors (as in the autoconf project) this would cause a compile error.
- Moved everything to one CMakeLists.txt
- Added support for the json_process test suites (instead of just the API
tests).
- Changed to use the modified json_process version that does away with the
environment variables (originally written by DanielT).
- Had to exclude "test_memory_funcs" on MSVC, since void pointer
arithmetics are not allowed as it is done in secure_malloc and
secure_free.
- Had to add a check for "ssize_t". This is not available on Windows and
maybe on some other platforms (used in test_pack.c)
- Result from running ctest (The failure seems unrelated to CMake, it's
just that the expected result is in a different order):
99% tests passed, 1 tests failed out of 121
Total Test time (real) = 1.31 sec
The following tests FAILED:
24 - valid__complex-array (Failed)
Added multiple CMake-related files to project.
Supports building the library and the tests.
See CMakeLists.txt for notes on how it works.
I had to adjust 3 existing files in order to disable some configuration
that should be taken care of by cmake/automake anyway.
I also added jansson.def from a future jansson version,
to test cmake's support for .def files (which works fine).
The decimal point '.' is changed to locale's decimal point
before/after JSON conversion to make C standard library's
locale-specific string conversion functions work correctly.
All the tests now call setlocale(LC_ALL, "") on startup to use the
locale set in the environment.
Fixes GH-32.