diff --git a/samples/tests/theories_regression.c b/samples/tests/theories_regression.c index b8d4ca5..061c6de 100644 --- a/samples/tests/theories_regression.c +++ b/samples/tests/theories_regression.c @@ -20,14 +20,17 @@ TheoryDataPoints(theory, misc) = { }; Theory((char c, bool b, short s, int i, long l, long long ll, float f, double d, char *str, const char *cstr), theory, misc) { + float reff = 3.14f; + double refd = 3.14; + cr_assert(b); cr_assert_eq(c, 'a'); cr_assert_eq(s, 1); cr_assert_eq(i, 1); cr_assert_eq(l, 1); cr_assert_eq(ll, 1); - cr_assert_eq(f, 3.14f); - cr_assert_eq(d, 3.14); + cr_assert_eq(f, reff); + cr_assert_eq(d, refd); cr_assert_str_eq(str, "test"); cr_assert_str_eq(cstr, "other test"); diff --git a/samples/tests/theories_regression.cc b/samples/tests/theories_regression.cc index 5bebea1..5bb020d 100644 --- a/samples/tests/theories_regression.cc +++ b/samples/tests/theories_regression.cc @@ -22,14 +22,17 @@ TheoryDataPoints(theory, misc) = { }; Theory((char c, bool b, short s, int i, long l, long long ll, float f, double d, char *str, const char *cstr), theory, misc) { + float reff = 3.14f; + double refd = 3.14; + cr_assert(b); cr_assert_eq(c, 'a'); cr_assert_eq(s, 1); cr_assert_eq(i, 1); cr_assert_eq(l, 1); cr_assert_eq(ll, 1); - cr_assert_eq(f, 3.14f); - cr_assert_eq(d, 3.14); + cr_assert_eq(f, reff); + cr_assert_eq(d, refd); cr_assert_str_eq(str, "test"); cr_assert_str_eq(cstr, "other test"); diff --git a/samples/theories.c b/samples/theories.c index 0bbe7cc..c918f4a 100644 --- a/samples/theories.c +++ b/samples/theories.c @@ -87,14 +87,17 @@ TheoryDataPoints(theory, misc) = { }; Theory((char c, bool b, short s, int i, long l, long long ll, float f, double d, char *str, const char *cstr, struct my_object *obj), theory, misc) { + float reff = 3.14f; + double refd = 3.14; + cr_assert(b); cr_assert_eq(c, 'a'); cr_assert_eq(s, 1); cr_assert_eq(i, 1); cr_assert_eq(l, 1); cr_assert_eq(ll, 1); - cr_assert_eq(f, 3.14f); - cr_assert_eq(d, 3.14); + cr_assert_eq(f, reff); + cr_assert_eq(d, refd); cr_assert_str_eq(str, "test"); cr_assert_str_eq(cstr, "other test"); cr_assert_eq(obj->foo, 42); diff --git a/samples/theories.cc b/samples/theories.cc index 5602754..4ee981b 100644 --- a/samples/theories.cc +++ b/samples/theories.cc @@ -95,14 +95,17 @@ TheoryDataPoints(theory, misc) = { }; Theory((char c, bool b, short s, int i, long l, long long ll, float f, double d, char *str, const char *cstr, struct my_object *obj), theory, misc) { + float reff = 3.14f; + double refd = 3.14; + cr_assert(b); cr_assert_eq(c, 'a'); cr_assert_eq(s, 1); cr_assert_eq(i, 1); cr_assert_eq(l, 1); cr_assert_eq(ll, 1); - cr_assert_eq(f, 3.14f); - cr_assert_eq(d, 3.14); + cr_assert_eq(f, reff); + cr_assert_eq(d, refd); cr_assert_str_eq(str, "test"); cr_assert_str_eq(cstr, "other test"); cr_assert_eq(obj->foo, 42);