summaryrefslogtreecommitdiff
path: root/cesar/bsu/test
diff options
context:
space:
mode:
authorlaranjeiro2010-06-04 07:46:46 +0000
committerlaranjeiro2010-06-04 07:46:46 +0000
commitd2df53358941f4f89d0238871ede17c9f5516838 (patch)
tree5cebfe5a2e6d8c80fafa199f9fea14c6334f5b6c /cesar/bsu/test
parent0eff7f0897bed5bd1f8b4b82848ce660248fa5b0 (diff)
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
Diffstat (limited to 'cesar/bsu/test')
-rw-r--r--cesar/bsu/test/utest/src/bsut.c25
1 files changed, 25 insertions, 0 deletions
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
@@ -615,6 +615,30 @@ test_case_bsu_persistent_schedules_update (test_t test)
}
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)
{
test_suite_begin (t, "BSU test");
@@ -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);
}