On 2016-03-25 10:36:20, MBARBON wrote:
Show quoted text> On Sun Mar 20 09:51:44 2016, SREZIC wrote:
> > On a freebsd 9.2 (with standard compiler gcc 4.2.1) t/040_messages.t
> > fails:
> >
> > # Failed test at t/040_messages.t line 60.
> > # +----+------------------------------+----
> > +------------------------------+
> > # | Elt|Got | Elt|Expected
> > |
> > # +----+------------------------------+----
> > +------------------------------+
> > # | 0|bless( { | 0|bless( {
> > |
> > # | 1| optional_inner => bless( { | 1| optional_inner =>
> > bless( { |
> > # | 2| other => 7, | 2| other => 7,
> > |
> > # | 3| value => 2 | 3| value => 2
> > |
> > # * 4| }, 'Inner' ), * 4| }, 'Inner' )
> > *
> > # * 5| repeated_inner => undef * |
> > |
> > # | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' )
> > |
> > # +----+------------------------------+----
> > +------------------------------+
> > # Looks like you failed 1 test of 6.
> > t/040_messages.t ............
> > Dubious, test returned 1 (wstat 256, 0x100)
> > Failed 1/6 subtests
>
> Could you try re-running the test with this patch aplied and attach
> the output?
>
> diff --git a/src/mapper.cpp b/src/mapper.cpp
> index c23cb37..1095971 100644
> --- a/src/mapper.cpp
> +++ b/src/mapper.cpp
> @@ -95,7 +95,7 @@ bool
> Mapper::DecoderHandlers::apply_defaults_and_check() {
> for (int i = 0, n = fields.size(); i < n; ++i) {
> const Mapper::Field &field = fields[i];
> bool field_seen = seen[i];
> -
> + printf("%s %d %d\n", field.full_name().c_str(), field_seen,
> field.has_default);
> if (!field_seen && decode_explict_defaults &&
> field.has_default) {
> SV *target = get_target(&i);
>
Output fragment of ./Build test verbose=1:
t/040_messages.t ............
ok 1
ok 2
ok 3
ok 4
not ok 5
# Failed test at t/040_messages.t line 60.
# +----+------------------------------+----+------------------------------+
# | Elt|Got | Elt|Expected |
# +----+------------------------------+----+------------------------------+
# | 0|bless( { | 0|bless( { |
# | 1| optional_inner => bless( { | 1| optional_inner => bless( { |
# | 2| other => 7, | 2| other => 7, |
# | 3| value => 2 | 3| value => 2 |
# * 4| }, 'Inner' ), * 4| }, 'Inner' ) *
# * 5| repeated_inner => undef * | |
# | 6|}, 'OuterWithMessage' ) | 5|}, 'OuterWithMessage' ) |
# +----+------------------------------+----+------------------------------+
ok 6
1..6
# Looks like you failed 1 test of 6.
test.Inner.value 1 1
test.Inner.other 0 1
test.Inner.value 1 1
test.Inner.other 0 1
test.Inner.value 1 1
test.Inner.other 0 1
test.OuterWithMessage.optional_inner 1 255
test.OuterWithMessage.repeated_inner 1 255
test.OuterWithGroup.Inner.value 1 1
test.OuterWithGroup.Inner.value 1 1
test.OuterWithGroup.inner 1 8
test.Inner.value 1 1
test.Inner.other 0 1
test.Inner.value 0 1
test.Inner.other 1 1
test.OuterWithMessage.optional_inner 1 255
test.OuterWithMessage.repeated_inner 0 255
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/6 subtests
For some reason this test does not fail if it's executed directly using "perl -Mblib t/040_messages.t".