From eaeb9ebd4c94130da73997f02ddb93834320695a Mon Sep 17 00:00:00 2001 From: Nicola Fontana Date: Fri, 13 Feb 2015 19:38:49 +0100 Subject: [PATCH] tests: cover adg_matrix_normalize corner case --- src/adg/tests/test-matrix.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/adg/tests/test-matrix.c b/src/adg/tests/test-matrix.c index a72604e0..abbcaa96 100644 --- a/src/adg/tests/test-matrix.c +++ b/src/adg/tests/test-matrix.c @@ -156,15 +156,15 @@ _adg_method_normalize(void) adg_assert_isapprox(matrix.xy, 0.8); adg_assert_isapprox(matrix.yx, -0.8); - matrix.xx = -4; - matrix.yy = -4; + matrix.xx = 0; + matrix.yy = 0; matrix.xy = -3; matrix.yx = 3; g_assert_true(adg_matrix_normalize(&matrix)); - adg_assert_isapprox(matrix.xx, -0.8); - adg_assert_isapprox(matrix.yy, -0.8); - adg_assert_isapprox(matrix.xy, -0.6); - adg_assert_isapprox(matrix.yx, 0.6); + adg_assert_isapprox(matrix.xx, 0); + adg_assert_isapprox(matrix.yy, 0); + adg_assert_isapprox(matrix.xy, 1); + adg_assert_isapprox(matrix.yx, -1); } static void -- 2.11.4.GIT