MCPcopy Create free account
hub / github.com/Kitware/CMake / compare

Function compare

Tests/CMakeLib/testGccDepfileReader.cxx:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50bool compare(std::vector<std::string> const& actual,
51 std::vector<std::string> const& expected, char const* msg)
52{
53 if (actual.size() != expected.size()) {
54 std::cerr << msg << "expected " << expected.size() << " entries."
55 << std::endl
56 << "Actual number of entries: " << actual.size() << std::endl;
57 return false;
58 }
59 for (std::size_t i = 0; i < actual.size(); ++i) {
60 if (actual[i] != expected[i]) {
61 std::cerr << msg << std::endl
62 << "expected: " << expected[i] << std::endl
63 << "actual: " << actual[i] << std::endl;
64 return false;
65 }
66 }
67 return true;
68}
69
70bool compare(cmGccDepfileContent const& actual,
71 cmGccDepfileContent const& expected)

Callers 5

testGccDepfileReaderFunction · 0.70
ftp_pl_insert_finfoFunction · 0.50
compareMethod · 0.50
findMethod · 0.50
rfindMethod · 0.50

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…