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