[interfacekit] Re: BString::CountChars()

Looks like Tracker Grep missed it ... the files weren't MIME-typed yet. 
=P

Anyway, I spent a bunch of time this afternoon (sometimes it's nice not 
having work ;) smacking BString and its tests into shape.  I have to 
admit, I felt a bit stupid once I realized the reason none of my fixes 
were working was because the OBOS version of the tests were operating on 
R5's BString -- String.cpp wasn't included in the build! =P  Once over 
that bump, things got worked out, including a number of little bugs that 
tests will always turn up.  Long and short: OBOS BString now passes all 
its tests, while R5 does not -- some tests even have to be omitted to 
prevent crashes!  Did somebody say we were building a better BeOS?  I do 
believe we are. ;)

Just for fun, why does this test fail:

BString empty;
CPPUNIT_ASSERT(empty.String() == "");

Took me quite a while to see what was right under my nose, and reminded 
me of the Joel On Software article referred to on the OpenBeOS list once 
I got it.

e

>>Whenever we get a unit test for 
>CountChars() we can find out if it >actually works. ;)
>
>Oh, but we already have one... look for "StringAccessTest" (since 
CountChars() is a String Access Method...


Necessity is the plea for every infringement of human freedom. It is the 
argument of tyrants; it is the creed of slaves.
        -William Pitt, British prime-minister (1759-1806)


Other related posts: