summaryrefslogtreecommitdiff
path: root/cesar/ce/rx/bitloading/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/ce/rx/bitloading/test/src')
-rw-r--r--cesar/ce/rx/bitloading/test/src/test_intervals.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/cesar/ce/rx/bitloading/test/src/test_intervals.c b/cesar/ce/rx/bitloading/test/src/test_intervals.c
index c319e2688e..4fb5f23f4e 100644
--- a/cesar/ce/rx/bitloading/test/src/test_intervals.c
+++ b/cesar/ce/rx/bitloading/test/src/test_intervals.c
@@ -228,6 +228,7 @@ test_suite_ce_rx_bl_intervals_measure_to_event_master_test (
int sound,
bool intervals,
bool mea_interval,
+ bool src_interval,
ce_rx_bl_fsm_event_type_t *event,
int *fsm_id)
{
@@ -255,6 +256,10 @@ test_suite_ce_rx_bl_intervals_measure_to_event_master_test (
/* Configure measure. */
measure.rx_params.sound = sound;
measure.rx_params.sound_complete = 0;
+ if (src_interval)
+ measure.rx_params.sound_src = TONEMAP_SRC_INTERVAL_UNAVAILABLE;
+ else
+ measure.rx_params.sound_src = TONEMAP_SRC_INITIAL;
measure.rx_params.preamble_ntb = 0;
measure.rx_params.beacon_period_start_ntb = 0;
/* Measure is global. */
@@ -288,6 +293,8 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
false,
/* Measure is positioned on an interval ? */
false,
+ /* SRC is interval specific ? */
+ false,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_sound);
test_fail_if (fsm_id != -1);
@@ -303,6 +310,8 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
false,
/* Measure is positioned on an interval ? */
true,
+ /* SRC is interval specific ? */
+ false,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_sound);
test_fail_if (fsm_id != -1);
@@ -318,6 +327,8 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
true,
/* Measure is positioned on an interval ? */
false,
+ /* SRC is interval specific ? */
+ true,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_sound);
test_fail_if (fsm_id != -1);
@@ -333,10 +344,29 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
true,
/* Measure is positioned on an interval ? */
true,
+ /* SRC is interval specific ? */
+ true,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_interval_sound);
test_fail_if (fsm_id != 0);
} test_end;
+ test_begin (t, "Measure to event conversion, sound, intervals, "
+ "small measure, SRC is global")
+ {
+ test_suite_ce_rx_bl_intervals_measure_to_event_master_test (
+ t,
+ /* Sound ? */
+ 1,
+ /* RX contains intervals ? */
+ true,
+ /* Measure is positioned on an interval ? */
+ true,
+ /* SRC is interval specific ? */
+ false,
+ &out, &fsm_id);
+ test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_sound);
+ test_fail_if (fsm_id != -1);
+ } test_end;
test_begin (t, "Measure to event conversion, not sound, no interval, "
"big measure")
{
@@ -348,6 +378,8 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
false,
/* Measure is positioned on an interval ? */
false,
+ /* SRC is interval specific ? */
+ false,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_data);
test_fail_if (fsm_id != -1);
@@ -363,6 +395,8 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
false,
/* Measure is positioned on an interval ? */
true,
+ /* SRC is interval specific ? */
+ false,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_data);
test_fail_if (fsm_id != -1);
@@ -378,6 +412,8 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
true,
/* Measure is positioned on an interval ? */
false,
+ /* SRC is interval specific ? */
+ true,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_data);
test_fail_if (fsm_id != -1);
@@ -393,6 +429,8 @@ test_suite_ce_rx_bl_intervals_measure_to_event (test_t t)
true,
/* Measure is positioned on an interval ? */
true,
+ /* SRC is interval specific ? */
+ true,
&out, &fsm_id);
test_fail_if (out != CE_RX_BL_FSM_EVENT_TYPE_interval_data);
test_fail_if (fsm_id != 0);