Commit bc254f15 authored by Paolo Ambrosio's avatar Paolo Ambrosio Committed by Kamil Strzempowicz
Browse files

Added test for GenericDriver, removed duplication in includes

parent 14b40863
#if defined(GTEST_INCLUDE_GTEST_GTEST_H_)
#include "internal/drivers/GTestDriver.hpp"
#elif defined(BOOST_TEST_CASE)
#include "internal/drivers/BoostDriver.hpp"
#elif defined(CPPSPEC_H_)
#include "internal/drivers/CppSpecDriver.hpp"
#else
#error No test framework found: Please #include testing framework before cucumber-cpp or #include defs.hpp for Generic Driver
#include "internal/defs.hpp"
#ifndef STEP_INHERITANCE
#error No test framework found: please include a testing framework before autodetect.hpp or include defs.hpp
#endif
#include "internal/step/StepManager.hpp"
#include "internal/hook/HookRegistrar.hpp"
#include "internal/ContextManager.hpp"
#include "internal/Macros.hpp"
#include "internal/step/StepManager.hpp"
#include "internal/hook/HookRegistrar.hpp"
#include "internal/ContextManager.hpp"
#include "internal/Macros.hpp"
#include "internal/drivers/DriverSelector.hpp"
#include "internal/defs.hpp"
#ifndef STEP_INHERITANCE
#include "internal/drivers/GenericDriver.hpp"
#endif
#include "step/StepManager.hpp"
#include "hook/HookRegistrar.hpp"
#include "ContextManager.hpp"
#include "Macros.hpp"
#include "drivers/DriverSelector.hpp"
......@@ -4,6 +4,4 @@
#include "BoostDriver.hpp"
#elif defined(CPPSPEC_H_)
#include "CppSpecDriver.hpp"
#else // No test framework
#include "GenericDriver.hpp"
#endif
......@@ -47,3 +47,4 @@ if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
cuke_add_driver_test(integration/drivers/BoostDriverTest ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
endif()
cuke_add_driver_test(integration/drivers/GenericDriverTest)
#include <boost/version.hpp>
#include <boost/test/unit_test.hpp>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include "../../utils/DriverTestRunner.hpp"
......
#include <CppSpec/CppSpec.h>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include "../../utils/DriverTestRunner.hpp"
......
#include <gtest/gtest.h>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include "../../utils/DriverTestRunner.hpp"
......
#include <cucumber-cpp/defs.hpp>
#include "../../utils/DriverTestRunner.hpp"
using namespace cucumber;
THEN(SUCCEED_MATCHER) {
ScenarioScope<SomeContext> ctx;
// Do not throw for successes
}
THEN(FAIL_MATCHER) {
ScenarioScope<SomeContext> ctx;
throw std::runtime_error("Failure description");
}
THEN(PENDING_MATCHER_1) {
pending();
}
THEN(PENDING_MATCHER_2) {
pending(PENDING_DESCRIPTION);
}
using namespace cucumber::internal;
int main(int argc, char **argv) {
return DriverTest().run();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment