From d2df53358941f4f89d0238871ede17c9f5516838 Mon Sep 17 00:00:00 2001 From: laranjeiro Date: Fri, 4 Jun 2010 07:46:46 +0000 Subject: cesar: NEK index to use in whole modem - bsu: add functions and unit tests (with stubs) - cp/beacon: remove nek_index - cp/cco/action: use bsu function - mac/common: add a define for the number of NEK git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7166 017c9cb6-072f-447c-8318-d5b54f68fe89 --- cesar/bsu/test/utest/src/bsut.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'cesar/bsu/test') diff --git a/cesar/bsu/test/utest/src/bsut.c b/cesar/bsu/test/utest/src/bsut.c index 974c6e89f6..79c6b1be4f 100644 --- a/cesar/bsu/test/utest/src/bsut.c +++ b/cesar/bsu/test/utest/src/bsut.c @@ -614,6 +614,30 @@ test_case_bsu_persistent_schedules_update (test_t test) test_end; } +void +test_case_bsu_nek_index (test_t test) +{ + test_case_begin (test, "NEK index"); + bsu_test_t t; + bsu_test_init (&t); + test_begin (test, "Current index") + { + uint index = bsu_nek_index_current (); + test_fail_unless (index == 0); + index = bsu_nek_index_next (); + test_fail_unless (index == 1); + /* Change NEK index in schedules. */ + t.bsu->sta_avln->bs.schedules.nek_switch [0] = 1; + index = bsu_nek_index_current (); + test_fail_unless (index == 1); + /* Next index. */ + index = bsu_nek_index_next (); + test_fail_unless (index == 0); + } + test_end; + bsu_test_uninit (&t); +} + void test_suite_bsu (test_t t) { @@ -625,4 +649,5 @@ test_suite_bsu (test_t t) test_case_bsu_update (t); test_case_bsu_timer_event (t); test_case_bsu_persistent_schedules_update (t); + test_case_bsu_nek_index (t); } -- cgit v1.2.3