MCPcopy Create free account
hub / github.com/Snapchat/Valdi / parseMetaData

Function parseMetaData

tsn/src/test262/preprocessor/main.cpp:270–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270static Valdi::Result<TestCaseData> parseMetaData(const string& content) {
271 const string metadata_start("/*---");
272 const string metadata_end("---*/");
273
274 auto metadata_start_position = content.find(metadata_start);
275 if (metadata_start_position != string::npos) {
276 auto metadata_end_position = content.find(metadata_end);
277
278 if (metadata_end_position != string::npos) {
279 auto metadata_contents =
280 content.substr(metadata_start_position + metadata_start.length(),
281 metadata_end_position - metadata_start_position - metadata_start.length());
282
283 return parseMetaDataComment(metadata_contents);
284 }
285 }
286 return {};
287}
288
289bool processTestDirectory(const fs::path& test262Directory, const fs::path& outputFile) {
290 auto testDirectory = test262Directory / "test";

Callers 1

processTestDirectoryFunction · 0.85

Calls 4

parseMetaDataCommentFunction · 0.85
substrMethod · 0.80
findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected