--- e.t 02 Jun 2008 09:56:28 +1000 1.2 +++ e.t 23 Jun 2008 16:50:32 +1000 @@ -3,7 +3,7 @@ # use strict; use Glib ':constants'; -use Test::More tests => 231; +use Test::More tests => 237; # first register some types with which to play below. @@ -132,6 +132,7 @@ # we only know one boxed type at this point. 'Glib::Scalar', G_PARAM_READWRITE); pspec_common_ok ($pspec, 'Boxed', G_PARAM_READWRITE, 'Glib::Scalar'); +is ($pspec->get_default_value, undef, 'Boxed default'); push @params, $pspec; @@ -139,6 +140,7 @@ 'I object, Your Honor, that\'s pure conjecture!', 'Skeezle', G_PARAM_READWRITE); pspec_common_ok ($pspec, 'Object', G_PARAM_READWRITE, 'Skeezle'); +is ($pspec->get_default_value, undef, 'Object default'); push @params, $pspec; @@ -154,6 +156,7 @@ ok ($pspec->get_flags == G_PARAM_READWRITE, 'Param flags'); is ($pspec->get_value_type, 'Glib::Param::Enum', 'Param value type'); ok (! $pspec->get_owner_type, 'Param owner type'); +is ($pspec->get_default_value, undef, 'Param default'); push @params, $pspec; @@ -171,6 +174,7 @@ $pspec = Glib::ParamSpec->IV ('iv', 'IV', 'This is the same as Int', -20, 10, -5, G_PARAM_READWRITE); +is ($pspec->get_default_value, -5, 'IV default'); isa_ok ($pspec, 'Glib::Param::Long', 'IV is actually Long'); push @params, $pspec; @@ -179,6 +183,7 @@ 'This is the same as UInt', 10, 20, 15, G_PARAM_READWRITE); isa_ok ($pspec, 'Glib::Param::ULong', 'UV is actually ULong'); +is ($pspec->get_default_value, 15, 'UV default'); push @params, $pspec; @@ -187,6 +192,7 @@ G_PARAM_READWRITE); isa_ok ($pspec, 'Glib::Param::Boxed', 'Scalar is actually Boxed'); is ($pspec->get_value_type, 'Glib::Scalar', 'boxed holding scalar'); +is ($pspec->get_default_value, undef, 'Scalar default'); push @params, $pspec;