MCPcopy Create free account
hub / github.com/Icinga/icinga2 / ComparePackObjectResult

Function ComparePackObjectResult

test/base-object-packer.cpp:76–90  ·  view source on GitHub ↗

* Compare the expected output with the actual output */

Source from the content-addressed store, hash-verified

74 * Compare the expected output with the actual output
75 */
76static inline bool ComparePackObjectResult(const String& actualOutput, const std::initializer_list<int>& out)
77{
78 if (actualOutput.GetLength() != out.size())
79 return false;
80
81 auto actualOutputPos = actualOutput.Begin();
82 for (auto byte : out) {
83 if (*actualOutputPos != UIntToByte(byte))
84 return false;
85
86 ++actualOutputPos;
87 }
88
89 return true;
90}
91
92/**
93 * Pack the given input and compare with the expected output

Callers 1

AssertPackObjectResultFunction · 0.85

Calls 4

UIntToByteFunction · 0.70
GetLengthMethod · 0.45
sizeMethod · 0.45
BeginMethod · 0.45

Tested by

no test coverage detected