[Koha-bugs] [Bug 11480] Tests in Output_JSON.t make invalid assumptions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 7 02:31:47 CET 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11480

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23973|0                           |1
        is obsolete|                            |

--- Comment #2 from Chris Cormack <chris at bigballofwax.co.nz> ---
Created attachment 23981
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=23981&action=edit
Bug 11480 Fix invalid assumptions in test

Tests for Output::JSON 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 at 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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list