summaryrefslogtreecommitdiff
path: root/cesar/cp/sta/action
diff options
context:
space:
mode:
authorDavid Mercadie2010-10-06 18:29:53 +0200
committerDavid Mercadie2010-10-25 16:00:34 +0200
commite8674d5fc9eecb7fddfaf76bf16ee08ebfd8129d (patch)
tree61ee016dfa5519239e97d91e61c621822a327390 /cesar/cp/sta/action
parentc15c12a56c81a8c3c9a8163eafa097c700746933 (diff)
cesar/cp/sta/action/test: correct vs_get_tonemap_test_case, refs #1943
Correct vs_get_tonemap_test_case so that it really test the return value of INT Id when TMI=0xFF. The test "only get intervals and tonemaps" didn't really test .int_id, because station->tx_tonemaps->intervals->version was not yet initialised. The correction execute the test later in the function; after that the tonemaps are created and a version is given to the intervals.
Diffstat (limited to 'cesar/cp/sta/action')
-rw-r--r--cesar/cp/sta/action/test/utest/src/vs.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/cesar/cp/sta/action/test/utest/src/vs.c b/cesar/cp/sta/action/test/utest/src/vs.c
index b1ce1ef0aa..8746f93d1a 100644
--- a/cesar/cp/sta/action/test/utest/src/vs.c
+++ b/cesar/cp/sta/action/test/utest/src/vs.c
@@ -488,27 +488,6 @@ vs_get_tonemap_test_case (test_t t)
cp_sta_t *sta_1 = cp_sta_mgr_sta_add (cp, my_net, tei_1, mac_1);
sta_t* station = mac_store_sta_get (cp->mac_store, tei_1);
- test_begin (t, "only get intervals and tonemaps")
- {
- scenario_entry_t entries[] = {
- SCENARIO_ACTION (vs__started__vs_get_tonemap_req, .peer = peer),
- SCENARIO_EVENT (cp_msg_vs_get_tonemap_req_receive, .ok = true,
- .mac_addr = mac_1,
- .tmi = CP_MSG_VS_GET_TONEMAP_TMI_AND_INT_ONLY,
- .int_id = 0,
- .dir = CP_MSG_VS_GET_TONEMAP_REQ_DIRECTION_TX),
- SCENARIO_EVENT (cp_msg_vs_get_tonemap_cnf_send,
- .peer = peer,
- .result = CP_MSG_VS_GET_TONEMAP_CNF_RESULT_SUCCESS,
- .beacon_delta = 0,
- .int_id = station->tx_tonemaps->intervals->version,
- .tms = station->tx_tonemaps,
- .tmi = CP_MSG_VS_GET_TONEMAP_TMI_AND_INT_ONLY),
- SCENARIO_END
- };
- scenario_run (t, entries, &globals);
- } test_end;
-
test_begin (t, "tonemap doesn't exist")
{
scenario_entry_t entries[] = {
@@ -581,6 +560,27 @@ vs_get_tonemap_test_case (test_t t)
scenario_run (t, entries, &globals);
} test_end;
+ test_begin (t, "only get intervals and tonemaps")
+ {
+ scenario_entry_t entries[] = {
+ SCENARIO_ACTION (vs__started__vs_get_tonemap_req, .peer = peer),
+ SCENARIO_EVENT (cp_msg_vs_get_tonemap_req_receive, .ok = true,
+ .mac_addr = mac_1,
+ .tmi = CP_MSG_VS_GET_TONEMAP_TMI_AND_INT_ONLY,
+ .int_id = 0,
+ .dir = CP_MSG_VS_GET_TONEMAP_REQ_DIRECTION_TX),
+ SCENARIO_EVENT (cp_msg_vs_get_tonemap_cnf_send,
+ .peer = peer,
+ .result = CP_MSG_VS_GET_TONEMAP_CNF_RESULT_SUCCESS,
+ .beacon_delta = 0,
+ .int_id = station->tx_tonemaps->intervals->version,
+ .tms = station->tx_tonemaps,
+ .tmi = CP_MSG_VS_GET_TONEMAP_TMI_AND_INT_ONLY),
+ SCENARIO_END
+ };
+ scenario_run (t, entries, &globals);
+ } test_end;
+
/* Cleanup. */
blk_release (station);
slab_release (sta_1);