lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Unit test not passing with libxml++


From: Greg Chicares
Subject: Re: [lmi] Unit test not passing with libxml++
Date: Mon, 16 Oct 2006 02:02:15 +0000
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

On 2006-10-15 23:55 UTC, Evgeniy Tarassov wrote:
> 
> On 10/15/06, Greg Chicares <address@hidden> wrote:
>> This unit test passes cleanly in MAIN, but has a problem on that
>> new branch:
> 
> There was a bug in inputillus_xml_io.cpp code -- it was not reading
> cell_version from the xml node but was using an empty string and the
> expression
>    int cell_version = value_cast<int>(cell_version_string);
> couldn't handle an empty string and threw an exception std::invalid_type.

That's deliberate, BTW. I've seen string-to-integer conversions
that return zero for an empty string argument. That may seem
"reasonable" because it's the identity element wrt addition.

In one actual case, however, a vendor system similar to 'lmi'
did exactly that for an input field that was a multiplier for
charges to be deducted from a customer's account. Zero isn't a
very good identity element for multiplcation.

> I have fixed it and commited to the gnome-xml-branch. Now the test
> passes without no error.

Confirmed.

>> This message
>>   "Document not well-formed."
>> appears when I try to load a saved '.ill' or '.cns' file, but I
> 
> There was also an issue with libxml++ putting a default empty value ""
> as xml document encoding which is not allowed. Fixed it by putting
> "utf-8" as a default encoding and commited into the same branch. Now
> loading works aswell.

Confirmed.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]