[LLVMdev] [Patch] Adding unit tests to LLVM

Misha Brukman brukman at gmail.com
Fri Dec 26 22:59:06 PST 2008


2008/12/27 Mark Kromis <greybird at mac.com>

> Just a curiosity question, why push for gtest vs Boost Test or
> a different test suite?
> I normally use Boost, and their test suite, so I'm more familiar with that.
> So I was wondering is one better then the other, or is it just that someone
> makes a patch for it?
>

It seems that the original patch author is most familiar with gtest (as am
I).  I looked at boost's testing facilities, as described here:
http://gamesfromwithin.com/?p=29#boost and it seems to be quite more verbose
for setting up test suites, with what looks like a bit of boilerplate code.

Compare this with the way new tests are written in gtest with TEST_F() macro
-- see the original patch by Talin. Note that there's no suite-setup code in
your unittest file in gtest, which is required in boost.  In fact, the only
gtest-related code is the #include statement, not counting the common main()
that's linked into every unittest binary -- unless you want to do some
custom global-setup code, and hence you'll write your own main().

Misha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081227/dc4ae263/attachment.html>


More information about the llvm-dev mailing list