Commit graph

5 commits

Author SHA1 Message Date
Colin Campbell
732ad864f6 Bug 11480: Fix invalid assumptions in JSONStream test
Tests for C4::Output::JSONStream made the invalid assumption
that the hash keys of the modules internal structure
will always be returned in the same sequence.
A hash is an unordered structure. as of perl 5.18
this has beem reinforced by random seeding of the
hashing function. See the info in perldelta and
the doc for JSON.

This patch changes the tests to be sequence-neutral
where the previous test was testing that a new element
was added and an existing one was untouched these have
been separated into individual tests.

Some typos in the messages have been corrected

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Test Plan

1/ Run t/Output_JSONStream.t , 8 tests should pass (or perhaps fail,
   but inconsistently under perl 5.18 or greater)
2/ Apply patch
3/ Run t/Output_JSONStream.t 10 tests should pass now

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-01-10 15:42:17 +00:00
Chris Cormack
d64008644a Bug 5327 fixing missing number of tests 2011-01-21 11:28:58 +13:00
Zach Sim
5f0f2e297a Added more unit tests to check when JSONStream should fail.
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-21 10:57:00 +13:00
Zach Sim
434d9a3c66 Bug 5327: Added unit tests to Output_JSONStream.t
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-21 09:52:17 +13:00
Katrin Fischer
e0892a5139 Bug 5327: More basic unit tests for C4 modules
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-01 15:35:50 +13:00