aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2013-06-12Tweak the JSON_DECODE_INT_AS_REAL test introduced in #123Petri Lehtinen1-6/+10
Only run the imprecision part if json_int_t is long long, otherwise the imprecision cannot be tested against json_int_t. Also, convert the double value to json_int_t before checking the imprecision, because otherwise the json_int_t is converted to double and the imprecision happens in the "wrong direction".
2013-06-11Using jsonp_strtod instead of casting to double to catch double overflowJason Choy1-3/+14
2013-06-11Renamed flag to JSON_DECODE_INT_AS_REAL and added documentationJason Choy1-1/+1
2013-06-09Added a simple test for the JSON_DECODE_NO_INT optionJason Choy1-0/+12
2013-06-07Added missing rv check - caught by clangJason Choy1-2/+2
2013-05-12Fixed "comparison between signed and unsigned" warningDaniel Griscom1-1/+1
2013-05-12Removed (non-functioning) printfs from test codeDaniel Griscom1-6/+0
2013-05-12Added test cases and documentation for json_array_foreach()Daniel Griscom2-2/+28
2013-04-29test:suites:api: modified error messageAndrei Epure1-1/+1
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>
2013-04-15Merge branch '2.4'Petri Lehtinen1-1/+4
2013-04-15Fix the signature again, and also rest of the errorsPetri Lehtinen1-1/+4
Next time, remember to check with -Werror first...
2013-04-15Merge branch '2.4'Petri Lehtinen1-1/+1
2013-04-15Fix the signature of a test functionPetri Lehtinen1-1/+1
2013-04-15Merge branch '2.4'Petri Lehtinen1-0/+21
2013-04-15json_dump*(): Don't crash if json is NULL and JSON_ENCODE_ANY is setPetri Lehtinen1-0/+21
2013-03-14Fix a refleak in test/bin/json_process.cPetri Lehtinen1-0/+1
2013-03-14Remove trailing whitespacePetri Lehtinen1-16/+16
2013-03-13Got rid of some warnings for unused variables.Joakim Söderberg1-6/+6
2013-03-13Add back the old ENV variabe approach to json_process.Joakim Söderberg6-19/+141
Enable using the old envrionment variable passing of settings for json_process so that the current autoconf test suite scripts can run nicely. json_process now takes an optional command line parameter --env which causes it to use the old method of reading the settings from environment variables instead of directly from the "env" file. Also added a --strip command line option, this will be used to run the stripped tests with CMake as well.
2013-03-07Get rid of type warning on MSVC.Joakim Soderberg1-1/+1
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.
2013-03-07Fix incorrect cast to ssize_t.Joakim Söderberg1-1/+0
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.
2013-03-07Always use LF as line ending so that we don't get any problems with lineJoakim Soderberg1-0/+2
endings in any tests.
2013-03-07Consolidated the CMake project.Joakim Soderberg3-102/+154
- 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)
2013-03-07Add CMake build system.Paul Harris1-0/+31
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).
2013-02-05check-exports test: Filter out symbols that start with an underscorePetri Lehtinen1-1/+1
These are usually internal to libc, and such symbols are exported in the shared library on some platforms.
2013-02-04Enable gcc specific flags in tests correctlyPetri Lehtinen4-4/+2
... and fix issues found.
2012-12-04Really fix the off-by-one error in json_array_remove()Petri Lehtinen1-2/+2
It didn't affect only the last element but all of them. One item too much was always moved.
2012-12-04Fix an off-by-one error in json_array_remove()Petri Lehtinen1-0/+14
Uninitialized memory was read when the last item of a "full" array was removed.
2012-10-26Support building and testing with VPATH.Bert Wesarg2-2/+2
2012-09-13Disallow NaN or Inf real valuesPetri Lehtinen1-0/+31
2012-08-11Merge branch '2.3'Petri Lehtinen1-1/+1
2012-08-11fix check-exports test on ppc642.3Alessandro Ghedini1-1/+1
2012-07-30Add json_boolean() macroPetri Lehtinen1-0/+16
Mostly for symmetry reasons. Makes it easier e.g. to: int ok = 0; if(something) ok = 1; json_object_set_new(obj, "ok", json_boolean(ok)); Fixes #86.
2012-06-29Merge branch 'fix-slash' of git://github.com/jrbasso/janssonPetri Lehtinen1-0/+25
Fixes #81.
2012-06-28Created flag to dump escaping slashJuan Basso2-1/+26
2012-06-27Escaping the slash when dumpJuan Basso1-1/+1
2012-06-06Merge branch '2.3'Petri Lehtinen2-14/+14
2012-06-06Bugfix: must cast void* to do pointer mathPaul Harris1-2/+2
Fixes #78.
2012-06-06Bugfix: Changed all use of ssize_t to size_t.Paul Harris1-12/+12
ssize_t is only used in a test, and its comparing to a size_t variable. Fixes #77.
2012-04-29Support building on WindowsPetri Lehtinen1-91/+9
Jansson now builds correctly with Visual C++ Express 2010.
2012-04-26Merge branch '2.3'Petri Lehtinen1-1/+12
2012-04-26Check for missing args and envvars in run-tests.shPetri Lehtinen1-1/+12
Fixes #71.
2012-03-26Document and tweak json_load_callback()Petri Lehtinen1-1/+1
Change the return value of json_load_callback_t to size_t, as it's feels more correct. The callback should return (size_t)-1 on failure. Issue #57.
2012-03-25Ignore the binary test_load_callbackRogerz1-0/+1
2012-03-22Merge branch '2.3'Petri Lehtinen1-2/+4
2012-03-22Add json_load_callback to the list of exported symbolsPetri Lehtinen1-1/+2
2012-03-22Add json_load_callback()Rogerz Zhang2-0/+76
2012-03-22Make test stripping locale independentPetri Lehtinen1-2/+4
2012-03-20Update copyright notices for 2012Petri Lehtinen21-23/+23
2012-03-08Fix tests on shells that don't support the export FOO=bar syntaxPetri Lehtinen11-17/+28