Skip to content

Commit

Permalink
Merge branch 'asserts' into bleeding
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaipe committed Mar 9, 2015
2 parents 850f681 + 8f99f33 commit 053f921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/criterion/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ enum criterion_assert_kind {
# define expectEqual(Actual, Expected, ...) \
expect((Actual) == (Expected), ## __VA_ARGS__)

# define assertFloatEqual(Actual, Expected, Epsilon, ...) \
assert((Expected) - (Actual) < (Epsilon) && (Actual) - (Expected) < (Epsilon), ## __VA_ARGS__)
# define expectFloatEqual(Actual, Expected, Epsilon, ...) \
expect((Expected) - (Actual) < (Epsilon) && (Actual) - (Expected) < (Epsilon), ## __VA_ARGS__)

# define assertStringsEqual(Actual, Expected, ...) \
assert(!strcmp((Actual), (Expected)), ## __VA_ARGS__)
# define expectStringsEqual(Actual, Expected, ...) \
Expand Down

0 comments on commit 053f921

Please sign in to comment.