Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2004-07-20 22:00:07

On Wed, 21 Jul 2004 09:59:58 +0800, Joel de Guzman wrote

> Thank you Peter. After the release, I'll definitely move Spirit
> to use this simple, no frills, test utility. The requirements for
> such a facility should be 1) Works 100% on *ALL* compilers 2) Is
> transparent and does not get in the way (you can pretend it's
> not there at all) 3) Is 100% stable (no frequent API changes)
> 4) Is as simple as possible (less chance for Murphy's law to kick
> in). IMO, Boost.Test does not satisfactorily satisfy these requirements.

I have an alternative in date_time:

No macros in this one. Code hasn't been modified since well before Boost.Test
was invented. Trivially simple usage:

  date d1(1900,1,1);
  //1st parameter gets passed to Pass / Fail output
  //second is condition to check
  check("1900-01-01 day is 01", == 1);
  return printTestStats(); //returns number of failures and prints pass fail

Output looks like:

 ====== BEGIN OUTPUT ======
Pass :: 1900-01-01 day is 01
Pass :: 1900-01-01 month is 01
Pass :: 1900-01-01 year is 1900
Pass :: check day of year number
75 Tests Executed: All Succeeded

====== END OUTPUT ======

ps: I wrote this in anger one day after trying to figure out cppunit -- took
me way less time to write this -- never did figure out out how to use cppunit.

Boost list run by bdawes at, gregod at, cpdaniel at, john at