1 #pragma once 2 3 #include <iostream> 4 #include <vector> 5 6 #include <gmock/gmock.h> 7 8 template <class Param> PrintTo(const std::vector<Param> & vec,std::ostream * os)9void PrintTo(const std::vector<Param>& vec, std::ostream* os) 10 { 11 *os << "[ "; 12 bool first = true; 13 for (const auto& item : vec) 14 { 15 if (!first) 16 { 17 *os << ", "; 18 } 19 PrintTo(item, os); 20 first = false; 21 } 22 *os << " ]"; 23 } 24