incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Re: 64-bit linux errors with t/core/032-string_helper.t
Date Mon, 18 Jan 2010 23:42:46 GMT
On Mon, Jan 18, 2010 at 01:45:19PM -0600, Peter Karman wrote:
> On 64-bit Centos 5 Linux with Perl 5.8.9 I get several failures for 
> t/core/032-string_helper.t.
> The issue seems to be related to the u8_t size of the i and max vars. It's 
> as if they are being evaluated as signed rather than unsigned. However, 
> even if I hardcode 'unsigned char' instead of the Charmonized 'u8_t' I 
> still get the same error (below).
> Changing to an int fixes it. But it doesn't make any sense to me why an 
> unsigned char wouldn't work.

I'll bet that what's actually going wrong is the promotion of the arguments
from "unsigned char" to "long" as they are being passed to ASSERT_INT_EQ.

To verify, try changing one of the tests from...

    ASSERT_INT_EQ(batch, StrHelp_UTF8_SKIP[i], 1, 
        "UTF8_SKIP ascii %d", (int)i);

    ASSERT_TRUE(batch, StrHelp_UTF8_SKIP[i] == 1, 
        "UTF8_SKIP ascii %d", (int)i);

If that's indeed the problem, I'd prefer not to fix it that way, as it will
cut down on the usefulness of verbose test output and make smoke test reports
harder to analyze.  Instead, we should add the following:


That's easier now that we're no longer using Charmonizer's test suite.

The choice of "TEST_*" rather than "ASSERT_*" is driven by the fact that
unlike typical xUnit tests, these return false on failure rather than throw

Marvin Humphrey

View raw message