Igloo uses a constraint based assertion model that is heavily inspired by the model used in NUnit. An assertion in Igloo is written using the following format:

Assert::That(actual_value, <constraint expression>);

where <constraint expression> is an expression that actual_value is evaluated against when the test is executed.

Constraint expressions come in two basic forms: composite and fluent expressions

Composite Expressions

With composite expressions, you can create compact, powerful expressions that combine a set of predefined constraints with ones that you provide yourself.

Example:

Assert::That(length, IsGreaterThan(4) && !Equals(10));

Composite expressions can be any combination of constraints and the standard logical C++ operators.

You can also add your own constraints to be used within composite expressions.

Fluent Expressions

With fluent expressions, you can create assertions that better convey the intent of a test without exposing implementation-specific details. Fluent expressions aim to help you create tests that are not just by developers for developers, but rather can be read and understood by domain experts.

Fluent expressions also add a few operators to the ones provided by composite expressions.

Example:

Assert::That(length, Is().GreaterThan(4).And().Not().EqualTo(10));