Commit 14b40863 authored by Kamil Strzempowicz's avatar Kamil Strzempowicz
Browse files

new approach to GenericDriver

parent 695fb653
#include <boost/test/unit_test.hpp>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include <Calculator.h>
......
#include <CppSpec/CppSpec.h>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include <Calculator.h>
......
#include <gtest/gtest.h>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include <Calculator.h>
......
#include <cstdlib>
#include <boost/test/unit_test.hpp>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include <QApplication>
#include <QTest>
......
#include <cstdlib>
#include <gtest/gtest.h>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include <QApplication>
#include <QTest>
......
#include <gtest/gtest.h>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include <string>
#include <map>
......
#include <gtest/gtest.h>
#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/autodetect.hpp>
#include <iostream>
......
#define CUKE_ENABLE_GENERICDRIVER
#include <cucumber-cpp/defs.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/math/constants/constants.hpp>
......
......@@ -231,7 +231,6 @@ EOF
def append_support_code(code)
helper_functions = get_absolute_path('../support/HelperFunctions.hpp');
@support_code ||= <<-EOF
#define CUKE_ENABLE_GENERICDRIVER
#include <cucumber-cpp/defs.hpp>
#include "#{helper_functions}"
......
#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
#endif
#include "internal/step/StepManager.hpp"
#include "internal/hook/HookRegistrar.hpp"
#include "internal/ContextManager.hpp"
#include "internal/Macros.hpp"
......@@ -5,9 +5,5 @@
#elif defined(CPPSPEC_H_)
#include "CppSpecDriver.hpp"
#else // No test framework
#ifdef CUKE_ENABLE_GENERICDRIVER
#include "GenericDriver.hpp"
#else
#error Please #inlude testing framework before cucumber-cpp or #define CUKE_ENABLE_GENERICDRIVER explicitly
#endif
#include "GenericDriver.hpp"
#endif
......@@ -6,12 +6,12 @@
namespace cucumber {
namespace internal {
class FakeStep : public BasicStep {
class GenericStep : public BasicStep {
protected:
virtual const InvokeResult invokeStepBody();
};
#define STEP_INHERITANCE(step_name) virtual ::cucumber::internal::FakeStep
#define STEP_INHERITANCE(step_name) virtual ::cucumber::internal::GenericStep
}
}
......
......@@ -3,7 +3,7 @@
namespace cucumber {
namespace internal {
const InvokeResult FakeStep::invokeStepBody() {
const InvokeResult GenericStep::invokeStepBody() {
// No try/catch block to throw the original exceptions to the testing framework
body();
return InvokeResult::success();
......
......@@ -8,7 +8,7 @@ using namespace cucumber::internal;
#define MANUAL_STEP_MATCHER "manual step"
class ManualStep : public FakeStep {
class ManualStep : public GenericStep {
public:
void body() {};
//private:
......
......@@ -6,13 +6,13 @@ using namespace cucumber::internal;
#define PENDING_STEP_DESCRIPTION "A description"
class PendingStep : public FakeStep {
class PendingStep : public GenericStep {
void body() {
pending();
}
};
class PendingStepWithDescription : public FakeStep {
class PendingStepWithDescription : public GenericStep {
void body() {
pending(PENDING_STEP_DESCRIPTION);
}
......
......@@ -15,7 +15,7 @@ protected:
}
};
class CheckAllParameters : public FakeStep {
class CheckAllParameters : public GenericStep {
protected:
static const int arg_0_int;
static const double arg_1_double;
......
......@@ -10,7 +10,7 @@
using namespace cucumber::internal;
using boost::shared_ptr;
class EmptyStep : public FakeStep {
class EmptyStep : public GenericStep {
void body() {}
};
......
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