Lines Matching refs:reg

23     StalePtrRegistry<void> reg;  in TEST()  local
27 StalePtrRegistry<void> reg; in TEST() local
28 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
29 reg.addPtr(nullptr); in TEST()
30 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
34 StalePtrRegistry<void> reg; in TEST() local
35 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
36 reg.addPtr(nullptr); in TEST()
37 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
38 reg.removePtr(nullptr); in TEST()
39 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
43 StalePtrRegistry<void> reg; in TEST() local
44 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
45 reg.addPtr(nullptr); in TEST()
46 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
47 EXPECT_EQ(reg.numStaleEntries(), 0); in TEST()
48 reg.makeCurrentPtrsStale(); in TEST()
49 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
50 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
54 StalePtrRegistry<void> reg; in TEST() local
55 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
56 reg.addPtr(nullptr); in TEST()
57 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
58 EXPECT_EQ(reg.getPtr(0), nullptr); in TEST()
62 StalePtrRegistry<void> reg; in TEST() local
63 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
64 EXPECT_EQ(reg.getPtr(0), nullptr); in TEST()
65 EXPECT_EQ(reg.getPtr(0, (void*)0x1), (void*)0x1); in TEST()
69 StalePtrRegistry<void> reg; in TEST() local
70 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
71 EXPECT_EQ(reg.getPtr(0), nullptr); in TEST()
72 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
76 StalePtrRegistry<void> reg; in TEST() local
80 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
82 reg.addPtr(ptr); in TEST()
84 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
85 EXPECT_EQ(reg.numStaleEntries(), 0); in TEST()
87 reg.makeCurrentPtrsStale(); in TEST()
89 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
90 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
92 EXPECT_EQ(reg.getPtr(handle), ptr); in TEST()
96 StalePtrRegistry<void> reg; in TEST() local
100 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
102 reg.addPtr(ptr); in TEST()
104 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
105 EXPECT_EQ(reg.numStaleEntries(), 0); in TEST()
107 reg.makeCurrentPtrsStale(); in TEST()
109 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
110 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
112 EXPECT_EQ(reg.getPtr(handle, nullptr, true), ptr); in TEST()
113 EXPECT_EQ(reg.getPtr(handle, nullptr, true), nullptr); in TEST()
117 StalePtrRegistry<void> reg; in TEST() local
122 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
124 reg.addPtr(ptr); in TEST()
126 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
127 EXPECT_EQ(reg.numStaleEntries(), 0); in TEST()
129 reg.makeCurrentPtrsStale(); in TEST()
131 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
132 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
134 reg.remapStalePtr(handle, remapped); in TEST()
136 EXPECT_EQ(reg.getPtr(handle), remapped); in TEST()
140 StalePtrRegistry<void> reg; in TEST() local
145 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
147 reg.addPtr(ptr); in TEST()
149 EXPECT_EQ(reg.numCurrEntries(), 1); in TEST()
150 EXPECT_EQ(reg.numStaleEntries(), 0); in TEST()
152 reg.makeCurrentPtrsStale(); in TEST()
154 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
155 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
157 reg.remapStalePtr(handle, remapped); in TEST()
159 EXPECT_EQ(reg.getPtr(handle), remapped); in TEST()
161 reg.addPtr(ptr); in TEST()
163 EXPECT_EQ(reg.getPtr(handle), ptr); in TEST()
167 StalePtrRegistry<void> reg; in TEST() local
173 reg.addPtr(ptr1); in TEST()
174 reg.makeCurrentPtrsStale(); in TEST()
175 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
176 reg.addPtr(ptr2); in TEST()
177 reg.makeCurrentPtrsStale(); in TEST()
179 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
180 EXPECT_EQ(reg.numStaleEntries(), 2); in TEST()
182 EXPECT_EQ(reg.getPtr(handle1), ptr1); in TEST()
183 EXPECT_EQ(reg.getPtr(handle2), ptr2); in TEST()
187 StalePtrRegistry<void> reg; in TEST() local
193 reg.addPtr(ptr1); in TEST()
194 reg.makeCurrentPtrsStale(); in TEST()
195 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
196 reg.addPtr(ptr2); in TEST()
197 reg.makeCurrentPtrsStale(); in TEST()
199 EXPECT_EQ(reg.numCurrEntries(), 0); in TEST()
200 EXPECT_EQ(reg.numStaleEntries(), 1); in TEST()
202 EXPECT_EQ(reg.getPtr(handle1), ptr1); in TEST()
203 EXPECT_EQ(reg.getPtr(handle2), ptr2); in TEST()