File tree 4 files changed +12
-10
lines changed
examples/Calc/features/step_definitions
include/cucumber-cpp/internal/drivers
tests/integration/drivers
4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 1
1
#include < QTest>
2
2
// Pretend to be GTest
3
- #define EXPECT_EQ QCOMPARE
3
+ #define EXPECT_EQ QCOMPARE
4
4
#include " CalculatorSteps.cpp"
Original file line number Diff line number Diff line change 7
7
namespace cucumber {
8
8
namespace internal {
9
9
10
- class QtTestStep : public BasicStep {
10
+ class QtTestStep : public BasicStep {
11
11
friend class QtTestObject ;
12
+
12
13
public:
13
- QtTestStep (): BasicStep() {}
14
+ QtTestStep () : BasicStep() {}
14
15
15
16
protected:
16
17
const InvokeResult invokeStepBody ();
17
18
};
18
19
19
20
#define STEP_INHERITANCE (step_name ) ::cucumber::internal::QtTestStep
20
21
21
- class QtTestObject : public QObject {
22
+ class QtTestObject : public QObject {
22
23
Q_OBJECT
23
24
public:
24
25
QtTestObject (QtTestStep* qtTestStep): step(qtTestStep) {}
Original file line number Diff line number Diff line change @@ -15,11 +15,13 @@ const InvokeResult QtTestStep::invokeStepBody() {
15
15
file.close ();
16
16
17
17
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 ) {
20
23
return InvokeResult::success ();
21
- else
22
- {
24
+ } else {
23
25
file.open ();
24
26
QTextStream ts (&file);
25
27
return InvokeResult::failure (ts.readAll ().toLocal8Bit ());
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ using namespace cucumber::internal;
27
27
28
28
class QtTestStepDouble : public QtTestStep {
29
29
public:
30
- QtTestStepDouble () : QtTestStep(), testRun(false ) { }
30
+ QtTestStepDouble () : QtTestStep(), testRun(false ) {}
31
31
32
32
const InvokeResult invokeStepBody () {
33
33
return QtTestStep::invokeStepBody ();
@@ -60,4 +60,3 @@ int main() {
60
60
QtTestDriverTest test;
61
61
return test.run ();
62
62
}
63
-
You can’t perform that action at this time.
0 commit comments