| 40 | // overloading for operator<< does not work for gflags>=2.1 |
| 41 | template <typename T> |
| 42 | std::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 | |
| 55 | class VariableTest : public testing::Test { |
| 56 | protected: |