From 18daca09374f34b69dd1576a47307a5f5bc43657 Mon Sep 17 00:00:00 2001 From: Jérémy Dufour Date: Tue, 24 May 2011 15:48:11 +0200 Subject: cesar/ce/rx/bl: move out test_intervals from BL test --- cesar/ce/rx/bitloading/test/common-define.mk | 2 +- cesar/ce/rx/bitloading/test/host-Makefile | 5 ++++- cesar/ce/rx/bitloading/test/src/test_bl.c | 6 ------ cesar/ce/rx/bitloading/test/src/test_intervals.c | 23 +++++++++++++++++++++++ cesar/common/tests/tests | 1 + 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/cesar/ce/rx/bitloading/test/common-define.mk b/cesar/ce/rx/bitloading/test/common-define.mk index 225cfb1f11..1c8e7bd229 100644 --- a/cesar/ce/rx/bitloading/test/common-define.mk +++ b/cesar/ce/rx/bitloading/test/common-define.mk @@ -4,7 +4,7 @@ BASE = ../../../.. # Common sources. -ce_rx_bl_test_sources_common = test_bl.c vector.c test_intervals.c +ce_rx_bl_test_sources_common = test_bl.c vector.c # Common modules. ce_rx_bl_modules_common = lib \ ce/rx/bitloading/fsm ce/rx/bitloading ce/rx/cp/stub \ diff --git a/cesar/ce/rx/bitloading/test/host-Makefile b/cesar/ce/rx/bitloading/test/host-Makefile index 83ab3ccd8c..f50f12d6b8 100644 --- a/cesar/ce/rx/bitloading/test/host-Makefile +++ b/cesar/ce/rx/bitloading/test/host-Makefile @@ -7,11 +7,14 @@ VARIANT = host include common-define.mk # List of program to build. -HOST_PROGRAMS = test_ce_host +HOST_PROGRAMS = test_ce_host test_ce_intervals test_ce_host_SOURCES = $(ce_rx_bl_test_sources_common) ecos_stub.c test_ce_host_MODULES = $(ce_rx_bl_modules_common) +test_ce_intervals_SOURCES = test_intervals.c ecos_stub.c +test_ce_intervals_MODULES = $(ce_rx_bl_modules_common) + INCLUDES += ce/rx/bitloading/test/override # Include base makefile. diff --git a/cesar/ce/rx/bitloading/test/src/test_bl.c b/cesar/ce/rx/bitloading/test/src/test_bl.c index 04d4d02f8a..e82a5539d1 100644 --- a/cesar/ce/rx/bitloading/test/src/test_bl.c +++ b/cesar/ce/rx/bitloading/test/src/test_bl.c @@ -24,9 +24,6 @@ #include "ce/rx/bitloading/inc/common.h" #include "lib/rnd.h" -/* Interval test vectors. */ -extern void test_suite_ce_rx_bl_intervals (test_t t); - /* Test vectors. */ #include "vector.h" #include "nsr_on_sound.h" @@ -1961,9 +1958,6 @@ main (int argc, char **argv) /* Test tone map update */ test_suite_ce_rx_bl_tm_update (t); - /* Test intervals. */ - test_suite_ce_rx_bl_intervals (t); - /* Memory check. */ test_case_begin (t, "General"); test_begin (t, "Memory") diff --git a/cesar/ce/rx/bitloading/test/src/test_intervals.c b/cesar/ce/rx/bitloading/test/src/test_intervals.c index e584b0d8fd..13ceadc92d 100644 --- a/cesar/ce/rx/bitloading/test/src/test_intervals.c +++ b/cesar/ce/rx/bitloading/test/src/test_intervals.c @@ -445,3 +445,26 @@ test_suite_ce_rx_bl_intervals (test_t t) /* Updating TMI of intervals. */ test_suite_ce_rx_bl_intervals_update_tmi (t); } + +int +main (int argc, char **argv) +{ + test_t t; + test_init (t, argc, argv); + + test_suite_begin (t, "CE:RX:BL:interval"); + + /* Test intervals. */ + test_suite_ce_rx_bl_intervals (t); + + /* Memory check. */ + test_case_begin (t, "General"); + test_begin (t, "Memory") + { + test_fail_unless (blk_check_memory ()); + } test_end; + + /* Result. */ + test_result (t); + return (test_nb_failed (t) == 0 ? 0 : 1); +} diff --git a/cesar/common/tests/tests b/cesar/common/tests/tests index 8ad66c2cab..26b9ec8c53 100644 --- a/cesar/common/tests/tests +++ b/cesar/common/tests/tests @@ -284,6 +284,7 @@ ce/rx/bitloading/test: make: make COV=y host fsm cov ce_rx_bl_host: ./obj/host/test_ce_host cov ce_rx_bl_fsm_host: ./obj/host/test_ce_fsm +cov ce_rx_bl_intervals_host: ./obj/host/test_ce_intervals ce/rx/cp/test: make: make -- cgit v1.2.3