23 using namespace folly;
25 #define CHECK_MSG(expected, value, hasNewlines) \ 28 "input string: \"" + folly::backslashify<std::string>(value) + "\""); \ 29 LogMessage checkMsg{category, \ 34 std::string{value}}; \ 35 EXPECT_EQ(expected, checkMsg.getMessage()); \ 36 EXPECT_EQ(static_cast<int>(hasNewlines), checkMsg.containsNewlines()); \ 37 EXPECT_EQ(__FILE__, checkMsg.getFileName()); \ 38 EXPECT_EQ(__LINE__, checkMsg.getLineNumber()); \ 43 Logger logger{&db,
"test"};
47 CHECK_MSG(
"foo\\\\bar",
"foo\\bar",
false);
48 CHECK_MSG(
"foo\\x01test",
"foo\01test",
false);
49 CHECK_MSG(
"test 1234 ",
"test 1234 ",
false);
59 (
"\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08" 60 "\t\n\\x0b\\x0c\\x0d\\x0e\\x0f" 61 "\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17" 62 "\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f" 63 " !\"#$%&'()*+,-./0123456789:;<=>?" 64 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_" 65 "`abcdefghijklmnopqrstuvwxyz{|}~\\x7f"),
66 (
"\001\002\003\004\005\006\007" 67 "\010\011\012\013\014\015\016\017" 68 "\020\021\022\023\024\025\026\027" 69 "\030\031\032\033\034\035\036\037" 70 " !\"#$%&'()*+,-./0123456789:;<=>?" 71 "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_" 72 "`abcdefghijklmnopqrstuvwxyz{|}~\177"),
77 CHECK_MSG(
"\x82\n\x83\n",
"\x82\n\x83\n",
true);
78 CHECK_MSG(
"\x82\n\\x0c\x83\n",
"\x82\n\f\x83\n",
true);
—— Concurrent Priority Queue Implementation ——
#define CHECK_MSG(expected, value, hasNewlines)
LogCategory * getCategory() const
TEST(SequencedExecutor, CPUThreadPoolExecutor)