[perl-Glib] Try to fix another test failure in 9.t



commit 08c540ab403ac375f795b673c1fe040cfdeab5ad
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Sun May 30 15:43:08 2010 +0200

    Try to fix another test failure in 9.t
    
    The report
    <http://www.cpantesters.org/cpan/report/05690316-b19f-3f77-b713-d32bba55d77f>
    indicates that the context of the loop we've been using for stuff still
    has events pending, whereas we assume it doesn't.  Try to fix this by
    using a new context when testing the pending() and is_owner() methods.

 t/9.t |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/t/9.t b/t/9.t
index ed8ec85..e723f4f 100644
--- a/t/9.t
+++ b/t/9.t
@@ -180,15 +180,14 @@ print Glib::MainContext->new ?
 print Glib::MainContext->default ?
   "ok 20\n" : "not ok 20\n";
 
-my $context = $loop->get_context;
-print $context ?
+print $loop->get_context ?
   "ok 21\n" : "not ok 21\n";
 
-print $context->pending ?
+print Glib::MainContext->new->pending ?
   "not ok 22\n" : "ok 22\n";
 
 if (Glib->CHECK_VERSION (2, 12, 0)) {
-  print $context->is_owner ?
+  print Glib::MainContext->new->is_owner ?
     "not ok 23\n" : "ok 23\n";
   print Glib::MainContext::is_owner(undef) ?
     "not ok 24\n" : "ok 24\n";



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