summaryrefslogtreecommitdiff
path: root/cesar/bsu/test
diff options
context:
space:
mode:
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);
}