MCPcopy Create free account
hub / github.com/apache/impala / RunIntToByteArrayTest

Function RunIntToByteArrayTest

be/src/util/bit-util-test.cc:380–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378
379template<typename T>
380void RunIntToByteArrayTest(const T& input, const std::vector<char>& expected) {
381 std::string result = BitUtil::IntToByteBuffer(input);
382 EXPECT_EQ(expected.size(), result.size()) << input;
383 for (int i = 0; i < std::min(expected.size(), result.size()); ++i) {
384 EXPECT_EQ(expected[i], result[i]) << input;
385 }
386}
387
388// __int128_t has no support for << operator. This is a specialized function for this
389// type where in case of an EXPECT check failing we don't print the original input.

Callers 1

TESTFunction · 0.85

Calls 2

minFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected