tests: prevent compiler warning when comparing floats

This commit is contained in:
Kosma Moczek 2014-06-17 12:22:48 +02:00
parent c5bc12f8cc
commit df695c4933

View File

@ -640,6 +640,11 @@ START_TEST(test_minmea_rescale)
}
END_TEST
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
/* The float values used in tests should be exactly representable under IEEE754;
* false negatives will occur otherwise. */
START_TEST(test_minmea_float)
{
ck_assert(isnan(minmea_tofloat(&(struct minmea_float) { 42, 0 })));
@ -658,6 +663,8 @@ START_TEST(test_minmea_coord)
}
END_TEST
#pragma GCC diagnostic pop
Suite *minmea_suite(void)
{
Suite *s = suite_create ("minmea");