Skip to content

Upgrade Guide 0.3

Paolo Ambrosio edited this page Dec 30, 2013 · 1 revision

This section highlights the changes in the development branch.

Backwards-incompatible changes

Project Rename

The project has been renamed to Cucumber-Cpp. The library to be linked is now ‘cucumber-cpp’ and the include for each step definition file is

#include <cucumber-cpp/defs.hpp>

instead of

#include <cukebins/wireserver.hpp>

Deprecated USING_CONTEXT

The macro USING_CONTEXT has been superseded by the template class ScenarioScope. There are two ways to migrate the following code:

#include <cucumber-cpp/defs.hpp>

WHEN("...") {
    USING_CONTEXT(MyClass, myName);
    ...
}

The best one is to use the new ScenarioScope template class:

#include <cucumber-cpp/defs.hpp>

using cucumber::ScenarioScope;

WHEN("...") {
    ScenarioScope<MyClass> myName;
    ...
}

The easier (but discouraged) one is to include the deprecated definitions:

#include <cucumber-cpp/defs.hpp>
#include <cucumber-cpp/deprecated-defs.hpp>

WHEN("...") {
    USING_CONTEXT(MyClass, myName);
    ...
}
Clone this wiki locally