Skip to content

Commit

Permalink
Project rename from CukeBins to Cucumber-Cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloambrosio committed May 20, 2012
1 parent f0aa2b2 commit efecfd0
Show file tree
Hide file tree
Showing 77 changed files with 325 additions and 322 deletions.
19 changes: 11 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
cmake_minimum_required(VERSION 2.8)

project(CukeBins)
project(Cucumber-Cpp)

set(CUKE_USE_STATIC_BOOST ${MSVC} CACHE BOOL "Statically link Boost (except boost::test)")
set(CUKE_DISABLE_BOOST_TEST OFF CACHE BOOL "Disable boost:test")
set(CUKE_DISABLE_CPPSPEC OFF CACHE BOOL "Disable CppSpec")
set(CUKE_DISABLE_GTEST OFF CACHE BOOL "Disable Google Test framework")
set(CUKE_ENABLE_EXAMPLES OFF CACHE BOOL "Enable the examples")

enable_testing()

Expand Down Expand Up @@ -39,7 +40,7 @@ if(CUKE_USE_STATIC_BOOST)

if(NOT MSVC)
find_package(Threads)
set(CUKEBINS_EXTRA_LIBRARIES ${CUKEBINS_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
set(CUKE_EXTRA_LIBRARIES ${CUKE_EXTRA_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif()
else()
set(CUKE_DYNAMIC_BOOST_LIBS ${CUKE_CORE_BOOST_LIBS} ${CUKE_TEST_BOOST_LIBS})
Expand All @@ -58,7 +59,7 @@ endif()

if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
set(CUKEBINS_EXTRA_LIBRARIES ${CUKEBINS_EXTRA_LIBRARIES} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
set(CUKE_EXTRA_LIBRARIES ${CUKE_EXTRA_LIBRARIES} ${Boost_THREAD_LIBRARY} ${Boost_SYSTEM_LIBRARY} ${Boost_REGEX_LIBRARY} ${Boost_DATE_TIME_LIBRARY})
endif()

#
Expand All @@ -79,16 +80,18 @@ if(NOT CUKE_DISABLE_GTEST)
endif()

#
# CukeBins
# Cucumber-Cpp
#

set(CUKEBINS_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(CUKE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/include)

include_directories(${CUKEBINS_INCLUDE_DIRS})
include_directories(${CUKE_INCLUDE_DIRS})

set(CUKEBINS_LIBRARIES CukeBins ${CUKEBINS_EXTRA_LIBRARIES})
set(CUKE_LIBRARIES cucumber-cpp ${CUKE_EXTRA_LIBRARIES})

add_subdirectory(src)
add_subdirectory(tests)
add_subdirectory(examples)

if(CUKE_ENABLE_EXAMPLES)
add_subdirectory(examples)
endif()
16 changes: 10 additions & 6 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CukeBins allows Cucumber to support step definitions written in C++
Cucumber-Cpp allows Cucumber to support step definitions written in C++


CukeBins Website: http://github.com/paoloambrosio/cukebins
CukeBins Documentation: https://github.com/paoloambrosio/cukebins/wiki/
Cucumber-Cpp Website: http://github.com/cucumber/cucumber-cpp
Cucumber-Cpp Documentation: https://github.com/cucumber/cucumber-cpp/wiki/
Cucumber Website: http://cukes.info/


Expand All @@ -12,19 +12,24 @@ The current library relies on a few libraries:
Required libraries: thread, system, regex, and date_time
Optional library for Boost Test driver: test
* GTest 1.4 or later - http://code.google.com/p/googletest/
Optional for CukeBins test suite and for the GTest driver
Optional for the GTest driver
* CppSpec development branch - https://github.com/tpuronen/cppspec
Optional for the CppSpec driver
* GMock 1.6 or later - http://code.google.com/p/googlemock/
Optional for the internal test suite

This header-only library is included in the source code:

* JSON Spirit - http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx

It might work with earlier versions of the libraries, but it was not
tested with them.


Building tests and sample application:

cmake -E make_directory build
cmake -E chdir build cmake ..
cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on ..
cmake --build build
cmake --build build --target test

Expand All @@ -37,4 +42,3 @@ Running the example on Windows (NMake):

start build\examples\Calc\CalculatorSteps.exe
cucumber examples\Calc\CalcFeatures

8 changes: 4 additions & 4 deletions examples/Calc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
project(Calc)

include_directories(${CUKEBINS_INCLUDE_DIRS} Calc)
include_directories(${CUKE_INCLUDE_DIRS} Calc)

add_library(Calc Calc/Calculator)

if(GTEST_FOUND)
include_directories(${GTEST_INCLUDE_DIRS})
add_executable(GTestCalculatorSteps CalcFeatures/GTestCalculatorSteps)
target_link_libraries(GTestCalculatorSteps Calc ${GTEST_LIBRARIES} ${CUKEBINS_LIBRARIES})
target_link_libraries(GTestCalculatorSteps Calc ${GTEST_LIBRARIES} ${CUKE_LIBRARIES})
endif()

if(CPPSPEC_FOUND)
include_directories(${CPPSPEC_INCLUDE_DIRS})
add_executable(CppSpecCalculatorSteps CalcFeatures/CppSpecCalculatorSteps)
target_link_libraries(CppSpecCalculatorSteps Calc ${CPPSPEC_LIBRARY} ${CUKEBINS_LIBRARIES})
target_link_libraries(CppSpecCalculatorSteps Calc ${CPPSPEC_LIBRARY} ${CUKE_LIBRARIES})
endif()

if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
add_executable(BoostCalculatorSteps CalcFeatures/BoostCalculatorSteps)
target_link_libraries(BoostCalculatorSteps Calc ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${CUKEBINS_LIBRARIES})
target_link_libraries(BoostCalculatorSteps Calc ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${CUKE_LIBRARIES})
endif()
2 changes: 1 addition & 1 deletion examples/Calc/CalcFeatures/BoostCalculatorSteps.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <boost/test/unit_test.hpp>
#include <cukebins/wireserver.hpp>
#include <cucumber-cpp/core.hpp>

#include <Calculator.h>

Expand Down
2 changes: 1 addition & 1 deletion examples/Calc/CalcFeatures/CppSpecCalculatorSteps.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <CppSpec/CppSpec.h>
#include <cukebins/wireserver.hpp>
#include <cucumber-cpp/core.hpp>

#include <Calculator.h>

Expand Down
2 changes: 1 addition & 1 deletion examples/Calc/CalcFeatures/GTestCalculatorSteps.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <gtest/gtest.h>
#include <cukebins/wireserver.hpp>
#include <cucumber-cpp/core.hpp>

#include <Calculator.h>

Expand Down
6 changes: 3 additions & 3 deletions examples/FeatureShowcase/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
project(FeatureShowcase)

include_directories(${CUKEBINS_INCLUDE_DIRS})
include_directories(${CUKE_INCLUDE_DIRS})

if(GTEST_FOUND)
include_directories(${GTEST_INCLUDE_DIRS})

add_executable(TagSteps tag/TagSteps)
target_link_libraries(TagSteps ${GTEST_LIBRARIES} ${CUKEBINS_LIBRARIES})
target_link_libraries(TagSteps ${GTEST_LIBRARIES} ${CUKE_LIBRARIES})

add_executable(TableSteps table/TableSteps)
target_link_libraries(TableSteps ${GTEST_LIBRARIES} ${CUKEBINS_LIBRARIES})
target_link_libraries(TableSteps ${GTEST_LIBRARIES} ${CUKE_LIBRARIES})
endif()

4 changes: 2 additions & 2 deletions examples/FeatureShowcase/table/TableSteps.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <gtest/gtest.h>
#include <cukebins/wireserver.hpp>
#include <cucumber-cpp/core.hpp>

#include <string>
#include <map>
Expand Down Expand Up @@ -43,7 +43,7 @@ GIVEN("^the following actors are still active") {
for (table_hashes_type::const_iterator ait = actors.begin(); ait != actors.end(); ++ait) {
std::string name(ait->at("name"));
std::string yearString(ait->at("born"));
const ActiveActors::actor_year_type year = ::cukebins::internal::fromString<ActiveActors::actor_year_type>(yearString);
const ActiveActors::actor_year_type year = ::cuke::internal::fromString<ActiveActors::actor_year_type>(yearString);
context->addActor(name, year);
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/FeatureShowcase/tag/TagSteps.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <gtest/gtest.h>
#include <cukebins/wireserver.hpp>
#include <cucumber-cpp/core.hpp>

#include <iostream>
using namespace std;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef CUKEBINS_HPP_
#define CUKEBINS_HPP_
#ifndef CUKE_CORE_HPP_
#define CUKE_CORE_HPP_

#include "internal/step/StepManager.hpp"
#include "internal/hook/HookRegistrar.hpp"
Expand All @@ -9,4 +9,4 @@
#include "internal/Macros.hpp"
#include "internal/drivers/DriverSelector.hpp"

#endif /* CUKEBINS_HPP_ */
#endif /* CUKE_CORE_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef CUKEBINS_CONTEXTMANAGER_HPP_
#define CUKEBINS_CONTEXTMANAGER_HPP_
#ifndef CUKE_CONTEXTMANAGER_HPP_
#define CUKE_CONTEXTMANAGER_HPP_

#include <vector>

#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>

namespace cukebins {
namespace cuke {
namespace internal {

using boost::shared_ptr;
Expand Down Expand Up @@ -69,4 +69,4 @@ T* SessionContextPtr<T>::operator->() {
}
}

#endif /* CUKEBINS_CONTEXTMANAGER_HPP_ */
#endif /* CUKE_CONTEXTMANAGER_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef CUKEBINS_CUKECOMMANDS_HPP_
#define CUKEBINS_CUKECOMMANDS_HPP_
#ifndef CUKE_CUKECOMMANDS_HPP_
#define CUKE_CUKECOMMANDS_HPP_

#include "ContextManager.hpp"
#include "Scenario.hpp"
Expand All @@ -13,7 +13,7 @@

#include <boost/shared_ptr.hpp>

namespace cukebins {
namespace cuke {
namespace internal {

using boost::shared_ptr;
Expand Down Expand Up @@ -41,4 +41,4 @@ class CukeCommands {
}
}

#endif /* CUKEBINS_CUKECOMMANDS_HPP_ */
#endif /* CUKE_CUKECOMMANDS_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef CUKEBINS_CUKEENGINE_HPP_
#define CUKEBINS_CUKEENGINE_HPP_
#ifndef CUKE_CUKEENGINE_HPP_
#define CUKE_CUKEENGINE_HPP_

#include <string>
#include <vector>

#include <boost/multi_array.hpp>

namespace cukebins {
namespace cuke {
namespace internal {

class StepMatchArg {
Expand Down Expand Up @@ -101,4 +101,4 @@ class CukeEngine {
}
}

#endif /* CUKEBINS_CUKEENGINE_HPP_ */
#endif /* CUKE_CUKEENGINE_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef CUKEBINS_CUKEENGINE_IMPL_HPP_
#define CUKEBINS_CUKEENGINE_IMPL_HPP_
#ifndef CUKE_CUKEENGINE_IMPL_HPP_
#define CUKE_CUKEENGINE_IMPL_HPP_

#include "CukeEngine.hpp"
#include "CukeCommands.hpp"

namespace cukebins {
namespace cuke {
namespace internal {

/**
Expand All @@ -28,4 +28,4 @@ class CukeEngineImpl : public CukeEngine {
}
}

#endif /* CUKEBINS_CUKEENGINE_IMPL_HPP_ */
#endif /* CUKE_CUKEENGINE_IMPL_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#ifndef CUKEBINS_MACROS_HPP_
#define CUKEBINS_MACROS_HPP_
#ifndef CUKE_MACROS_HPP_
#define CUKE_MACROS_HPP_

#include "RegistrationMacros.hpp"
#include "step/StepMacros.hpp"
#include "hook/HookMacros.hpp"

#endif /* CUKEBINS_MACROS_HPP_ */
#endif /* CUKE_MACROS_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef CUKEBINS_REGISTRATIONMACROS_HPP_
#define CUKEBINS_REGISTRATIONMACROS_HPP_
#ifndef CUKE_REGISTRATIONMACROS_HPP_
#define CUKE_REGISTRATIONMACROS_HPP_

// ************************************************************************** //
// ************** OBJECT NAMING MACROS ************** //
Expand All @@ -12,7 +12,7 @@
#ifdef __COUNTER__
#define CUKE_GEN_OBJECT_NAME_ BOOST_JOIN(CUKE_OBJECT_PREFIX, __COUNTER__)
#else
// Use a counter to be incremented every time cukebins is included
// Use a counter to be incremented every time cucumber-cpp is included
// in case this does not suffice (possible with multiple files only)
#define CUKE_GEN_OBJECT_NAME_ BOOST_JOIN(CUKE_OBJECT_PREFIX, __LINE__)
#endif
Expand All @@ -32,4 +32,4 @@ const int class_name ::cukeRegId = registration_fn ; \
void class_name ::body() \
/**/

#endif /* CUKEBINS_REGISTRATIONMACROS_HPP_ */
#endif /* CUKE_REGISTRATIONMACROS_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef CUKEBINS_SCENARIO_HPP_
#define CUKEBINS_SCENARIO_HPP_
#ifndef CUKE_SCENARIO_HPP_
#define CUKE_SCENARIO_HPP_

#include "hook/Tag.hpp"

namespace cukebins {
namespace cuke {
namespace internal {

class Scenario {
Expand All @@ -18,4 +18,4 @@ class Scenario {
}
}

#endif /* CUKEBINS_SCENARIO_HPP_ */
#endif /* CUKE_SCENARIO_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#ifndef CUKEBINS_TABLE_HPP_
#define CUKEBINS_TABLE_HPP_
#ifndef CUKE_TABLE_HPP_
#define CUKE_TABLE_HPP_

#include <vector>
#include <map>
#include <string>
#include <stdexcept>

namespace cukebins {
namespace cuke {
namespace internal {

class Table {
Expand All @@ -32,4 +32,4 @@ class Table {
}
}

#endif /* CUKEBINS_TABLE_HPP_ */
#endif /* CUKE_TABLE_HPP_ */
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef CUKEBINS_PROTOCOLHANDLER_HPP_
#define CUKEBINS_PROTOCOLHANDLER_HPP_
#ifndef CUKE_PROTOCOLHANDLER_HPP_
#define CUKE_PROTOCOLHANDLER_HPP_

#include <string>

namespace cukebins {
namespace cuke {
namespace internal {

/**
Expand All @@ -18,4 +18,4 @@ class ProtocolHandler {
}
}

#endif /* CUKEBINS_PROTOCOLHANDLER_HPP_ */
#endif /* CUKE_PROTOCOLHANDLER_HPP_ */
Loading

0 comments on commit efecfd0

Please sign in to comment.