Skip to content

Commit

Permalink
Merge branch 'cherry-pr72-vc2012' of https://github.com/paoloambrosio…
Browse files Browse the repository at this point in the history
…/cucumber-cpp into pr107
  • Loading branch information
paoloambrosio committed Mar 27, 2016
2 parents 5f54cb7 + 84ab6fa commit 07ff9de
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions include/cucumber-cpp/internal/hook/HookRegistrar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class CallableStep {
class Hook {
public:
void setTags(const std::string &csvTagNotation);
virtual void invokeHook(Scenario *scenario);
virtual void invokeHook(Scenario *scenario, CallableStep *step);
virtual void skipHook();
virtual void body() = 0;
protected:
Expand Down Expand Up @@ -49,7 +49,7 @@ class AfterHook : public Hook {

class UnconditionalHook : public Hook {
public:
virtual void invokeHook(Scenario *);
virtual void invokeHook(Scenario *scenario, CallableStep *step);
};

class BeforeAllHook : public UnconditionalHook {
Expand Down
1 change: 1 addition & 0 deletions include/cucumber-cpp/internal/hook/Tag.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TagExpression {
public:
typedef std::vector<std::string> tag_list;

virtual ~TagExpression() { }
virtual bool matches(const tag_list &tags) = 0;
};

Expand Down
4 changes: 2 additions & 2 deletions include/cucumber-cpp/internal/step/StepManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class InvokeResult {

bool isSuccess() const;
bool isPending() const;
const InvokeResultType getType() const;
InvokeResultType getType() const;
const std::string &getDescription() const;
};

Expand Down Expand Up @@ -157,7 +157,7 @@ class StepManager {
};


static std::string toSourceString(const char *filePath, const int line) {
static inline std::string toSourceString(const char *filePath, const int line) {
using namespace std;
stringstream s;
string file(filePath);
Expand Down
10 changes: 5 additions & 5 deletions src/CukeEngineImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ void CukeEngineImpl::invokeStep(const std::string & id, const invoke_args_type &

if (tableArg.shape()[0] > 1 && tableArg.shape()[1] > 0) {
Table & commandTableArg = commandArgs.getVariableTableArg();
for (table_index j = 0; j < tableArg.shape()[1]; ++j) {
for (table_index j = 0; j < table_index(tableArg.shape()[1]); ++j) {
commandTableArg.addColumn(tableArg[0][j]);
}

for (table_index i = 1; i < tableArg.shape()[0]; ++i) {
for (table_index i = 1; i < table_index(tableArg.shape()[0]); ++i) {
Table::row_type row;
for (table_index j = 0; j < tableArg.shape()[1]; ++j) {
for (table_index j = 0; j < table_index(tableArg.shape()[1]); ++j) {
row.push_back(tableArg[i][j]);
}
commandTableArg.addRow(row);
Expand All @@ -87,11 +87,11 @@ void CukeEngineImpl::invokeStep(const std::string & id, const invoke_args_type &
}
}

void CukeEngineImpl::endScenario(const tags_type & tags) {
void CukeEngineImpl::endScenario(const tags_type & /*tags*/) {
cukeCommands.endScenario();
}

std::string CukeEngineImpl::snippetText(const std::string & keyword, const std::string & name, const std::string & multilineArgClass) const {
std::string CukeEngineImpl::snippetText(const std::string & keyword, const std::string & name, const std::string & /*multilineArgClass*/) const {
return cukeCommands.snippetText(keyword, name);
}

Expand Down
10 changes: 4 additions & 6 deletions src/HookRegistrar.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#include <cucumber-cpp/internal/hook/HookRegistrar.hpp>

#include <cucumber-cpp/internal/CukeCommands.hpp>

namespace cucumber {
namespace internal {

void Hook::invokeHook(Scenario *scenario) {
void Hook::invokeHook(Scenario *scenario, CallableStep *) {
if (tagsMatch(scenario)) {
body();
} else {
Expand All @@ -26,14 +25,14 @@ bool Hook::tagsMatch(Scenario *scenario) {

void AroundStepHook::invokeHook(Scenario *scenario, CallableStep *step) {
this->step = step;
Hook::invokeHook(scenario);
Hook::invokeHook(scenario, NULL);
}

void AroundStepHook::skipHook() {
step->call();
}

void UnconditionalHook::invokeHook(Scenario*) {
void UnconditionalHook::invokeHook(Scenario*, CallableStep *) {
body();
}

Expand Down Expand Up @@ -68,7 +67,6 @@ InvokeResult HookRegistrar::execStepChain(Scenario *scenario, StepInfo *stepInfo
return scc.exec();
}


void HookRegistrar::addAfterStepHook(AfterStepHook *afterStepHook) {
afterStepHooks().push_front(afterStepHook);
}
Expand Down Expand Up @@ -99,7 +97,7 @@ void HookRegistrar::execAfterHooks(Scenario *scenario) {

void HookRegistrar::execHooks(HookRegistrar::hook_list_type &hookList, Scenario *scenario) {
for (HookRegistrar::hook_list_type::iterator hook = hookList.begin(); hook != hookList.end(); ++hook) {
(*hook)->invokeHook(scenario);
(*hook)->invokeHook(scenario, NULL);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/StepManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bool InvokeResult::isPending() const {
return (type == PENDING);
}

const InvokeResultType InvokeResult::getType() const {
InvokeResultType InvokeResult::getType() const {
return type;
}

Expand Down
5 changes: 3 additions & 2 deletions src/connectors/wire/WireProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ void SnippetTextResponse::accept(WireResponseVisitor *visitor) const {

class CommandDecoder {
public:
virtual WireCommand *decode(const mValue & jsonArgs) const = 0;
virtual ~CommandDecoder() { }
virtual WireCommand *decode(const mValue & jsonArgs) const = 0;
};


Expand Down Expand Up @@ -256,7 +257,7 @@ namespace {
return write_string(v, false);
}

void visit(const SuccessResponse *response) {
void visit(const SuccessResponse* /*response*/) {
success();
}

Expand Down
2 changes: 1 addition & 1 deletion src/connectors/wire/WireProtocolCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ WireResponse *SnippetTextCommand::run(CukeEngine *engine) const {
}


WireResponse *FailingCommand::run(CukeEngine *engine) const {
WireResponse *FailingCommand::run(CukeEngine* /*engine*/) const {
return new FailureResponse;
}

Expand Down
4 changes: 2 additions & 2 deletions src/connectors/wire/WireServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ namespace cucumber {
namespace internal {

SocketServer::SocketServer(const ProtocolHandler *protocolHandler) :
protocolHandler(protocolHandler),
ios(),
acceptor(ios),
protocolHandler(protocolHandler) {
acceptor(ios) {
}

void SocketServer::listen(const port_type port) {
Expand Down
18 changes: 9 additions & 9 deletions src/drivers/BoostDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@ class CukeBoostLogInterceptor : public ::boost::unit_test::unit_test_log_formatt
void reset();

// Formatter
void log_start( std::ostream&, counter_t test_cases_amount) {};
void log_start( std::ostream&, counter_t /*test_cases_amount*/) {};
void log_finish( std::ostream&) {};
void log_build_info( std::ostream&) {};

void test_unit_start( std::ostream&, test_unit const& tu) {};
void test_unit_finish( std::ostream&, test_unit const& tu, unsigned long elapsed) {};
void test_unit_skipped( std::ostream&, test_unit const& tu) {};
void test_unit_start( std::ostream&, test_unit const& /*tu*/) {};
void test_unit_finish( std::ostream&, test_unit const& /*tu*/, unsigned long /*elapsed*/) {};
void test_unit_skipped( std::ostream&, test_unit const& /*tu*/) {};

void log_exception_start( std::ostream&, log_checkpoint_data const&, execution_exception const&) {};
void log_exception_finish( std::ostream& ) {};

void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types let) {};
void log_entry_value( std::ostream&, const_string value);
void log_entry_value( std::ostream&, lazy_ostream const& value) {};
void log_entry_start( std::ostream&, log_entry_data const&, log_entry_types /*let*/) {};
void log_entry_value( std::ostream&, const_string /*value*/);
void log_entry_value( std::ostream&, lazy_ostream const& /*value*/) {};
void log_entry_finish( std::ostream&) {};

void entry_context_start( std::ostream&, log_level l ) {}
void log_entry_context( std::ostream&, const_string value ) {}
void entry_context_start( std::ostream&, log_level /*l*/) {}
void log_entry_context( std::ostream&, const_string /*value*/) {}
void entry_context_finish( std::ostream& ) {}

private:
Expand Down

0 comments on commit 07ff9de

Please sign in to comment.