MCPcopy Create free account
hub / github.com/apache/brpc / vec2string

Function vec2string

test/bvar_variable_unittest.cpp:42–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40// overloading for operator<< does not work for gflags>=2.1
41template <typename T>
42std::string vec2string(const std::vector<T>& vec) {
43 std::ostringstream os;
44 os << '[';
45 if (!vec.empty()) {
46 os << vec[0];
47 for (size_t i = 1; i < vec.size(); ++i) {
48 os << ',' << vec[i];
49 }
50 }
51 os << ']';
52 return os.str();
53}
54
55class VariableTest : public testing::Test {
56protected:

Callers 1

TEST_FFunction · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected