Lines Matching refs:string
28 void TestNewlineSplitter(const std::string& input, in TestNewlineSplitter()
29 const std::vector<std::string>& expected_output) { in TestNewlineSplitter()
30 std::vector<std::string> output; in TestNewlineSplitter()
35 output.push_back(std::string(msg, length)); in TestNewlineSplitter()
44 TestNewlineSplitter("", std::vector<std::string>{""}); in TEST()
48 TestNewlineSplitter("normal string", std::vector<std::string>{"normal string"}); in TEST()
52 TestNewlineSplitter("normal string\n", std::vector<std::string>{"normal string", ""}); in TEST()
57 std::vector<std::string>{"normal string", "second string", "thirdstring"}); in TEST()
63 std::vector<std::string>{"normal string", "second string", "thirdstring", ""}); in TEST()
69 std::vector<std::string>{"normal string", "", "", "second string", "", "thirdstring", ""}); in TEST()
72 void TestLogdChunkSplitter(const std::string& tag, const std::string& file, in TestLogdChunkSplitter()
73 const std::string& input, in TestLogdChunkSplitter()
74 const std::vector<std::string>& expected_output) { in TestLogdChunkSplitter()
75 std::vector<std::string> output; in TestLogdChunkSplitter()
84 std::string sizes; in TestLogdChunkSplitter()
86 for (const auto& string : expected_output) { in TestLogdChunkSplitter() local
87 sizes += " " + std::to_string(string.size()); in TestLogdChunkSplitter()
90 for (const auto& string : output) { in TestLogdChunkSplitter() local
91 sizes += " " + std::to_string(string.size()); in TestLogdChunkSplitter()
100 TestLogdChunkSplitter("tag", "", "", std::vector<std::string>{""}); in TEST()
104 TestLogdChunkSplitter("tag", "", "normal string", std::vector<std::string>{"normal string"}); in TEST()
108 TestLogdChunkSplitter("tag", "", "normal string\n", std::vector<std::string>{"normal string\n"}); in TEST()
113 std::vector<std::string>{"normal string\nsecond string\nthirdstring"}); in TEST()
118 std::vector<std::string>{"normal string\nsecond string\nthirdstring\n"}); in TEST()
124 std::vector<std::string>{"normal string\n\n\nsecond string\n\nthirdstring\n"}); in TEST()
130 auto long_string = std::string(LOGGER_ENTRY_MAX_PAYLOAD, 'x'); in TEST()
136 std::string ReduceToMaxSize(const std::string& tag, const std::string& string) { in ReduceToMaxSize() argument
137 return string.substr(0, LOGGER_ENTRY_MAX_PAYLOAD - tag.size() - 35); in ReduceToMaxSize()
141 auto long_string_x = std::string(LOGGER_ENTRY_MAX_PAYLOAD, 'x'); in TEST()
142 auto long_string_y = std::string(LOGGER_ENTRY_MAX_PAYLOAD, 'y'); in TEST()
143 auto long_string_z = std::string(LOGGER_ENTRY_MAX_PAYLOAD, 'z'); in TEST()
147 std::string tag = "tag"; in TEST()
157 std::string(2000, 'a') + '\n' + std::string(2000, 'b'), in TEST()
158 std::string(2000, 'c') + '\n' + std::string(2000, 'd'), in TEST()
159 std::string(2000, 'e') + '\n' + std::string(2000, 'f'), in TEST()
170 auto long_string_a = std::string(max_size, 'a'); in TEST()
171 auto long_string_b = std::string(max_size, 'b'); in TEST()
172 auto long_string_c = std::string(max_size, 'c'); in TEST()
181 std::string tag = "tag"; in TEST()
185 auto first_string = std::string(first_string_size, 'a'); in TEST()
187 auto second_string = std::string(second_string_size, 'b'); in TEST()
189 auto exact_string = std::string(max_size, 'c'); in TEST()
191 auto large_string = std::string(max_size + 50, 'd'); in TEST()
193 auto final_string = std::string("final string!\n\nfinal \n \n final \n"); in TEST()
206 std::string tag = "tag"; in TEST()
207 std::string file = "/path/to/myfile.cpp"; in TEST()
213 auto first_string = std::string(first_string_size, 'a'); in TEST()
215 auto second_string = std::string(second_string_size, 'b'); in TEST()
217 auto exact_string = std::string(max_size - file_header.size(), 'c'); in TEST()
219 auto large_string = std::string(max_size + 50, 'd'); in TEST()
221 auto final_string = std::string("final string!"); in TEST()
238 auto long_tag = std::string(5000, 'x'); in TEST()
246 auto long_file = std::string(5000, 'x'); in TEST()
247 std::string tag = "tag"; in TEST()
255 const std::string& expected) { in TestStderrOutputGenerator()
315 auto long_string_a = std::string(4000, 'a'); in TEST()
316 auto long_string_b = std::string(4000, 'b'); in TEST()