aboutsummaryrefslogtreecommitdiff
path: root/test/bin
AgeCommit message (Collapse)AuthorFilesLines
2024-03-25Simplify tests even morePetri Lehtinen1-4/+1
Drop the useless `export` lines from `env` files.
2024-03-21Refactor tests to work better with CMakePetri Lehtinen1-117/+15
2020-11-05Use size_t to receive result from fread()/ftell().Kelvin Lee1-1/+1
2019-10-21Tweak clang-format configuration a bitPetri Lehtinen1-8/+6
Set ColumnLimit to 90, remove AllowShortCaseLabelsOnASingleLine.
2019-10-21Run clang-format on *.c, *.hPetri Lehtinen1-58/+41
2016-09-18Update copyrights for 2016Petri Lehtinen1-1/+1
2014-07-16Fix whitespace issuesIan T. Jacobsen1-4/+4
2014-07-16Fixed cases where file would be opened, but not closed. And small realloc ↵Ian T. Jacobsen1-3/+7
memory issue.
2014-04-30Add JSON_REAL_PRECISIONPetri Lehtinen1-5/+24
Fixes #178.
2014-02-11Merge branch '2.6'Petri Lehtinen1-1/+15
2014-02-11CVE-2013-6401: Change hash function, randomize hashesPetri Lehtinen1-1/+15
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
2014-02-11expect "export" in test configsChip Salzenberg1-4/+3
2014-01-28Update copyrights for 2014Petri Lehtinen1-1/+1
2014-01-27Renamed config.h -> jansson_private_config.hJoakim Soderberg1-1/+1
This is because it's really easy to get a name collission if compiling Jansson as a subproject in a larger CMake project. If one project includes several subprojects each having their own config.h, this will cause the wrong file to be loaded.
2013-09-27expect "export" in test configsChip Salzenberg1-4/+3
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öderberg1-15/+136
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-07Consolidated the CMake project.Joakim Soderberg1-71/+148
- 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-02-04Enable gcc specific flags in tests correctlyPetri Lehtinen2-2/+1
... and fix issues found.
2012-10-26Support building and testing with VPATH.Bert Wesarg1-1/+1
2012-03-22Make test stripping locale independentPetri Lehtinen1-2/+4
2012-03-20Update copyright notices for 2012Petri Lehtinen1-1/+1
2011-11-01Fix test file comparisons on MinGWPetri Lehtinen1-0/+12
Don't output any DOS line terminators from json_process. Issue GH-39.
2011-10-02Make real number encoding and decoding work under all localesPetri Lehtinen1-0/+12
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.
2011-02-22Refactor decoder input streamPetri Lehtinen1-2/+54
- Add a new field position to the json_error_t structure. This is the position in bytes from the beginning of the input. - Keep track of line, column and input position in the stream level. Previously, only line was tracked, and it was in the lexer level, so this info was not available for UTF-8 decoding errors. - While at it, refactor tests so that no separate "stripped" tests are required. json_process is now able to strip whitespace from its input, and the "valid" and "invalid" test suites now use this to test both non-stripped and stripped input. Closes GH-9.
2011-01-22Update copyright notices for 2011Petri Lehtinen1-1/+1
2010-10-26Make json_error_t transparent againPetri Lehtinen1-5/+2
After looking at the new code for a few days, I didn't like it anymore. To prepare for the future, a few fields will be added to the json_error_t struct later. This reverts commit 23dd078c8dcb17fd29d3b69f082b5b93f5f13b8f. Some adjustments were needed because of newer commits.
2010-10-14Make json_error_t opaquePetri Lehtinen1-2/+5
All decoding functions now accept a json_error_t** parameter and set it to point to a heap-allocated json_error_t structure if an error occurs. The contents of json_error_t are no longer exposed directly, a few functions to do it have been added instead. If an error occurs, the user must free the json_error_t value. This makes it possible to enhance the error reporting facilities in the future without breaking ABI compatibility with older versions. This is a backwards incompatible change.
2010-08-14Add a flags parameter to all decoding functions for future needsPetri Lehtinen1-1/+1
As of now, the parameter is unused, but may be needed in the future. I'm adding it now so that in the future both API and ABI remain backwards compatible as long as possible. This is a backwards incompatible change.
2010-06-15Unify unsigned integer usage in the APIPetri Lehtinen1-1/+1
Replace all occurences of unsigned int and unsigned long with size_t. This is a backwards incompatible change, as the signature of many API functions changes.
2010-02-11Implement JSON_PRESERVE_ORDER encoding flagPetri Lehtinen1-0/+3
With this encoding flag, the object key-value pairs in output are in the same order in which they were first inserted into the object. To make this possible, a key of an object is now a serial number plus a string. An object keeps an increasing counter which is used to assign serial number to the keys. Hashing, comparison and public API functions were changed to act only on the string part, i.e. the serial number is ignored everywhere else but in the encoder, where it's used to order object keys if JSON_PRESERVE_ORDER flag is used.
2010-02-02Add year 2010 to copyright noticesPetri Lehtinen1-1/+1
2009-12-16Implement JSON_SORT_KEYS encoding flagPetri Lehtinen1-0/+3
With this flag, the objects are sorted by key when encoding.
2009-12-16Refactor the test systemPetri Lehtinen2-0/+72