aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/gtest_extensions/probe.cpp
blob: c3a49b9323819b7db5b4fe6d91ca2d0e8363bdca (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