MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / assertStringIsMapxFile

Function assertStringIsMapxFile

test/algorithm/XmlUtils.h:17–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{
16
17inline void assertStringIsMapxFile(const std::string& content)
18{
19 const auto tagContents = string::splitToVec(content, "<>");
20 ASSERT_GE(tagContents.size(), 1);
21 ASSERT_EQ(tagContents[0], "?xml version=\"1.0\" encoding=\"utf-8\"?");
22
23 ASSERT_TRUE(content.find("<map") != std::string::npos);
24}
25
26// Very rough check to see if path points to a file that looks like an XML document
27inline void assertFileIsMapxFile(const std::string& path)

Callers 3

TEST_FFunction · 0.85
TEST_FFunction · 0.85
assertFileIsMapxFileFunction · 0.85

Calls 3

splitToVecFunction · 0.85
sizeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected