probe.cpp 591 B

12345678910111213
  1. #include "probe.h"
  2. #include <ostream>
  3. namespace testing {
  4. void PrintTo(const TProbeState& state, ::std::ostream* os) {
  5. int copies = state.CopyConstructors + state.CopyAssignments;
  6. int moves = state.MoveConstructors + state.MoveAssignments;
  7. *os << state.Constructors << " ctors, " << state.Destructors << " dtors; "
  8. << "copies: " << copies << " = " << state.CopyConstructors << " + " << state.CopyAssignments << "; "
  9. << "moves: " << moves << " = " << state.MoveConstructors << " + " << state.MoveAssignments;
  10. }
  11. } // namespace testing