Changes between Version 8 and Version 9 of oss/lolunit/tutorial
- Timestamp:
- Sep 8, 2011, 10:29:47 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
oss/lolunit/tutorial
v8 v9 45 45 * `LOLUNIT_ASSERT_EQUAL(a, b)` will cause the current test to fail if `a` and `b` are not equal. 46 46 * `LOLUNIT_ASSERT_DOUBLES_EQUAL(a, b, t)` will cause the current test to fail if the floating point values `a` and `b` are not equal, with a tolerance of `t`. 47 * all other comparison checks and their negations are available: `LOLUNIT_ASSERT_GREATER`, `LOLUNIT_ASSERT_NOT_GREATER`, etc. 47 48 48 49 This is how to populate our fixture: … … 55 56 { 56 57 LOLUNIT_ASSERT_EQUAL(1 + 1, 2); 57 LOLUNIT_ASSERT(2 + 2 < 5); /* Check that our value for 2 is not too large */ 58 LOLUNIT_ASSERT_LESS(2 + 2, 5); /* Check that our value for 2 is not too large */ 59 LOLUNIT_ASSERT_NOT_GEQUAL(2 + 2, 5); 58 60 } 59 61 … … 146 148 CPPUNIT_ASSERT_EQUAL(1 + 1, 2); 147 149 CPPUNIT_ASSERT(2 + 2 < 5); /* Check that our value for 2 is not too large */ 150 CPPUNIT_ASSERT(!(2 + 2 >= 5)); 148 151 } 149 152