[haiku-development] Re: BString Truncate unit test

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 30 Oct 2011 09:09:42 +0100

On 10/29/2011 10:07 PM, John Scipione wrote:
I wrote a unit test to test the BString Trucate() method in
src/tests/kits/support/bstring/StringTruncateTest.cpp and added it to
the Jamfile. How do I include the unit tests i my UserBuildConfig file
and how do I run the tests from the resulting image?

Like you add other files to the image, using the AddFilesToHaikuImage -- see build/jam/UserBuildConfig.{sample|ReadMe} for more info on that. You'll need quite a few files, though, as each test comes in a separate shared library for some reason.

Also, the GCC2 build is kinda broken; you need to manually specify the library path on the command line to make it work. This problem does not happen with GCC4, though. Furthermore, since they were neglected that long, not all tests will still run/compile anymore, unfortunately.

The easiest way should be to build the thing under Haiku itself, though.
Besides that, extensions to our unit tests are greatly appreciated, anyway, thanks!

Bye,
   Axel.

Other related posts: