Skip to content

Commit 2e15944

Browse files
author
Jarkko Paso
committed
FHSS unit tests: Datarate storage removed
1 parent e64bd19 commit 2e15944

File tree

6 files changed

+5
-30
lines changed

6 files changed

+5
-30
lines changed

test/nanostack/unittest/service_libs/fhss/test_fhss.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ static void test_set_fhss_default_configs(void)
117117
FHSS.number_of_channels = 50;
118118
FHSS.rx_channel = DEFAULT_CHANNEL;
119119
FHSS.fhss_state = FHSS_UNSYNCHRONIZED;
120-
FHSS.datarate = 250000;
121120
FHSS.own_hop = 2;
122121
}
123122

test/nanostack/unittest/service_libs/fhss_common/fhsscommontest.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ TEST(fhss_common, test_fhss_free_instance)
2626
CHECK(test_fhss_free_instance());
2727
}
2828

29-
TEST(fhss_common, test_fhss_set_datarate)
30-
{
31-
CHECK(test_fhss_set_datarate());
32-
}
33-
3429
TEST(fhss_common, test_fhss_get_object_with_api)
3530
{
3631
CHECK(test_fhss_get_object_with_api());

test/nanostack/unittest/service_libs/fhss_common/test_fhss_common.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,6 @@ bool test_fhss_free_instance()
100100
return true;
101101
}
102102

103-
bool test_fhss_set_datarate()
104-
{
105-
uint32_t datarate = 50000;
106-
// Test without API
107-
if (-1 != fhss_set_datarate(NULL, datarate)) {
108-
return false;
109-
}
110-
// Test without datarate
111-
if ((0 != fhss_set_datarate(&fhss_structure, 0)) || (fhss_structure.datarate != 250000)) {
112-
return false;
113-
}
114-
// Test with datarate
115-
if ((0 != fhss_set_datarate(&fhss_structure, datarate)) || (fhss_structure.datarate != datarate)) {
116-
return false;
117-
}
118-
return true;
119-
}
120-
121103
bool test_fhss_get_object_with_api()
122104
{
123105
nsdynmemlib_stub.returnCounter = 1;

test/nanostack/unittest/service_libs/fhss_common/test_fhss_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ extern "C" {
1212

1313
bool test_fhss_allocate_instance();
1414
bool test_fhss_free_instance();
15-
bool test_fhss_set_datarate();
1615
bool test_fhss_get_object_with_api();
1716
bool test_fhss_disable();
1817
bool test_fhss_start_timer();

test/nanostack/unittest/stub/fhss_common_stub.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,8 @@ void fhss_failed_list_free(fhss_structure_t *fhss_structure)
149149
{
150150

151151
}
152+
153+
uint32_t fhss_get_tx_time(fhss_structure_t *fhss_structure, uint16_t bytes_to_send, uint8_t phy_header_length, uint8_t phy_tail_length)
154+
{
155+
return 0;
156+
}

test/nanostack/unittest/stub/fhss_stub.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ uint32_t fhss_get_remaining_time_to_next_superframe(const fhss_structure_t *fhss
8989
return 0;
9090
}
9191

92-
uint32_t fhss_get_tx_time(fhss_structure_t *fhss_structure, uint16_t bytes_to_send, uint8_t phy_header_length, uint8_t phy_tail_length)
93-
{
94-
return 0;
95-
}
96-
9792
int fhss_sync_with_beacon(fhss_structure_t *fhss_structure, const fhss_synchronization_beacon_payload_s *payload)
9893
{
9994
return 0;

0 commit comments

Comments
 (0)