summary refs log tree commit diff
path: root/pkgs/development/perl-modules/MooseXAttributeHelpers-perl-5.20.patch
blob: 161f79a637be3b1f281aa0317ad0449ba90e49b7 (plain) (blame)
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
diff --git a/t/003_basic_hash.t b/t/003_basic_hash.t
index 1f842ae..c21ac52 100644
--- a/t/003_basic_hash.t
+++ b/t/003_basic_hash.t
@@ -170,10 +170,10 @@ is_deeply($options->provides, {
 is($options->type_constraint->type_parameter, 'Str', '... got the right container type');
 
 $stuff->set_option( oink => "blah", xxy => "flop" );
-my @key_value = $stuff->key_value;
+my @key_value = sort{ $a->[0] cmp $b->[0] } $stuff->key_value;
 is_deeply(
     \@key_value,
-    [ [ 'xxy', 'flop' ], [ 'quantity', 4 ], [ 'oink', 'blah' ] ],
+    [ sort{ $a->[0] cmp $b->[0] } [ 'xxy', 'flop' ], [ 'quantity', 4 ], [ 'oink', 'blah' ] ],
     '... got the right key value pairs'
 );
 
diff --git a/t/203_trait_hash.t b/t/203_trait_hash.t
index 8e876b1..451c0bb 100644
--- a/t/203_trait_hash.t
+++ b/t/203_trait_hash.t
@@ -156,10 +156,10 @@ is_deeply($options->provides, {
 is($options->type_constraint->type_parameter, 'Str', '... got the right container type');
 
 $stuff->set_option( oink => "blah", xxy => "flop" );
-my @key_value = $stuff->key_value;
+my @key_value = sort{ $a->[0] cmp $b->[0] } $stuff->key_value;
 is_deeply(
     \@key_value,
-    [ [ 'xxy', 'flop' ], [ 'quantity', 4 ], [ 'oink', 'blah' ] ],
+    [ sort{ $a->[0] cmp $b->[0] } [ 'xxy', 'flop' ], [ 'quantity', 4 ], [ 'oink', 'blah' ] ],
     '... got the right key value pairs'
 );