From b8ed1af184dbebf1fa717dfbc07ffa58d710bbc0 Mon Sep 17 00:00:00 2001 From: cedric Date: Thu, 29 Apr 2010 17:08:24 +0000 Subject: [PATCH] * eina: add tests for eina fixed point sin/cos functions. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eina@48423 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eina_fp.c | 2 +- src/tests/Makefile.am | 1 + src/tests/eina_suite.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/eina_fp.c b/src/lib/eina_fp.c index 264e972..1ade0b8 100644 --- a/src/lib/eina_fp.c +++ b/src/lib/eina_fp.c @@ -200,7 +200,7 @@ eina_f32p32_sin(Eina_F32p32 a) EINA_F32P32_PI); idx = eina_f32p32_int_to(interpol); if (idx >= MAX_PREC) - idx = MAX_PREC - (idx + 1); + idx = 2 * MAX_PREC - (idx + 1); index2 = idx + 1; if (index2 == MAX_PREC) diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am index 1b0736f..b94570c 100644 --- a/src/tests/Makefile.am +++ b/src/tests/Makefile.am @@ -32,6 +32,7 @@ check_PROGRAMS = eina_suite eina_suite_SOURCES = \ eina_suite.c \ +eina_test_fp.c \ eina_test_stringshare.c \ eina_test_array.c \ eina_test_error.c \ diff --git a/src/tests/eina_suite.c b/src/tests/eina_suite.c index c009771..8a51db2 100644 --- a/src/tests/eina_suite.c +++ b/src/tests/eina_suite.c @@ -33,6 +33,7 @@ struct _Eina_Test_Case }; static const Eina_Test_Case etc[] = { + { "FixedPoint", eina_test_fp }, { "Array", eina_test_array }, { "String Share", eina_test_stringshare }, { "Log", eina_test_log }, -- 2.7.4