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.
pull/7621/head
Martin Kojtal 2018-07-31 13:15:57 +01:00
parent cde18aa0bc
commit 85ef7a008f
9 changed files with 59 additions and 16 deletions

View File

@ -18,18 +18,23 @@
#include "test_at_cellularbase.h" #include "test_at_cellularbase.h"
#include "AT_CellularBase.h" #include "AT_CellularBase.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularBase) TEST_GROUP(AT_CellularBase)
{ {
Test_AT_CellularBase *unit; Test_AT_CellularBase *unit;
void setup() { void setup()
{
unit = new Test_AT_CellularBase(); unit = new Test_AT_CellularBase();
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(AT_CellularBase, Create) TEST(AT_CellularBase, Create)
{ {

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.h" #include "CppUTest/TestHarness.h"
#include "test_at_cellularinformation.h" #include "test_at_cellularinformation.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularInformation) TEST_GROUP(AT_CellularInformation)
{ {
Test_AT_CellularInformation *unit; Test_AT_CellularInformation *unit;
void setup() { void setup()
{
unit = new Test_AT_CellularInformation(); unit = new Test_AT_CellularInformation();
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(AT_CellularInformation, Create) TEST(AT_CellularInformation, Create)
{ {

View File

@ -18,21 +18,26 @@
#include "test_at_cellularnetwork.h" #include "test_at_cellularnetwork.h"
#include "ATHandler_stub.h" #include "ATHandler_stub.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularNetwork) TEST_GROUP(AT_CellularNetwork)
{ {
Test_AT_CellularNetwork *unit; Test_AT_CellularNetwork *unit;
void setup() { void setup()
{
unit = new Test_AT_CellularNetwork(); unit = new Test_AT_CellularNetwork();
ATHandler_stub::int_count = kRead_int_table_size; ATHandler_stub::int_count = kRead_int_table_size;
ATHandler_stub::read_string_index = kRead_string_table_size; ATHandler_stub::read_string_index = kRead_string_table_size;
ATHandler_stub::resp_stop_success_count = kResp_stop_count_default; ATHandler_stub::resp_stop_success_count = kResp_stop_count_default;
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(AT_CellularNetwork, Create) TEST(AT_CellularNetwork, Create)
{ {

View File

@ -17,6 +17,8 @@
#include "CppUTest/TestHarness.h" #include "CppUTest/TestHarness.h"
#include "test_at_cellularpower.h" #include "test_at_cellularpower.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularPower) TEST_GROUP(AT_CellularPower)
{ {
Test_AT_CellularPower *unit; Test_AT_CellularPower *unit;
@ -29,6 +31,7 @@ TEST_GROUP(AT_CellularPower)
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(AT_CellularPower, Create) TEST(AT_CellularPower, Create)
{ {

View File

@ -18,19 +18,24 @@
#include "test_at_cellularsim.h" #include "test_at_cellularsim.h"
#include "ATHandler_stub.h" #include "ATHandler_stub.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularSIM) TEST_GROUP(AT_CellularSIM)
{ {
Test_AT_CellularSIM *unit; Test_AT_CellularSIM *unit;
void setup() { void setup()
{
unit = new Test_AT_CellularSIM(); unit = new Test_AT_CellularSIM();
ATHandler_stub::read_string_index = kRead_string_table_size; ATHandler_stub::read_string_index = kRead_string_table_size;
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(AT_CellularSIM, Create) TEST(AT_CellularSIM, Create)
{ {

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.h" #include "CppUTest/TestHarness.h"
#include "test_at_cellularsms.h" #include "test_at_cellularsms.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularSMS) TEST_GROUP(AT_CellularSMS)
{ {
Test_AT_CellularSMS *unit; Test_AT_CellularSMS *unit;
void setup() { void setup()
{
unit = new Test_AT_CellularSMS(); unit = new Test_AT_CellularSMS();
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(AT_CellularSMS, Create) TEST(AT_CellularSMS, Create)
{ {

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.h" #include "CppUTest/TestHarness.h"
#include "test_at_cellularstack.h" #include "test_at_cellularstack.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularStack) TEST_GROUP(AT_CellularStack)
{ {
Test_AT_CellularStack *unit; Test_AT_CellularStack *unit;
void setup() { void setup()
{
unit = new Test_AT_CellularStack(); unit = new Test_AT_CellularStack();
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(AT_CellularStack, Create) TEST(AT_CellularStack, Create)
{ {

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.h" #include "CppUTest/TestHarness.h"
#include "test_athandler.h" #include "test_athandler.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(ATHandler) TEST_GROUP(ATHandler)
{ {
Test_ATHandler *unit; Test_ATHandler *unit;
void setup() { void setup()
{
unit = new Test_ATHandler(); unit = new Test_ATHandler();
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(ATHandler, Create) TEST(ATHandler, Create)
{ {

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.h" #include "CppUTest/TestHarness.h"
#include "test_util.h" #include "test_util.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(util) TEST_GROUP(util)
{ {
Test_util *unit; Test_util *unit;
void setup() { void setup()
{
unit = new Test_util(); unit = new Test_util();
} }
void teardown() { void teardown()
{
delete unit; delete unit;
} }
}; };
// *INDENT-ON*
TEST(util, Create) TEST(util, Create)
{ {