summaryrefslogtreecommitdiff
path: root/cesar/bsu/beacon/test
diff options
context:
space:
mode:
authorlaranjeiro2010-05-17 10:07:57 +0000
committerlaranjeiro2010-05-17 10:07:57 +0000
commite439be08edd46711ed6a2c738c87baac9d09d1f0 (patch)
tree9cc72cab65b385245170324d2ee50b6cdcd2e391 /cesar/bsu/beacon/test
parenteeffd1e258bfb61d9cf8f0b4e7640b1ba65341a6 (diff)
cesar/bsu/beacon: order the bmis as requested by the specification
fix unit tests git-svn-id: svn+ssh://pessac/svn/cesar/trunk@7080 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/bsu/beacon/test')
-rw-r--r--cesar/bsu/beacon/test/utest/src/beacon.c3
-rw-r--r--cesar/bsu/beacon/test/utest/src/test.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/cesar/bsu/beacon/test/utest/src/beacon.c b/cesar/bsu/beacon/test/utest/src/beacon.c
index fbe930949f..61e39dad50 100644
--- a/cesar/bsu/beacon/test/utest/src/beacon.c
+++ b/cesar/bsu/beacon/test/utest/src/beacon.c
@@ -207,6 +207,7 @@ test_case_beacon_variant_fields_error (test_t test)
test_mac_config_init (&mac_config);
/* Change network mode type. */
bsu_beacon_test_create_beacon (&beacon);
+ beacon.bmis.bpsto.present = false;
beacon.vf.nm = BSU_BEACON_NM_NB;
phy_beacon = bsu_beacon_write (&beacon, BSU_BEACON_TYPE_CENTRAL,
&mac_config, &params);
@@ -278,7 +279,7 @@ test_case_beacon_bmi_vendor_bentry (test_t test)
memset (&beacon, 0, sizeof (bsu_beacon_t));
returned = bsu_beacon_read (phy_beacon, &beacon, &type, &tei,
&mac_addr);
- test_fail_unless (returned == false);
+ test_fail_unless (returned == true);
blk_release_desc ((blk_t*) phy_beacon);
}
test_end;
diff --git a/cesar/bsu/beacon/test/utest/src/test.c b/cesar/bsu/beacon/test/utest/src/test.c
index 8d1f488696..07c19691da 100644
--- a/cesar/bsu/beacon/test/utest/src/test.c
+++ b/cesar/bsu/beacon/test/utest/src/test.c
@@ -80,7 +80,7 @@ bsu_beacon_test_create_beacon (bsu_beacon_t *beacon)
beacon->vf.aclsss = true;
beacon->vf.hoip = false;
beacon->vf.rtsbf = false;
- beacon->vf.nm = false;
+ beacon->vf.nm = BSU_BEACON_NM_CSMA_ONLY;
beacon->vf.ccocap = 0;
beacon->vf.rsvd = 0;
/* Regions. */
@@ -224,6 +224,8 @@ bsu_beacon_test_beacon_check_generation (test_t t,
nb_nsai++;
test_fail_unless (bitstream_read (&stream, 12) ==
beacon->bmis.nps.sais[i].end_time_atu);
+ if (!beacon->bmis.nps.sais[i].stpf)
+ bitstream_skip (&stream, 4);
}
test_fail_unless (length ==
BSU_BEACON_ENTRY_SIZE_NON_PERSISTENT_SCHED
@@ -256,6 +258,8 @@ bsu_beacon_test_beacon_check_generation (test_t t,
nb_nsai++;
test_fail_unless (bitstream_read (&stream, 12) ==
beacon->bmis.ps.ps[nb_ps].sais[i].end_time_atu);
+ if (!beacon->bmis.ps.ps[nb_ps].sais[i].stpf)
+ bitstream_skip (&stream, 4);
}
test_fail_unless (length ==
BSU_BEACON_ENTRY_SIZE_PERSISTENT_SCHED