Skip to content

Commit 79d4fd8

Browse files
committed
tests: fix coding style
1 parent 326658a commit 79d4fd8

File tree

3 files changed

+29
-29
lines changed

3 files changed

+29
-29
lines changed

TEST_APPS/device/socket_app/cmd_socket.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class SInfo {
152152
{
153153
assert(sock);
154154
}
155-
SInfo(Socket* sock, bool delete_on_exit=true):
155+
SInfo(Socket *sock, bool delete_on_exit = true):
156156
_id(id_count++),
157157
_sock(sock),
158158
_type(SInfo::OTHER),
@@ -1162,11 +1162,11 @@ static int cmd_socket(int argc, char *argv[])
11621162
cmd_printf("Invalid socket id\r\n");
11631163
return CMDLINE_RETCODE_FAIL;
11641164
}
1165-
TCPSocket *new_sock = static_cast<TCPSocket*>(&new_info->socket());
1166-
nsapi_error_t ret = static_cast<TCPServer&>(info->socket()).accept(new_sock, &addr);
1165+
TCPSocket *new_sock = static_cast<TCPSocket *>(&new_info->socket());
1166+
nsapi_error_t ret = static_cast<TCPServer &>(info->socket()).accept(new_sock, &addr);
11671167
if (ret == NSAPI_ERROR_OK) {
11681168
cmd_printf("TCPServer::accept() new socket sid: %d connection from %s port %d\r\n",
1169-
new_info->id(), addr.get_ip_address(), addr.get_port());
1169+
new_info->id(), addr.get_ip_address(), addr.get_port());
11701170
}
11711171
return handle_nsapi_error("TCPServer::accept()", ret);
11721172
}

UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class my_LoRaPHY : public LoRaPHY {
2727
phy_params.adr_ack_delay = 1;
2828
}
2929

30-
virtual ~my_LoRaPHY()
30+
virtual ~my_LoRaPHY()
3131
{
3232
}
3333

@@ -40,19 +40,19 @@ class my_LoRaPHY : public LoRaPHY {
4040
class my_radio : public LoRaRadio {
4141
public:
4242

43-
virtual void init_radio(radio_events_t *events)
43+
virtual void init_radio(radio_events_t *events)
4444
{
4545
};
4646

47-
virtual void radio_reset()
47+
virtual void radio_reset()
4848
{
4949
};
5050

51-
virtual void sleep(void)
51+
virtual void sleep(void)
5252
{
5353
};
5454

55-
virtual void standby(void)
55+
virtual void standby(void)
5656
{
5757
};
5858

@@ -62,31 +62,31 @@ class my_radio : public LoRaRadio {
6262
uint16_t symb_timeout, bool fix_len,
6363
uint8_t payload_len,
6464
bool crc_on, bool freq_hop_on, uint8_t hop_period,
65-
bool iq_inverted, bool rx_continuous)
65+
bool iq_inverted, bool rx_continuous)
6666
{
6767
};
6868

6969
virtual void set_tx_config(radio_modems_t modem, int8_t power, uint32_t fdev,
7070
uint32_t bandwidth, uint32_t datarate,
7171
uint8_t coderate, uint16_t preamble_len,
7272
bool fix_len, bool crc_on, bool freq_hop_on,
73-
uint8_t hop_period, bool iq_inverted, uint32_t timeout)
73+
uint8_t hop_period, bool iq_inverted, uint32_t timeout)
7474
{
7575
};
7676

77-
virtual void send(uint8_t *buffer, uint8_t size)
77+
virtual void send(uint8_t *buffer, uint8_t size)
7878
{
7979
};
8080

81-
virtual void receive(void)
81+
virtual void receive(void)
8282
{
8383
};
8484

85-
virtual void set_channel(uint32_t freq)
85+
virtual void set_channel(uint32_t freq)
8686
{
8787
};
8888

89-
virtual uint32_t random(void)
89+
virtual uint32_t random(void)
9090
{
9191
};
9292

@@ -95,15 +95,15 @@ class my_radio : public LoRaRadio {
9595
return uint8_value;
9696
};
9797

98-
virtual void set_max_payload_length(radio_modems_t modem, uint8_t max)
98+
virtual void set_max_payload_length(radio_modems_t modem, uint8_t max)
9999
{
100100
};
101101

102-
virtual void set_public_network(bool enable)
102+
virtual void set_public_network(bool enable)
103103
{
104104
};
105105

106-
virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
106+
virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len)
107107
{
108108
};
109109

@@ -115,7 +115,7 @@ class my_radio : public LoRaRadio {
115115
return bool_value;
116116
};
117117

118-
virtual void start_cad(void)
118+
virtual void start_cad(void)
119119
{
120120
};
121121

@@ -124,15 +124,15 @@ class my_radio : public LoRaRadio {
124124
return bool_value;
125125
};
126126

127-
virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time)
127+
virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time)
128128
{
129129
};
130130

131-
virtual void lock(void)
131+
virtual void lock(void)
132132
{
133133
};
134134

135-
virtual void unlock(void)
135+
virtual void unlock(void)
136136
{
137137
};
138138

@@ -422,10 +422,10 @@ TEST_F(Test_LoRaPHY, compute_rx_win_params)
422422
list[0] = 125000;
423423
object->get_phy_params().bandwidths.table = list;
424424
uint8_t list2[1];
425-
list2[0]= 12;
425+
list2[0] = 12;
426426
object->get_phy_params().datarates.table = &list2;
427427
channel_params_t ch_lst[16];
428-
memset(ch_lst, 0, sizeof(channel_params_t)*16);
428+
memset(ch_lst, 0, sizeof(channel_params_t) * 16);
429429
ch_lst[0].band = 0;
430430
ch_lst[0].dr_range.fields.min = DR_0;
431431
ch_lst[0].dr_range.fields.max = DR_5;
@@ -513,7 +513,7 @@ TEST_F(Test_LoRaPHY, link_ADR_request)
513513

514514
object->get_phy_params().max_channel_cnt = 16;
515515
channel_params_t li[16];
516-
memset(li, 0, sizeof(channel_params_t)*16);
516+
memset(li, 0, sizeof(channel_params_t) * 16);
517517
object->get_phy_params().channels.channel_list = li;
518518
li[0].frequency = 0;
519519
li[1].frequency = 5;
@@ -673,7 +673,7 @@ TEST_F(Test_LoRaPHY, set_next_channel)
673673
ch = 5;
674674
t1 = 16;
675675
t2 = 32;
676-
memset(b, 0, sizeof(band_t)*4);
676+
memset(b, 0, sizeof(band_t) * 4);
677677
object->get_phy_params().bands.size = 2;
678678
object->get_phy_params().bands.table = &b;
679679
b[0].off_time = 0;
@@ -767,7 +767,7 @@ TEST_F(Test_LoRaPHY, set_tx_cont_mode)
767767

768768
cw_mode_params_t p;
769769
p.max_eirp = 0;
770-
p.channel=0;
770+
p.channel = 0;
771771
p.tx_power = -1;
772772
p.datarate = 0;
773773
p.antenna_gain = 1;

UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ class my_radio : public LoRaRadio {
4444
uint8_t payload_len,
4545
bool crc_on, bool freq_hop_on, uint8_t hop_period,
4646
bool iq_inverted, bool rx_continuous)
47-
{
47+
{
4848

49-
};
49+
};
5050

5151
virtual void set_tx_config(radio_modems_t modem, int8_t power, uint32_t fdev,
5252
uint32_t bandwidth, uint32_t datarate,

0 commit comments

Comments
 (0)