summaryrefslogtreecommitdiff
path: root/tests/common.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add support for stdin to encode.lua/decode.luaMark Pulford2011-05-161-8/+25
|
* Move all benchmark code into bench.luaMark Pulford2011-05-161-39/+0
| | | | | Move benchmark() into bench.lua since it not used elsewhere. Replace posix.gettimeofday() with socket.gettime() to improve portability.
* Warn that a failed NaN test may not be an errorMark Pulford2011-05-161-1/+3
| | | | | | | Sprintf returns "-nan" rather than "nan" on some platforms, which causes the test script to incorrectly flag a failure. Also allow test functions without "==> Config" output.
* Remove trailing whitespace1.0.1Mark Pulford2011-05-101-1/+1
|
* run_test_group(): Change helper functions to localMark Pulford2011-05-101-2/+2
|
* Suspend the garbage collector during benchmarksMark Pulford2011-05-101-1/+2
| | | | Suspending GC appears to make the benchmark results more consistent.
* Add extra encoding/nesting testsMark Pulford2011-05-101-5/+13
| | | | | | - Use pcall() to call test config functions. - Test encoding with refuse_invalid_numbers() options. - Test encoding invalid types.
* Add test for excessive nesting during encodeMark Pulford2011-05-081-6/+11
|
* Add UTF-16 surrogate pair decode supportMark Pulford2011-05-081-0/+4
| | | | | | | | - Add tests for UTF-16 decoding and failures - Add getutf8.pl to assist with UTF-16 decode testing - Re-add test_decode_cycle() which was accidentally removed earlier - Rename bytestring.dat to octets-escaped.dat
* Implement data driven test frameworkMark Pulford2011-05-081-21/+147
| | | | | | | | - Add run_test(): Test a function and verify its output - Add run_test_group(): Execute a test batch - Add serialise_value(): Serialise a Lua value into the Lua syntax - Add file_save() helper function - Add NaN comparison support to compare_values()
* Add test to compare objects after decode/encodeMark Pulford2011-05-071-0/+31
|
* Add basic JSON tests and benchmarkMark Pulford2011-05-031-0/+79