Skip to content

Commit 85ef7a0

Browse files
committed
cellular: fix tests that astyle breaks
Ignore TEST_GROUP by AStyle. As this uses macro, is not visible to formatter. By default, it assumes it is a function and treats methods as blocks inside a function (inlined {}). We ignore it. We might just not format UNITTESTS in the future if we face similar issues in the future.
1 parent cde18aa commit 85ef7a0

File tree

9 files changed

+59
-16
lines changed

9 files changed

+59
-16
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,23 @@
1818
#include "test_at_cellularbase.h"
1919
#include "AT_CellularBase.h"
2020

21+
// AStyle ignored as the definition is not clear due to preprocessor usage
22+
// *INDENT-OFF*
2123
TEST_GROUP(AT_CellularBase)
2224
{
2325
Test_AT_CellularBase *unit;
2426

25-
void setup() {
27+
void setup()
28+
{
2629
unit = new Test_AT_CellularBase();
2730
}
2831

29-
void teardown() {
32+
void teardown()
33+
{
3034
delete unit;
3135
}
3236
};
37+
// *INDENT-ON*
3338

3439
TEST(AT_CellularBase, Create)
3540
{

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@
1717
#include "CppUTest/TestHarness.h"
1818
#include "test_at_cellularinformation.h"
1919

20+
// AStyle ignored as the definition is not clear due to preprocessor usage
21+
// *INDENT-OFF*
2022
TEST_GROUP(AT_CellularInformation)
2123
{
2224
Test_AT_CellularInformation *unit;
2325

24-
void setup() {
26+
void setup()
27+
{
2528
unit = new Test_AT_CellularInformation();
2629
}
2730

28-
void teardown() {
31+
void teardown()
32+
{
2933
delete unit;
3034
}
3135
};
36+
// *INDENT-ON*
3237

3338
TEST(AT_CellularInformation, Create)
3439
{

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,26 @@
1818
#include "test_at_cellularnetwork.h"
1919
#include "ATHandler_stub.h"
2020

21+
// AStyle ignored as the definition is not clear due to preprocessor usage
22+
// *INDENT-OFF*
2123
TEST_GROUP(AT_CellularNetwork)
2224
{
2325
Test_AT_CellularNetwork *unit;
2426

25-
void setup() {
27+
void setup()
28+
{
2629
unit = new Test_AT_CellularNetwork();
2730
ATHandler_stub::int_count = kRead_int_table_size;
2831
ATHandler_stub::read_string_index = kRead_string_table_size;
2932
ATHandler_stub::resp_stop_success_count = kResp_stop_count_default;
3033
}
3134

32-
void teardown() {
35+
void teardown()
36+
{
3337
delete unit;
3438
}
3539
};
40+
// *INDENT-ON*
3641

3742
TEST(AT_CellularNetwork, Create)
3843
{

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include "CppUTest/TestHarness.h"
1818
#include "test_at_cellularpower.h"
1919

20+
// AStyle ignored as the definition is not clear due to preprocessor usage
21+
// *INDENT-OFF*
2022
TEST_GROUP(AT_CellularPower)
2123
{
2224
Test_AT_CellularPower *unit;
@@ -29,6 +31,7 @@ TEST_GROUP(AT_CellularPower)
2931
delete unit;
3032
}
3133
};
34+
// *INDENT-ON*
3235

3336
TEST(AT_CellularPower, Create)
3437
{

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,24 @@
1818
#include "test_at_cellularsim.h"
1919
#include "ATHandler_stub.h"
2020

21+
// AStyle ignored as the definition is not clear due to preprocessor usage
22+
// *INDENT-OFF*
2123
TEST_GROUP(AT_CellularSIM)
2224
{
2325
Test_AT_CellularSIM *unit;
2426

25-
void setup() {
27+
void setup()
28+
{
2629
unit = new Test_AT_CellularSIM();
2730
ATHandler_stub::read_string_index = kRead_string_table_size;
2831
}
2932

30-
void teardown() {
33+
void teardown()
34+
{
3135
delete unit;
3236
}
3337
};
38+
// *INDENT-ON*
3439

3540
TEST(AT_CellularSIM, Create)
3641
{

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@
1717
#include "CppUTest/TestHarness.h"
1818
#include "test_at_cellularsms.h"
1919

20+
// AStyle ignored as the definition is not clear due to preprocessor usage
21+
// *INDENT-OFF*
2022
TEST_GROUP(AT_CellularSMS)
2123
{
2224
Test_AT_CellularSMS *unit;
2325

24-
void setup() {
26+
void setup()
27+
{
2528
unit = new Test_AT_CellularSMS();
2629
}
2730

28-
void teardown() {
31+
void teardown()
32+
{
2933
delete unit;
3034
}
3135
};
36+
// *INDENT-ON*
3237

3338
TEST(AT_CellularSMS, Create)
3439
{

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@
1717
#include "CppUTest/TestHarness.h"
1818
#include "test_at_cellularstack.h"
1919

20+
// AStyle ignored as the definition is not clear due to preprocessor usage
21+
// *INDENT-OFF*
2022
TEST_GROUP(AT_CellularStack)
2123
{
2224
Test_AT_CellularStack *unit;
2325

24-
void setup() {
26+
void setup()
27+
{
2528
unit = new Test_AT_CellularStack();
2629
}
2730

28-
void teardown() {
31+
void teardown()
32+
{
2933
delete unit;
3034
}
3135
};
36+
// *INDENT-ON*
3237

3338
TEST(AT_CellularStack, Create)
3439
{

features/cellular/UNITTESTS/at/athandler/athandlertest.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@
1717
#include "CppUTest/TestHarness.h"
1818
#include "test_athandler.h"
1919

20+
// AStyle ignored as the definition is not clear due to preprocessor usage
21+
// *INDENT-OFF*
2022
TEST_GROUP(ATHandler)
2123
{
2224
Test_ATHandler *unit;
2325

24-
void setup() {
26+
void setup()
27+
{
2528
unit = new Test_ATHandler();
2629
}
2730

28-
void teardown() {
31+
void teardown()
32+
{
2933
delete unit;
3034
}
3135
};
36+
// *INDENT-ON*
3237

3338
TEST(ATHandler, Create)
3439
{

features/cellular/UNITTESTS/common/util/utiltest.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,23 @@
1717
#include "CppUTest/TestHarness.h"
1818
#include "test_util.h"
1919

20+
// AStyle ignored as the definition is not clear due to preprocessor usage
21+
// *INDENT-OFF*
2022
TEST_GROUP(util)
2123
{
2224
Test_util *unit;
2325

24-
void setup() {
26+
void setup()
27+
{
2528
unit = new Test_util();
2629
}
2730

28-
void teardown() {
31+
void teardown()
32+
{
2933
delete unit;
3034
}
3135
};
36+
// *INDENT-ON*
3237

3338
TEST(util, Create)
3439
{

0 commit comments

Comments
 (0)