Re: fetching unset GParamSpec property



muppet <scott asofyet org> writes:

    Glib::Log->set_handler ('GLib-GObject', 'critical', sub {
            print "Hijacked failed assertion message: $_[2]\n";
    });

You'd be tempted to make any logged messages fatal in the test suite,
perhaps with selected exceptions that are meant to exercise dodgy stuff.

I'd be tempted to add an ok(1) in there, but you can build glib with
assertions turned off.

Ah, so the g_return_val_if_fail() in g_param_spec_int() for min>max can
be completely omitted ... which means the return is not necessarily
undef in the tests I wrote anyway.



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