MCPcopy Create free account
hub / github.com/cucumber/cucumber-cpp / toSourceString

Function toSourceString

include/cucumber-cpp/internal/step/StepManager.hpp:178–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176};
177
178static inline std::string toSourceString(const char* filePath, const int line) {
179 using namespace std;
180 stringstream s;
181 string file(filePath);
182 string::size_type pos = file.find_last_of("/\\");
183 if (pos == string::npos) {
184 s << file;
185 } else {
186 s << file.substr(++pos);
187 }
188 s << ":" << line;
189 return s.str();
190}
191
192template<class T>
193static int registerStep(const std::string& stepMatcher, const char* file, const int line) {

Callers 1

registerStepFunction · 0.85

Calls 1

strMethod · 0.80

Tested by

no test coverage detected