[perl-Gtk2/stable-1-22] Fix a test failure in GtkRecentChooser.t



commit 658df614815145a50e42f4c9b5ebc793dda7b522
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun May 30 14:15:04 2010 +0200

    Fix a test failure in GtkRecentChooser.t
    
    Don't assume a fixed order of the stored URIs.

 t/GtkRecentChooser.t |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/t/GtkRecentChooser.t b/t/GtkRecentChooser.t
index 230d598..b09e6fe 100644
--- a/t/GtkRecentChooser.t
+++ b/t/GtkRecentChooser.t
@@ -71,8 +71,9 @@ $chooser -> set_select_multiple(TRUE);
 $chooser -> select_all();
 $chooser -> unselect_all();
 
-is_deeply([$chooser -> get_uris()], [$uri_two, $uri_one]);
-is_deeply([map { $_ -> get_uri() } $chooser -> get_items()], [$uri_two, $uri_one]);
+my @expected_uris = sort ($uri_two, $uri_one);
+is_deeply([sort $chooser -> get_uris()], \ expected_uris);
+is_deeply([sort map { $_ -> get_uri() } $chooser -> get_items()], \ expected_uris);
 
 my $filter_one = Gtk2::RecentFilter -> new();
 my $filter_two = Gtk2::RecentFilter -> new();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]