Commit 07ff9de8 authored by Paolo Ambrosio's avatar Paolo Ambrosio
Browse files

Merge branch 'cherry-pr72-vc2012' of https://github.com/paoloambrosio/cucumber-cpp into pr107

parents 5f54cb7b 84ab6fa4
......@@ -21,7 +21,7 @@ public:
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:
......@@ -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 {
......
......@@ -16,6 +16,7 @@ class TagExpression {
public:
typedef std::vector<std::string> tag_list;
virtual ~TagExpression() { }
virtual bool matches(const tag_list &tags) = 0;
};
......
......@@ -91,7 +91,7 @@ public:
bool isSuccess() const;
bool isPending() const;
const InvokeResultType getType() const;
InvokeResultType getType() const;
const std::string &getDescription() const;
};
......@@ -157,7 +157,7 @@ protected:
};
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);
......
......@@ -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);
......@@ -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);
}
......
#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 {
......@@ -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();
}
......@@ -68,7 +67,6 @@ InvokeResult HookRegistrar::execStepChain(Scenario *scenario, StepInfo *stepInfo
return scc.exec();
}
void HookRegistrar::addAfterStepHook(AfterStepHook *afterStepHook) {
afterStepHooks().push_front(afterStepHook);
}
......@@ -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);
}
}
......
......@@ -114,7 +114,7 @@ bool InvokeResult::isPending() const {
return (type == PENDING);
}
const InvokeResultType InvokeResult::getType() const {
InvokeResultType InvokeResult::getType() const {
return type;
}
......
......@@ -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;
};
......@@ -256,7 +257,7 @@ namespace {
return write_string(v, false);
}
void visit(const SuccessResponse *response) {
void visit(const SuccessResponse* /*response*/) {
success();
}
......
......@@ -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;
}
......
......@@ -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) {
......
......@@ -46,24 +46,24 @@ public:
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:
......
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