<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lua-cjson/tests/common.lua, branch 2.1.0.19</title>
<subtitle>A mirror of https://github.com/openresty/lua-cjson
</subtitle>
<id>https://git.lua4.win/lua-cjson/atom?h=2.1.0.19</id>
<link rel='self' href='https://git.lua4.win/lua-cjson/atom?h=2.1.0.19'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/'/>
<updated>2012-01-03T10:55:31+00:00</updated>
<entry>
<title>Convert common.lua into cjson-misc module</title>
<updated>2012-01-03T10:55:31+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2012-01-03T10:55:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=041a32e52f694b68a881a72b7cb5f62aca449400'/>
<id>urn:sha1:041a32e52f694b68a881a72b7cb5f62aca449400</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add support for Lua 5.2 and cjson.new</title>
<updated>2011-12-30T07:18:12+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-12-30T07:18:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=85bf3b798f6d52c374c35f7fbe47df132891d3b2'/>
<id>urn:sha1:85bf3b798f6d52c374c35f7fbe47df132891d3b2</id>
<content type='text'>
Update all Lua scripts to use new module init style everywhere:
	local json = require "cjson"

Lua CJSON does not register a global table under Lua 5.2. The global
table can be disabled under Lua 5.1 with DISABLE_CJSON_GLOBAL.

Other changes:
- Store CJSON configuration as an upvalue for each function.
- Add "cjson.new" function to create another module table with a
  separate configuration.
- Add _NAME and _VERSION variables.
</content>
</entry>
<entry>
<title>Update build testing to show test counts/failures</title>
<updated>2011-12-13T12:36:06+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-12-13T12:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=8e5aa7cfe7b873b4eb8dd522054e16a67fb66ca8'/>
<id>urn:sha1:8e5aa7cfe7b873b4eb8dd522054e16a67fb66ca8</id>
<content type='text'>
Display failed tests, and successful/total test counts.
Use "awk" to provide a portable "ggrep -E" with context.
</content>
</entry>
<entry>
<title>Add support for stdin to encode.lua/decode.lua</title>
<updated>2011-05-16T10:16:05+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-05-16T10:16:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=6ba7499ac5992c8cc849ffcbd6d2837d305f5b63'/>
<id>urn:sha1:6ba7499ac5992c8cc849ffcbd6d2837d305f5b63</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move all benchmark code into bench.lua</title>
<updated>2011-05-16T09:51:06+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-05-16T09:51:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=a966d2fd2aaff7651d7928fb8381a17bf1f5f517'/>
<id>urn:sha1:a966d2fd2aaff7651d7928fb8381a17bf1f5f517</id>
<content type='text'>
Move benchmark() into bench.lua since it not used elsewhere.
Replace posix.gettimeofday() with socket.gettime() to improve portability.
</content>
</entry>
<entry>
<title>Warn that a failed NaN test may not be an error</title>
<updated>2011-05-15T14:38:00+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-05-15T14:38:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=2cb7a17e3e5a0bab761661e193ffbea146dade73'/>
<id>urn:sha1:2cb7a17e3e5a0bab761661e193ffbea146dade73</id>
<content type='text'>
Sprintf returns "-nan" rather than "nan" on some platforms, which causes
the test script to incorrectly flag a failure.

Also allow test functions without "==&gt; Config" output.
</content>
</entry>
<entry>
<title>Remove trailing whitespace</title>
<updated>2011-05-10T13:16:44+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-05-10T13:16:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=132e8757bc800d51058e3e1e4d2d73a0279ca0ac'/>
<id>urn:sha1:132e8757bc800d51058e3e1e4d2d73a0279ca0ac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>run_test_group(): Change helper functions to local</title>
<updated>2011-05-10T13:12:37+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-05-10T13:12:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=812ebe6b8b9dfc53a5d476913741ed965e460a14'/>
<id>urn:sha1:812ebe6b8b9dfc53a5d476913741ed965e460a14</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Suspend the garbage collector during benchmarks</title>
<updated>2011-05-10T12:20:46+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-05-10T12:20:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=c877da6c1f84b19cd2e7e8154b4a0d0e355745a0'/>
<id>urn:sha1:c877da6c1f84b19cd2e7e8154b4a0d0e355745a0</id>
<content type='text'>
Suspending GC appears to make the benchmark results more consistent.
</content>
</entry>
<entry>
<title>Add extra encoding/nesting tests</title>
<updated>2011-05-10T10:22:19+00:00</updated>
<author>
<name>Mark Pulford</name>
<email>mark@kyne.com.au</email>
</author>
<published>2011-05-10T10:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/lua-cjson/commit/?id=2323b5d0839412f276415f661e3b058b55f5bd4c'/>
<id>urn:sha1:2323b5d0839412f276415f661e3b058b55f5bd4c</id>
<content type='text'>
- Use pcall() to call test config functions.
- Test encoding with refuse_invalid_numbers() options.
- Test encoding invalid types.
</content>
</entry>
</feed>
