From fdc366a74aa4adfe68bbed868369aab482df6e60 Mon Sep 17 00:00:00 2001 From: Andrew Reusch Date: Mon, 27 Jul 2020 18:57:56 -0700 Subject: [PATCH] git-clang-format --- src/support/hexdump.cc | 1 - tests/cpp/support_test.cc | 24 ++++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/support/hexdump.cc b/src/support/hexdump.cc index e6f7a97bdb4f..dc3d63ce6f59 100644 --- a/src/support/hexdump.cc +++ b/src/support/hexdump.cc @@ -36,7 +36,6 @@ void hexdump(const std::string& s, std::ostream& os) { addr_width++; } - for (size_t cursor = 0; cursor < s.size(); cursor += 0x10) { os << std::setw(addr_width) << cursor; size_t row_end = cursor + 0x10; diff --git a/tests/cpp/support_test.cc b/tests/cpp/support_test.cc index ddbcbb4530ba..fa0ab28a988c 100644 --- a/tests/cpp/support_test.cc +++ b/tests/cpp/support_test.cc @@ -19,28 +19,28 @@ #include #include -#include "../../src/support/hexdump.h" +#include "../../src/support/hexdump.h" namespace tvm { namespace test { -TEST(HexDumpTests, Empty) { - EXPECT_EQ("", ::tvm::support::hexdump("")); -} +TEST(HexDumpTests, Empty) { EXPECT_EQ("", ::tvm::support::hexdump("")); } TEST(HexDumpTests, Aligned) { - EXPECT_EQ("0000 01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef .#Eg.....#Eg....\n" - "0010 01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef .#Eg.....#Eg....\n", - ::tvm::support::hexdump("\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89\xab\xcd\xef" - "\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89\xab\xcd\xef")); + EXPECT_EQ( + "0000 01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef .#Eg.....#Eg....\n" + "0010 01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef .#Eg.....#Eg....\n", + ::tvm::support::hexdump("\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89\xab\xcd\xef" + "\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89\xab\xcd\xef")); } TEST(HexDumpTests, Unaligned) { - EXPECT_EQ("0000 01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef .#Eg.....#Eg....\n" - "0010 01 23 45 67 89 ab cd ef 01 .#Eg.....\n", - ::tvm::support::hexdump("\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89\xab\xcd\xef" - "\x01\x23\x45\x67\x89\xab\xcd\xef\x01")); + EXPECT_EQ( + "0000 01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef .#Eg.....#Eg....\n" + "0010 01 23 45 67 89 ab cd ef 01 .#Eg.....\n", + ::tvm::support::hexdump("\x01\x23\x45\x67\x89\xab\xcd\xef\x01\x23\x45\x67\x89\xab\xcd\xef" + "\x01\x23\x45\x67\x89\xab\xcd\xef\x01")); } } // namespace test