| 285 | }; |
| 286 | |
| 287 | static void* string_appender(void* arg) { |
| 288 | bvar::Adder<std::string>* cater = (bvar::Adder<std::string>*)arg; |
| 289 | int count = 0; |
| 290 | std::string id = butil::string_printf("%lld", (long long)pthread_self()); |
| 291 | std::string tmp = "a"; |
| 292 | for (count = 0; !count || !g_stop; ++count) { |
| 293 | *cater << id << ":"; |
| 294 | for (char c = 'a'; c <= 'z'; ++c) { |
| 295 | tmp[0] = c; |
| 296 | *cater << tmp; |
| 297 | } |
| 298 | *cater << "."; |
| 299 | } |
| 300 | StringAppenderResult* res = new StringAppenderResult; |
| 301 | res->count = count; |
| 302 | LOG(INFO) << "Appended " << count; |
| 303 | return res; |
| 304 | } |
| 305 | |
| 306 | TEST_F(ReducerTest, non_primitive_mt) { |
| 307 | bvar::Adder<std::string> cater; |
nothing calls this directly
no test coverage detected