diff options
author | Mark Pulford <mark@kyne.com.au> | 2012-01-16 13:26:52 +0400 |
---|---|---|
committer | Mark Pulford <mark@kyne.com.au> | 2012-03-04 12:24:34 +0400 |
commit | 1c1adf1f43b78ac73617437d97d191546d9d6ab7 (patch) | |
tree | 0b7b116aa72f99eff96f431b66fe809ba7f3b2b4 /tests | |
parent | efed00e617c5ff68d672a148190dcb7c0bbacaa7 (diff) |
Place nested data structure inline with tests
Make the tests more explicit, the nested data structure doesn't need to
be generated in advance.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test.lua | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test.lua b/tests/test.lua index 424a630..43f48ad 100755 --- a/tests/test.lua +++ b/tests/test.lua @@ -64,8 +64,6 @@ function load_testdata() data.utf8_raw = "Failed to load utf8.dat" end - data.nested5 = {{{{{ "nested" }}}}} - data.table_cycle = {} data.table_cycle[1] = data.table_cycle @@ -219,9 +217,9 @@ local all_tests = { true, { '{"2":"numeric string key test"}' } }, { "Encode nested table", - json.encode, { testdata.nested5 }, true, { '[[[[["nested"]]]]]' } }, + json.encode, { {{{{{"nested"}}}}} }, true, { '[[[[["nested"]]]]]' } }, { "Encode nested table (throw error)", - json.encode, { { testdata.nested5 } }, + json.encode, { { {{{{{"nested"}}}}} } }, false, { "Cannot serialise, excessive nesting (6)" } }, { "Encode table with cycle", json.encode, { testdata.table_cycle }, |