-
Notifications
You must be signed in to change notification settings - Fork 32
Home
joakimkarlsson edited this page Sep 13, 2010
·
10 revisions
Igloo is a unit testing framework for C++ that aims to provide a way to write tests that
- Has an assertion model that is easy to read
- Provides a model to write test fixtures that seamlessly fits with the way you write classes in C++
Igloo needs the boost libraries. Specificially the preprocessor library.
Igloo also needs a compiler that supports the __COUNTER__
macro. Compilers that support this are gcc (version >= 4.3) and Visual C++.
#include "igloo.hpp"
TestFixture(Assertions) { public:
virtual void SetUp() { }
virtual void TearDown() { }
TestMethod(Assertions, ShouldHandleIntegerAssertions) { Assert::That(5, Is().Not().EqualTo(4)); }
TestMethod(Assertions, ShouldHandleStrings) { Assert::That<string>("joakim", Is().Not().EqualTo<string>("harry")); } };
int main() { return TestRunner::RunAllTests(); }