From: Tim-Philipp Müller Date: Sat, 24 Sep 2016 20:11:32 +0000 (+0100) Subject: tests: videotimecode: fix floating point comparisons X-Git-Tag: 1.19.3~511^2~2661 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9da603db6e4656ce9f1fd3007987d4a62eece5c;p=platform%2Fupstream%2Fgstreamer.git tests: videotimecode: fix floating point comparisons Comparing floats for equality is not necessarily going to work reliably, so use fail_unless_equals_float() for this. Test would fail on x86 (Intel Atom x5-Z8300). --- diff --git a/tests/check/libs/videotimecode.c b/tests/check/libs/videotimecode.c index c403db8..23d6b50 100644 --- a/tests/check/libs/videotimecode.c +++ b/tests/check/libs/videotimecode.c @@ -332,7 +332,7 @@ GST_START_TEST (videotimecode_dailyjam_todatetime) fail_unless (g_date_time_get_day_of_month (dt2) == 29); fail_unless (g_date_time_get_hour (dt2) == 11); fail_unless (g_date_time_get_minute (dt2) == 36); - fail_unless (g_date_time_get_seconds (dt2) == 53.04); + fail_unless_equals_float (g_date_time_get_seconds (dt2), 53.04); gst_video_time_code_free (tc1); g_date_time_unref (dt2);