37TEST(ContainerTrace, ActualListTrace) {
38 std::list<cppgc::Member<Thing>> thing;
39 thing.emplace_back(
nullptr);
42 ContainerTrace(&cv, thing);
43 EXPECT_EQ(1, cv.call_count());
46TEST(ContainerTrace, ActualMapTraceFirst) {
47 std::map<cppgc::Member<Thing>,
int> thing;
51 ContainerTrace(&cv, thing);
52 EXPECT_EQ(1, cv.call_count());
55TEST(ContainerTrace, ActualMapTraceSecond) {
56 std::map<
int, cppgc::Member<Thing>> thing;
60 ContainerTrace(&cv, thing);
61 EXPECT_EQ(1, cv.call_count());
64TEST(ContainerTrace, ActualMapTraceBoth) {
65 std::map<cppgc::Member<Thing>, cppgc::Member<Thing>> thing;
66 thing[
nullptr] =
nullptr;
69 ContainerTrace(&cv, thing);
70 EXPECT_EQ(2, cv.call_count());
73TEST(ContainerTrace, ActualSetTrace) {
74 std::set<cppgc::Member<Thing>> thing;
75 thing.insert(
nullptr);
78 ContainerTrace(&cv, thing);
79 EXPECT_EQ(1, cv.call_count());
82TEST(ContainerTrace, ActualVectorTrace) {
83 std::vector<cppgc::Member<Thing>> thing;
84 thing.emplace_back(
nullptr);
87 ContainerTrace(&cv, thing);
88 EXPECT_EQ(1, cv.call_count());