OUString::isEmpty()
Chris Sherlock
chris.sherlock79 at gmail.com
Fri Jan 15 20:27:51 PST 2016
Sorry all, I made an incredibly silly mistake - the last assertion is testing to false, not true! Sorry about that.
Total non-issue - apologies for the list-spam.
Chris
> On 16 Jan 2016, at 3:20 PM, Chris Sherlock <chris.sherlock79 at gmail.com> wrote:
>
> I’m sure I’m not doing something correctly, but when isEmpty() seems to be doing something odd on new OUString objects.
>
> The following is a code snippet that highlights the issue:
>
> OUString aString;
> if (aString.isEmpty())
> cout << “Detected as empty”;
> else
> cout << “Not detected as empty”;
>
> That gives me “Not detected as empty”.
>
> So I wrote a unit test, and it’s failing.
>
> You can see the unit test here:
>
> https://gerrit.libreoffice.org/#/c/21506/
>
> Same basic thing - the test fails!
>
> Any ideas what is going on here? My understanding was that if you create a new OUString then it should initialize itself to an empty string. That doesn’t seem to be occuring...
>
> Chris
More information about the LibreOffice
mailing list