Subject: | t/testInconsistent.t test fails randomly |
t/testInconsistent.t fails randomly:
$ perl -Ilib t/testInconsistent.t
ok 1 - use testInconsistent1 found no inconsistencies
not ok 2 - use testInconsistent2 found expected inconsistencies
# Failed test 'use testInconsistent2 found expected inconsistencies'
# at t/testInconsistent.t line 13.
# 'Inconsistent declarations for attribute(s) b a
# Attribute b: declared instance attribute in testInconsistent2, class attribute in testInconsistent1
# Attribute a: declared instance attribute in testInconsistent1, class attribute in testInconsistent2 at lib/Class/AutoClass.pm line 540.
# Class::AutoClass::declare('testInconsistent2') called at t/testInconsistent2.pm line 12
# require testInconsistent2.pm called at (eval 10) line 2
# main::BEGIN() called at t/testInconsistent2.pm line 0
# eval {...} called at t/testInconsistent2.pm line 0
# eval 'use testInconsistent2' called at t/testInconsistent.t line 12
# Compilation failed in require at (eval 10) line 2.
# BEGIN failed--compilation aborted at (eval 10) line 2.
# '
# doesn't match '(?^:^Inconsistent declarations for attribute\(s\) a b)'
1..2
# Looks like you failed 1 test of 2.
This happens with perl-5.18.2. It's caused by randomized hash key order probably.