Lines Matching refs:std
26 using namespace std::chrono_literals;
33 std::string captureDumpOutput(const DnsQueryLog& queryLog) { in captureDumpOutput()
41 void verifyDumpOutput(const std::string& dumpLog, const std::vector<int>& expectedNetIds) { in verifyDumpOutput()
43 static const std::regex pattern( in verifyDumpOutput()
46 std::string str(dumpLog); in verifyDumpOutput()
47 std::smatch sm; in verifyDumpOutput()
50 EXPECT_TRUE(std::regex_search(str, sm, pattern)); in verifyDumpOutput()
51 EXPECT_EQ(sm[1], std::to_string(netId)); in verifyDumpOutput()
56 EXPECT_FALSE(std::regex_search(str, sm, pattern)); in verifyDumpOutput()
63 const std::vector<std::string> serversV4 = {"127.0.0.1", "1.2.3.4"};
64 const std::vector<std::string> serversV4V6 = {"127.0.0.1", "1.2.3.4", "2001:db8::1",
69 std::vector<DnsQueryLog::Record> records = { in TEST_F()
77 queryLog.push(std::move(r)); in TEST_F()
80 std::string output = captureDumpOutput(queryLog); in TEST_F()
89 std::vector<std::thread> threads(threadNum); in TEST_F()
93 thread = std::thread([&]() { in TEST_F()
96 queryLog.push(std::move(record)); in TEST_F()
105 std::string output = captureDumpOutput(queryLog); in TEST_F()
106 verifyDumpOutput(output, std::vector(size, 30)); in TEST_F()
116 queryLog.push(std::move(r1)); in TEST_F()
117 queryLog.push(std::move(r2)); in TEST_F()
118 queryLog.push(std::move(r3)); in TEST_F()
120 std::string output = captureDumpOutput(queryLog); in TEST_F()
130 const std::vector<int> expectedNetIds = {31, 32, 33}; in TEST_F()
133 queryLog.push(std::move(r1)); in TEST_F()
134 queryLog.push(std::move(r2)); in TEST_F()
135 queryLog.push(std::move(r3)); in TEST_F()
136 queryLog.push(std::move(r4)); in TEST_F()
138 std::string output = captureDumpOutput(queryLog); in TEST_F()
145 queryLog.push(std::move(r1)); in TEST_F()
148 std::string output = captureDumpOutput(queryLog); in TEST_F()
151 std::this_thread::sleep_for(150ms); in TEST_F()
159 queryLog.push(std::move(r2)); in TEST_F()