Skip to content

Commit ff90d35

Browse files
committed
Formatting the code
1 parent d792a50 commit ff90d35

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#include <QTest>
22
// Pretend to be GTest
3-
#define EXPECT_EQ QCOMPARE
3+
#define EXPECT_EQ QCOMPARE
44
#include "CalculatorSteps.cpp"

include/cucumber-cpp/internal/drivers/QtTestDriver.hpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@
77
namespace cucumber {
88
namespace internal {
99

10-
class QtTestStep : public BasicStep{
10+
class QtTestStep : public BasicStep {
1111
friend class QtTestObject;
12+
1213
public:
13-
QtTestStep(): BasicStep() {}
14+
QtTestStep() : BasicStep() {}
1415

1516
protected:
1617
const InvokeResult invokeStepBody();
1718
};
1819

1920
#define STEP_INHERITANCE(step_name) ::cucumber::internal::QtTestStep
2021

21-
class QtTestObject: public QObject {
22+
class QtTestObject : public QObject {
2223
Q_OBJECT
2324
public:
2425
QtTestObject(QtTestStep* qtTestStep): step(qtTestStep) {}

src/drivers/QtTestDriver.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ const InvokeResult QtTestStep::invokeStepBody() {
1515
file.close();
1616

1717
QtTestObject testObject(this);
18-
int returnValue = QTest::qExec(&testObject, QStringList() << "test" << "-o" << file.fileName());
19-
if (returnValue == 0)
18+
int returnValue = QTest::qExec(&testObject,
19+
QStringList() << "test"
20+
<< "-o"
21+
<< file.fileName());
22+
if (returnValue == 0) {
2023
return InvokeResult::success();
21-
else
22-
{
24+
} else {
2325
file.open();
2426
QTextStream ts(&file);
2527
return InvokeResult::failure(ts.readAll().toLocal8Bit());

tests/integration/drivers/QtTestDriverTest.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using namespace cucumber::internal;
2727

2828
class QtTestStepDouble : public QtTestStep {
2929
public:
30-
QtTestStepDouble() : QtTestStep(), testRun(false) { }
30+
QtTestStepDouble() : QtTestStep(), testRun(false) {}
3131

3232
const InvokeResult invokeStepBody() {
3333
return QtTestStep::invokeStepBody();
@@ -60,4 +60,3 @@ int main() {
6060
QtTestDriverTest test;
6161
return test.run();
6262
}
63-

0 commit comments

Comments
 (0)