Skip to content

Commit 35d03a6

Browse files
committed
celullar: astyle update
1 parent 6d8dd0c commit 35d03a6

File tree

90 files changed

+774
-736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+774
-736
lines changed

features/cellular/TESTS/cellular/cellular_all/network.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static bool wait_register()
2828
}
2929

3030
CellularNetwork::RegistrationStatus status;
31-
for (int i=0; i<180; i++) {
31+
for (int i = 0; i < 180; i++) {
3232
tr_info("Register to network %d...", i);
3333
for (int type = 0; type < CellularNetwork::C_MAX; type++) {
3434
if (network->get_registration_status((CellularNetwork::RegistrationType)type, status) == NSAPI_ERROR_OK) {

features/cellular/TESTS/cellular/cellular_all/sim.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ void test_get_sim_state()
3939
}
4040

4141
// creates PIN which is different than one defined in MBED_CONF_APP_CELLULAR_SIM_PIN
42-
static void create_random_pin(char* random_pin)
42+
static void create_random_pin(char *random_pin)
4343
{
4444

4545
char s[11];
4646
do {
47-
sprintf(s,"%d", rand());
47+
sprintf(s, "%d", rand());
4848

4949
} while (strncmp(s, MBED_CONF_APP_CELLULAR_SIM_PIN, 4) == 0);
5050

features/cellular/TESTS/cellular/cellular_all/stack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void test_socket_send_receive_non_blocking()
101101

102102
int32_t event;
103103
event = sock_event.wait(10000);
104-
TEST_ASSERT_MESSAGE( event>=1, "No Socket event within 10 seconds");
104+
TEST_ASSERT_MESSAGE(event >= 1, "No Socket event within 10 seconds");
105105

106106
// Read response
107107
SocketAddress address;

features/cellular/UNITTESTS/at/at_cellularbase/at_cellularbasetest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,13 @@
2020

2121
TEST_GROUP(AT_CellularBase)
2222
{
23-
Test_AT_CellularBase* unit;
23+
Test_AT_CellularBase *unit;
2424

25-
void setup()
26-
{
25+
void setup() {
2726
unit = new Test_AT_CellularBase();
2827
}
2928

30-
void teardown()
31-
{
29+
void teardown() {
3230
delete unit;
3331
}
3432
};

features/cellular/UNITTESTS/at/at_cellularbase/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

features/cellular/UNITTESTS/at/at_cellularbase/test_at_cellularbase.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#ifndef TEST_AT_CELLULARBASE_H
1818
#define TEST_AT_CELLULARBASE_H
1919

20-
class Test_AT_CellularBase
21-
{
20+
class Test_AT_CellularBase {
2221
public:
2322
Test_AT_CellularBase();
2423

features/cellular/UNITTESTS/at/at_cellulardevice/at_cellulardevicetest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
TEST_GROUP(AT_CellularDevice)
2121
{
22-
Test_AT_CellularDevice* unit;
22+
Test_AT_CellularDevice *unit;
2323

24-
void setup()
25-
{
24+
void setup() {
2625
unit = new Test_AT_CellularDevice();
2726
}
2827

29-
void teardown()
30-
{
28+
void teardown() {
3129
delete unit;
3230
}
3331
};

features/cellular/UNITTESTS/at/at_cellulardevice/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

features/cellular/UNITTESTS/at/at_cellulardevice/test_at_cellulardevice.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#ifndef TEST_AT_CELLULARDEVICE_H
1818
#define TEST_AT_CELLULARDEVICE_H
1919

20-
class Test_AT_CellularDevice
21-
{
20+
class Test_AT_CellularDevice {
2221
public:
2322
Test_AT_CellularDevice();
2423

features/cellular/UNITTESTS/at/at_cellularinformation/at_cellularinformationtest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
TEST_GROUP(AT_CellularInformation)
2121
{
22-
Test_AT_CellularInformation* unit;
22+
Test_AT_CellularInformation *unit;
2323

24-
void setup()
25-
{
24+
void setup() {
2625
unit = new Test_AT_CellularInformation();
2726
}
2827

29-
void teardown()
30-
{
28+
void teardown() {
3129
delete unit;
3230
}
3331
};

features/cellular/UNITTESTS/at/at_cellularinformation/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

features/cellular/UNITTESTS/at/at_cellularinformation/test_at_cellularinformation.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#ifndef TEST_AT_CELLULARINFORMATION_H
1818
#define TEST_AT_CELLULARINFORMATION_H
1919

20-
class Test_AT_CellularInformation
21-
{
20+
class Test_AT_CellularInformation {
2221
public:
2322
Test_AT_CellularInformation();
2423

features/cellular/UNITTESTS/at/at_cellularnetwork/at_cellularnetworktest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
TEST_GROUP(AT_CellularNetwork)
2121
{
22-
Test_AT_CellularNetwork* unit;
22+
Test_AT_CellularNetwork *unit;
2323

24-
void setup()
25-
{
24+
void setup() {
2625
unit = new Test_AT_CellularNetwork();
2726
}
2827

29-
void teardown()
30-
{
28+
void teardown() {
3129
delete unit;
3230
}
3331
};

features/cellular/UNITTESTS/at/at_cellularnetwork/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

features/cellular/UNITTESTS/at/at_cellularnetwork/test_at_cellularnetwork.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ class my_AT_CN : public AT_CellularNetwork {
3232
public:
3333
my_AT_CN(ATHandler &atHandler) : AT_CellularNetwork(atHandler) {}
3434
virtual ~my_AT_CN() {}
35-
NetworkStack *get_stack() {return AT_CellularNetwork::get_stack();}
35+
NetworkStack *get_stack()
36+
{
37+
return AT_CellularNetwork::get_stack();
38+
}
3639
};
3740

3841
void conn_stat_cb(nsapi_error_t error)
@@ -277,11 +280,11 @@ void Test_AT_CellularNetwork::test_AT_CellularNetwork_get_extended_signal_qualit
277280
ATHandler at(&fh1, que, 0, ",");
278281

279282
AT_CellularNetwork cn(at);
280-
int rx,be,rs,ec,rsrq,rsrp;
281-
CHECK(NSAPI_ERROR_DEVICE_ERROR == cn.get_extended_signal_quality(rx, be,rs,ec,rsrq, rsrp));
283+
int rx, be, rs, ec, rsrq, rsrp;
284+
CHECK(NSAPI_ERROR_DEVICE_ERROR == cn.get_extended_signal_quality(rx, be, rs, ec, rsrq, rsrp));
282285

283286
ATHandler_stub::int_value = 1;
284-
CHECK(NSAPI_ERROR_OK == cn.get_extended_signal_quality(rx, be,rs,ec,rsrq, rsrp));
287+
CHECK(NSAPI_ERROR_OK == cn.get_extended_signal_quality(rx, be, rs, ec, rsrq, rsrp));
285288
}
286289

287290
void Test_AT_CellularNetwork::test_AT_CellularNetwork_get_signal_quality()
@@ -291,11 +294,11 @@ void Test_AT_CellularNetwork::test_AT_CellularNetwork_get_signal_quality()
291294
ATHandler at(&fh1, que, 0, ",");
292295

293296
AT_CellularNetwork cn(at);
294-
int rs,ber;
295-
CHECK(NSAPI_ERROR_DEVICE_ERROR == cn.get_signal_quality(rs,ber));
297+
int rs, ber;
298+
CHECK(NSAPI_ERROR_DEVICE_ERROR == cn.get_signal_quality(rs, ber));
296299

297300
ATHandler_stub::int_value = 1;
298-
CHECK(NSAPI_ERROR_OK == cn.get_signal_quality(rs,ber));
301+
CHECK(NSAPI_ERROR_OK == cn.get_signal_quality(rs, ber));
299302
}
300303

301304
void Test_AT_CellularNetwork::test_AT_CellularNetwork_get_cell_id()

features/cellular/UNITTESTS/at/at_cellularnetwork/test_at_cellularnetwork.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#ifndef TEST_AT_CELLULARNETWORK_H
1818
#define TEST_AT_CELLULARNETWORK_H
1919

20-
class Test_AT_CellularNetwork
21-
{
20+
class Test_AT_CellularNetwork {
2221
public:
2322
Test_AT_CellularNetwork();
2423

features/cellular/UNITTESTS/at/at_cellularpower/at_cellularpowertest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
TEST_GROUP(AT_CellularPower)
2121
{
22-
Test_AT_CellularPower* unit;
22+
Test_AT_CellularPower *unit;
2323

24-
void setup()
25-
{
24+
void setup() {
2625
unit = new Test_AT_CellularPower();
2726
}
2827

29-
void teardown()
30-
{
28+
void teardown() {
3129
delete unit;
3230
}
3331
};

features/cellular/UNITTESTS/at/at_cellularpower/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

features/cellular/UNITTESTS/at/at_cellularpower/test_at_cellularpower.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,22 +108,22 @@ void Test_AT_CellularPower::test_AT_CellularPower_opt_power_save_mode()
108108

109109
AT_CellularPower pow(at);
110110
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_AUTH_FAILURE;
111-
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(0,0));
111+
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(0, 0));
112112

113-
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(10,0));
113+
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(10, 0));
114114

115-
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(912,0));
115+
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(912, 0));
116116

117-
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(1834,1834));
117+
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(1834, 1834));
118118

119-
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(18345,18345));
119+
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(18345, 18345));
120120

121-
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(101234,101234));
121+
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(101234, 101234));
122122

123-
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(1012345,1012345));
123+
CHECK(NSAPI_ERROR_AUTH_FAILURE == pow.opt_power_save_mode(1012345, 1012345));
124124

125125
ATHandler_stub::nsapi_error_value = NSAPI_ERROR_OK;
126-
CHECK(NSAPI_ERROR_OK == pow.opt_power_save_mode(39612345,39612345));
126+
CHECK(NSAPI_ERROR_OK == pow.opt_power_save_mode(39612345, 39612345));
127127
}
128128

129129
void Test_AT_CellularPower::test_AT_CellularPower_opt_receive_period()

features/cellular/UNITTESTS/at/at_cellularpower/test_at_cellularpower.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#ifndef TEST_AT_CELLULARPOWER_H
1818
#define TEST_AT_CELLULARPOWER_H
1919

20-
class Test_AT_CellularPower
21-
{
20+
class Test_AT_CellularPower {
2221
public:
2322
Test_AT_CellularPower();
2423

features/cellular/UNITTESTS/at/at_cellularsim/at_cellularsimtest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
TEST_GROUP(AT_CellularSIM)
2121
{
22-
Test_AT_CellularSIM* unit;
22+
Test_AT_CellularSIM *unit;
2323

24-
void setup()
25-
{
24+
void setup() {
2625
unit = new Test_AT_CellularSIM();
2726
}
2827

29-
void teardown()
30-
{
28+
void teardown() {
3129
delete unit;
3230
}
3331
};

features/cellular/UNITTESTS/at/at_cellularsim/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

features/cellular/UNITTESTS/at/at_cellularsim/test_at_cellularsim.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#ifndef TEST_AT_CELLULARSIM_H
1818
#define TEST_AT_CELLULARSIM_H
1919

20-
class Test_AT_CellularSIM
21-
{
20+
class Test_AT_CellularSIM {
2221
public:
2322
Test_AT_CellularSIM();
2423

features/cellular/UNITTESTS/at/at_cellularsms/at_cellularsmstest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
TEST_GROUP(AT_CellularSMS)
2121
{
22-
Test_AT_CellularSMS* unit;
22+
Test_AT_CellularSMS *unit;
2323

24-
void setup()
25-
{
24+
void setup() {
2625
unit = new Test_AT_CellularSMS();
2726
}
2827

29-
void teardown()
30-
{
28+
void teardown() {
3129
delete unit;
3230
}
3331
};

features/cellular/UNITTESTS/at/at_cellularsms/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

features/cellular/UNITTESTS/at/at_cellularsms/test_at_cellularsms.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#ifndef TEST_AT_CELLULARSMS_H
1818
#define TEST_AT_CELLULARSMS_H
1919

20-
class Test_AT_CellularSMS
21-
{
20+
class Test_AT_CellularSMS {
2221
public:
2322
Test_AT_CellularSMS();
2423

features/cellular/UNITTESTS/at/at_cellularstack/at_cellularstacktest.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@
1919

2020
TEST_GROUP(AT_CellularStack)
2121
{
22-
Test_AT_CellularStack* unit;
22+
Test_AT_CellularStack *unit;
2323

24-
void setup()
25-
{
24+
void setup() {
2625
unit = new Test_AT_CellularStack();
2726
}
2827

29-
void teardown()
30-
{
28+
void teardown() {
3129
delete unit;
3230
}
3331
};

features/cellular/UNITTESTS/at/at_cellularstack/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "CppUTest/TestPlugin.h"
2020
#include "CppUTest/TestRegistry.h"
2121
#include "CppUTestExt/MockSupportPlugin.h"
22-
int main(int ac, char** av)
22+
int main(int ac, char **av)
2323
{
2424
return CommandLineTestRunner::RunAllTests(ac, av);
2525
}

0 commit comments

Comments
 (0)