diff options
-rw-r--r-- | tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/test-buffer.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4eb6e84..d750f37 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -16,7 +16,7 @@ endif () add_executable(${SUITE_BIN} ${TEST_SRCS}) -target_link_libraries(${SUITE_BIN} ufo ${UFOCORE_DEPS}) +target_link_libraries(${SUITE_BIN} ufo m ${UFOCORE_DEPS}) add_test(${SUITE_BIN} ${SUITE_BIN}) diff --git a/tests/test-buffer.c b/tests/test-buffer.c index 3f6bd8a..9821211 100644 --- a/tests/test-buffer.c +++ b/tests/test-buffer.c @@ -18,6 +18,7 @@ */ #include <string.h> +#include <math.h> #include <ufo/ufo.h> #include "test-suite.h" @@ -136,7 +137,7 @@ test_insert_metadata (Fixture *fixture, other = ufo_buffer_get_metadata (fixture->buffer, "foo"); g_assert (other != NULL); - g_assert (g_value_get_float (other) == 3.14f); + g_assert (fabs (g_value_get_float (other) - 3.14f) < 0.0001f); } static void |