MCPcopy Create free account
hub / github.com/KindDragon/CPPDebuggerVisualizers / TestContainers

Function TestContainers

Tests/BoostTest/BoostTest.cpp:214–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void TestContainers()
215{
216 boost::dynamic_bitset<> x(70);
217 x[0] = 1;
218 x[1] = 1;
219 x[4] = 1;
220
221 boost::array<Data, 10> a;
222 a[0] = Data();
223
224 auto r = boost::addressof(a);
225 boost::circular_buffer<int> cb(3);
226
227 // Insert some elements into the buffer.
228 cb.push_back(1);
229 cb.push_back(2);
230 cb.push_back(3);
231 cb.push_back(4);
232
233 for(boost::circular_buffer<int>::const_iterator it = cb.begin(); it!=cb.end();it++)
234 (*it);
235
236 using namespace boost::container;
237 vector<int> v;
238 v.push_back(100);
239 for (vector<int>::const_iterator it = v.cbegin(); it != v.cend(); it++)
240 (*it);
241 stable_vector<int> sv;
242 sv.push_back(100);
243 for (stable_vector<int>::const_iterator it = sv.cbegin(); it != sv.cend(); it++)
244 (*it);
245 deque<int> d;
246 d.push_back(100);
247 for (deque<int>::const_iterator it = d.begin(); it != d.end();it++)
248 (*it);
249 flat_map<int, int> fm;
250 fm.insert(std::make_pair(100, 1000));
251 for(flat_map<int, int>::const_iterator it = fm.begin(); it!=fm.end();it++)
252 (*it);
253 flat_set<int> fs;
254 fs.insert(100);
255 for(flat_set<int>::const_iterator it = fs.begin(); it!=fs.end();it++)
256 (*it);
257 // use intrusive data
258 list<int> l;
259 l.push_back(100);
260 for (auto it = l.cbegin(); it != l.cend(); it++)
261 {
262 *it;
263 }
264 slist<int> sl;
265 sl.push_front(100);
266 for(slist<int>::const_iterator it = sl.begin(); it!=sl.end();it++)
267 (*it);
268 map<int, int> m;
269 m[100] = 1000;
270 for(map<int, int>::const_iterator it = m.begin(); it!=m.end();it++)
271 (*it);

Callers 1

mainFunction · 0.85

Calls 1

DataClass · 0.85

Tested by

no test coverage detected