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 "AT_CellularBase.h"
// AStyle ignored as the definition is not clear due to preprocessor usage
// *INDENT-OFF*
TEST_GROUP(AT_CellularBase)
{
Test_AT_CellularBase *unit;
void setup() {
void setup()
{
unit = new Test_AT_CellularBase();
}
void teardown() {
void teardown()
{
delete unit;
}
};
// *INDENT-ON*
TEST(AT_CellularBase, Create)
{

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.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_AT_CellularInformation *unit;
void setup() {
void setup()
{
unit = new Test_AT_CellularInformation();
}
void teardown() {
void teardown()
{
delete unit;
}
};
// *INDENT-ON*
TEST(AT_CellularInformation, Create)
{

View File

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

View File

@ -17,6 +17,8 @@
#include "CppUTest/TestHarness.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_AT_CellularPower *unit;
@ -29,6 +31,7 @@ TEST_GROUP(AT_CellularPower)
delete unit;
}
};
// *INDENT-ON*
TEST(AT_CellularPower, Create)
{

View File

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

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.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_AT_CellularSMS *unit;
void setup() {
void setup()
{
unit = new Test_AT_CellularSMS();
}
void teardown() {
void teardown()
{
delete unit;
}
};
// *INDENT-ON*
TEST(AT_CellularSMS, Create)
{

View File

@ -17,18 +17,23 @@
#include "CppUTest/TestHarness.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_AT_CellularStack *unit;
void setup() {
void setup()
{
unit = new Test_AT_CellularStack();
}
void teardown() {
void teardown()
{
delete unit;
}
};
// *INDENT-ON*
TEST(AT_CellularStack, Create)
{

View File

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

View File

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