-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
017d451
commit 773087f
Showing
47 changed files
with
1,600 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
cpp/include/messages/cucumber/messages/global_hook_finished.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#pragma once | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <optional> | ||
|
||
#include <nlohmann/json.hpp> | ||
|
||
#include <cucumber/messages/test_step_result.hpp> | ||
#include <cucumber/messages/timestamp.hpp> | ||
|
||
namespace cucumber::messages { | ||
|
||
using json = nlohmann::json; | ||
|
||
// | ||
// Represents the GlobalHookFinished message in Cucumber's message protocol | ||
// @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a> | ||
// | ||
// Generated code | ||
|
||
struct global_hook_finished | ||
{ | ||
std::string test_run_started_id; | ||
std::string hook_id; | ||
cucumber::messages::test_step_result result; | ||
cucumber::messages::timestamp timestamp; | ||
|
||
std::string to_string() const; | ||
|
||
void to_json(json& j) const; | ||
std::string to_json() const; | ||
}; | ||
|
||
std::ostream& | ||
operator<<(std::ostream& os, const global_hook_finished& msg); | ||
|
||
void to_json(json& j, const global_hook_finished& m); | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
cpp/include/messages/cucumber/messages/global_hook_started.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#pragma once | ||
|
||
#include <vector> | ||
#include <string> | ||
#include <optional> | ||
|
||
#include <nlohmann/json.hpp> | ||
|
||
#include <cucumber/messages/timestamp.hpp> | ||
|
||
namespace cucumber::messages { | ||
|
||
using json = nlohmann::json; | ||
|
||
// | ||
// Represents the GlobalHookStarted message in Cucumber's message protocol | ||
// @see <a href=https://github.com/cucumber/messages>Github - Cucumber - Messages</a> | ||
// | ||
// Generated code | ||
|
||
struct global_hook_started | ||
{ | ||
std::string test_run_started_id; | ||
std::string hook_id; | ||
cucumber::messages::timestamp timestamp; | ||
|
||
std::string to_string() const; | ||
|
||
void to_json(json& j) const; | ||
std::string to_json() const; | ||
}; | ||
|
||
std::ostream& | ||
operator<<(std::ostream& os, const global_hook_started& msg); | ||
|
||
void to_json(json& j, const global_hook_started& m); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
cpp/src/lib/messages/cucumber/messages/global_hook_finished.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include <sstream> | ||
|
||
#include <cucumber/messages/utils.hpp> | ||
#include <cucumber/messages/global_hook_finished.hpp> | ||
|
||
namespace cucumber::messages { | ||
|
||
std::string | ||
global_hook_finished::to_string() const | ||
{ | ||
std::ostringstream oss; | ||
|
||
cucumber::messages::to_string(oss, "test_run_started_id=", test_run_started_id); | ||
cucumber::messages::to_string(oss, ", hook_id=", hook_id); | ||
cucumber::messages::to_string(oss, ", result=", result); | ||
cucumber::messages::to_string(oss, ", timestamp=", timestamp); | ||
|
||
return oss.str(); | ||
} | ||
|
||
void | ||
global_hook_finished::to_json(json& j) const | ||
{ | ||
cucumber::messages::to_json(j, camelize("test_run_started_id"), test_run_started_id); | ||
cucumber::messages::to_json(j, camelize("hook_id"), hook_id); | ||
cucumber::messages::to_json(j, camelize("result"), result); | ||
cucumber::messages::to_json(j, camelize("timestamp"), timestamp); | ||
} | ||
|
||
std::string | ||
global_hook_finished::to_json() const | ||
{ | ||
std::ostringstream oss; | ||
json j; | ||
|
||
to_json(j); | ||
|
||
oss << j; | ||
|
||
return oss.str(); | ||
} | ||
|
||
std::ostream& | ||
operator<<(std::ostream& os, const global_hook_finished& msg) | ||
{ | ||
os << msg.to_string(); | ||
|
||
return os; | ||
} | ||
|
||
void to_json(json& j, const global_hook_finished& m) | ||
{ m.to_json(j); } | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
cpp/src/lib/messages/cucumber/messages/global_hook_started.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include <sstream> | ||
|
||
#include <cucumber/messages/utils.hpp> | ||
#include <cucumber/messages/global_hook_started.hpp> | ||
|
||
namespace cucumber::messages { | ||
|
||
std::string | ||
global_hook_started::to_string() const | ||
{ | ||
std::ostringstream oss; | ||
|
||
cucumber::messages::to_string(oss, "test_run_started_id=", test_run_started_id); | ||
cucumber::messages::to_string(oss, ", hook_id=", hook_id); | ||
cucumber::messages::to_string(oss, ", timestamp=", timestamp); | ||
|
||
return oss.str(); | ||
} | ||
|
||
void | ||
global_hook_started::to_json(json& j) const | ||
{ | ||
cucumber::messages::to_json(j, camelize("test_run_started_id"), test_run_started_id); | ||
cucumber::messages::to_json(j, camelize("hook_id"), hook_id); | ||
cucumber::messages::to_json(j, camelize("timestamp"), timestamp); | ||
} | ||
|
||
std::string | ||
global_hook_started::to_json() const | ||
{ | ||
std::ostringstream oss; | ||
json j; | ||
|
||
to_json(j); | ||
|
||
oss << j; | ||
|
||
return oss.str(); | ||
} | ||
|
||
std::ostream& | ||
operator<<(std::ostream& os, const global_hook_started& msg) | ||
{ | ||
os << msg.to_string(); | ||
|
||
return os; | ||
} | ||
|
||
void to_json(json& j, const global_hook_started& m) | ||
{ m.to_json(j); } | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.