[folks] tests: Fix printerr() handler in TestCase



commit 6e8949a42ebb767c3d82039365e5204422e26d50
Author: Philip Withnall <philip tecnocode co uk>
Date:   Fri Jan 6 14:33:52 2012 +0000

    tests: Fix printerr() handler in TestCase
    
    It was always getting a null message due to having an extraneous extra
    parameter (in its C form), meaning that stacktraces from failed assertions
    in test cases were never getting printed.

 tests/lib/test-case.vala |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/tests/lib/test-case.vala b/tests/lib/test-case.vala
index c59f7a1..f903370 100644
--- a/tests/lib/test-case.vala
+++ b/tests/lib/test-case.vala
@@ -71,14 +71,13 @@ public abstract class Folks.TestCase : Object
 
       public void set_up (void* fixture)
         {
-          GLib.set_printerr_handler (
-              (PrintFunc) this._printerr_func_stack_trace);
+          GLib.set_printerr_handler (this._printerr_func_stack_trace);
           Log.set_default_handler (this._log_func_stack_trace);
 
           this._test_case.set_up ();
         }
 
-      private void _printerr_func_stack_trace (string? text)
+      private static void _printerr_func_stack_trace (string? text)
         {
           if (text == null || str_equal (text, ""))
             return;



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