Improved double display precision in unit tests
Now using a display precision better than compare precision
This commit is contained in:
parent
284b43362e
commit
d713447f54
2 changed files with 2 additions and 3 deletions
3
Makefile
3
Makefile
|
@ -32,8 +32,7 @@ debug:
|
||||||
release:
|
release:
|
||||||
make BUILDMODE=release all
|
make BUILDMODE=release all
|
||||||
|
|
||||||
tests:
|
tests: all
|
||||||
make BUILDMODE=${BUILDMODE} all
|
|
||||||
LD_LIBRARY_PATH=${BUILDPATH} CK_DEFAULT_TIMEOUT=30 ${BUILDPATH}/paysages-tests
|
LD_LIBRARY_PATH=${BUILDPATH} CK_DEFAULT_TIMEOUT=30 ${BUILDPATH}/paysages-tests
|
||||||
|
|
||||||
run_cli: all
|
run_cli: all
|
||||||
|
|
|
@ -59,7 +59,7 @@ static inline int _double_less_or_equal(double x, double y)
|
||||||
return _double_equals(x, y) || (x <= y);
|
return _double_equals(x, y) || (x <= y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define _ck_assert_double(F, X, O, Y) ck_assert_msg(F(X, Y), "Assertion '"#X#O#Y"' failed: "#X"=%f, "#Y"=%f", X, Y)
|
#define _ck_assert_double(F, X, O, Y) ck_assert_msg(F(X, Y), "Assertion '"#X#O#Y"' failed: "#X"=%.12f, "#Y"=%.12f", X, Y)
|
||||||
#define ck_assert_double_eq(X, Y) _ck_assert_double(_double_equals, X, ==, Y)
|
#define ck_assert_double_eq(X, Y) _ck_assert_double(_double_equals, X, ==, Y)
|
||||||
#define ck_assert_double_ne(X, Y) _ck_assert_double(_double_not_equals, X, !=, Y)
|
#define ck_assert_double_ne(X, Y) _ck_assert_double(_double_not_equals, X, !=, Y)
|
||||||
#define ck_assert_double_gt(X, Y) _ck_assert_double(_double_greater, X, >, Y)
|
#define ck_assert_double_gt(X, Y) _ck_assert_double(_double_greater, X, >, Y)
|
||||||
|
|
Loading…
Reference in a new issue