1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
Description: use Test::Deep against hash randomisation causing test failures
Origin: vendor
Bug: http://rt.cpan.org/Public/Bug/Display.html?id=85970
Forwarded: http://rt.cpan.org/Public/Bug/Display.html?id=85970
Bug-Debian: http://bugs.debian.org/711572
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2013-10-29
--- a/t/06bugs_select_zero_key_constraint.t
+++ b/t/06bugs_select_zero_key_constraint.t
@@ -1,7 +1,8 @@
use strict;
use warnings;
-use Test::More tests => 3;
+use Test::More tests => 2;
+use Test::Deep;
use HTML::Widget;
use lib 't/lib';
@@ -20,7 +21,5 @@
my $keys = $constraints[0]->in;
-is( $keys->[0], 1, 'constraint value' );
-
-is( $keys->[1], 0, 'constraint value' );
+cmp_bag( $keys, [0, 1], 'constraint values' );
--- a/t/get_errors.t
+++ b/t/get_errors.t
@@ -2,6 +2,7 @@
use warnings;
use Test::More tests => 6;
+use Test::Deep;
use HTML::Widget;
use lib 't/lib';
@@ -27,7 +28,7 @@
type => 'OtherType'
} );
- is_deeply( [
+ cmp_bag( [
new HTML::Widget::Error( {
type => 'OtherType',
name => 'baz',
@@ -85,7 +86,7 @@
"Errors correct with name provided"
);
- is_deeply( [
+ cmp_bag( [
new HTML::Widget::Error( {
type => 'OtherType',
name => 'baz',
|