File tree Expand file tree Collapse file tree 5 files changed +22
-0
lines changed
features/step_definitions
features/step_definitions Expand file tree Collapse file tree 5 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -20,3 +20,8 @@ if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
20
20
add_executable (BoostCalculatorSteps features/step_definitions/BoostCalculatorSteps )
21
21
target_link_libraries (BoostCalculatorSteps Calc ${CUKE_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} )
22
22
endif ()
23
+
24
+ if (Qt5TEST_FOUND )
25
+ add_executable (QtTestCalculatorSteps features/step_definitions/QtTestCalculatorSteps )
26
+ target_link_libraries (QtTestCalculatorSteps Calc Qt5::Test ${CUKE_LIBRARIES} )
27
+ endif ()
Original file line number Diff line number Diff line change
1
+ #include < QTest>
2
+ // Pretend to be GTest
3
+ #define EXPECT_EQ QCOMPARE
4
+ #include " CalculatorSteps.cpp"
Original file line number Diff line number Diff line change @@ -9,12 +9,19 @@ if(QT_LIBRARIES)
9
9
add_executable (calcqt src/CalcQt.cpp )
10
10
target_link_libraries (calcqt libcalcqt ${QT_LIBRARIES} )
11
11
12
+ if (Qt5TEST_FOUND )
13
+ add_executable (QtTestCalculatorQtSteps features/step_definitions/QtTestCalculatorQtSteps )
14
+ target_link_libraries (QtTestCalculatorQtSteps PRIVATE libcalcqt ${QT_LIBRARIES} ${CUKE_LIBRARIES} )
15
+ endif ()
16
+
12
17
if (Boost_UNIT_TEST_FRAMEWORK_FOUND )
13
18
add_executable (BoostCalculatorQtSteps features/step_definitions/BoostCalculatorQtSteps )
14
19
target_link_libraries (BoostCalculatorQtSteps libcalcqt ${CUKE_LIBRARIES} ${QT_LIBRARIES} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} )
15
20
endif ()
21
+
16
22
if (GTEST_FOUND )
17
23
add_executable (GTestCalculatorQtSteps features/step_definitions/GTestCalculatorQtSteps )
18
24
target_link_libraries (GTestCalculatorQtSteps libcalcqt ${CUKE_LIBRARIES} ${CUKE_GTEST_LIBRARIES} ${QT_LIBRARIES} )
19
25
endif ()
26
+
20
27
endif ()
Original file line number Diff line number Diff line change
1
+ #include < QTest>
2
+ // Pretend to be GTest
3
+ #define EXPECT_EQ QCOMPARE
4
+ #include " CalculatorQtSteps.cpp"
Original file line number Diff line number Diff line change 50
50
51
51
for TEST in \
52
52
build/examples/Calc/GTestCalculatorSteps \
53
+ build/examples/Calc/QtTestCalculatorSteps \
53
54
build/examples/Calc/BoostCalculatorSteps \
54
55
build/examples/Calc/FuncArgsCalculatorSteps \
55
56
; do
63
64
64
65
for TEST in \
65
66
build/examples/CalcQt/GTestCalculatorQtSteps \
67
+ build/examples/CalcQt/QtTestCalculatorQtSteps \
66
68
build/examples/CalcQt/BoostCalculatorQtSteps \
67
69
; do
68
70
if [ -f " ${TEST} " -a -n " ${DISPLAY:- } " ]; then
You can’t perform that action at this time.
0 commit comments