DGtal  1.5.beta
testContainerTraits.cpp
Go to the documentation of this file.
1 
32 #include <vector>
33 #include <list>
34 #include <deque>
35 #include <set>
36 #include <map>
37 #include <boost/unordered_set.hpp>
38 #include <boost/unordered_map.hpp>
39 #include <forward_list>
40 #include <array>
41 #include <unordered_set>
42 #include <unordered_map>
43 
44 #include "DGtal/base/Common.h"
45 #include "DGtal/base/ContainerTraits.h"
46 
47 #include "DGtalCatch.h"
48 
49 using namespace DGtal;
50 using namespace std;
51 
52 
53 TEST_CASE( "int container traits", "[int][traits]" )
54 {
55  typedef int Container;
56  SECTION( "Checking container traits" )
57  {
67  }
68 }
69 
70 TEST_CASE( "std::vector<> container traits", "[vector][traits]" )
71 {
72  typedef std::vector<int> Container;
73  SECTION( "Checking container traits" )
74  {
84  }
85 }
86 
87 TEST_CASE( "std::list<> container traits", "[list][traits]" )
88 {
89  typedef std::list<int> Container;
90  SECTION( "Checking container traits" )
91  {
101  }
102 }
103 
104 TEST_CASE( "std::deque<> container traits", "[deque][traits]" )
105 {
106  typedef std::deque<int> Container;
107  SECTION( "Checking container traits" )
108  {
118  }
119 }
120 
121 TEST_CASE( "std::forward_list<> container traits", "[forward_list][traits]" )
122 {
123  typedef std::forward_list<int> Container;
124  SECTION( "Checking container traits" )
125  {
135  }
136 }
137 
138 TEST_CASE( "std::array<> container traits", "[array][traits]" )
139 {
140  typedef std::array<int, 10> Container;
141  SECTION( "Checking container traits" )
142  {
152  }
153 }
154 
155 TEST_CASE( "std::set<> container traits", "[set][traits]" )
156 {
157  typedef std::set<int> Container;
158  SECTION( "Checking container traits" )
159  {
169  }
170 }
171 
172 TEST_CASE( "std::multiset<> container traits", "[multiset][traits]" )
173 {
174  typedef std::multiset<int> Container;
175  SECTION( "Checking container traits" )
176  {
186  }
187 }
188 
189 TEST_CASE( "std::map<> container traits", "[map][traits]" )
190 {
191  typedef std::map<int,int> Container;
192  SECTION( "Checking container traits" )
193  {
203  }
204 }
205 
206 TEST_CASE( "std::multimap<> container traits", "[multimap][traits]" )
207 {
208  typedef std::multimap<int,int> Container;
209  SECTION( "Checking container traits" )
210  {
220  }
221 }
222 
223 TEST_CASE( "boost::unordered_set<> container traits", "[unordered_set][traits]" )
224 {
225  typedef boost::unordered_set<int> Container;
226  SECTION( "Checking container traits" )
227  {
237  }
238 }
239 
240 TEST_CASE( "boost::unordered_map<> container traits", "[unordered_map][traits]" )
241 {
242  typedef boost::unordered_map<int,int> Container;
243  SECTION( "Checking container traits" )
244  {
254  }
255 }
256 
257 TEST_CASE( "boost::unordered_multiset<> container traits", "[unordered_multiset][traits]" )
258 {
259  typedef boost::unordered_multiset<int> Container;
260  SECTION( "Checking container traits" )
261  {
271  }
272 }
273 
274 TEST_CASE( "boost::unordered_multimap<> container traits", "[unordered_multimap][traits]" )
275 {
276  typedef boost::unordered_multimap<int,int> Container;
277  SECTION( "Checking container traits" )
278  {
288  }
289 }
290 
291 TEST_CASE( "std::unordered_set<> container traits", "[unordered_set][traits]" )
292 {
293  typedef std::unordered_set<int> Container;
294  SECTION( "Checking container traits" )
295  {
305  }
306 }
307 TEST_CASE( "std::unordered_multiset<> container traits", "[unordered_multiset][traits]" )
308 {
309  typedef std::unordered_multiset<int> Container;
310  SECTION( "Checking container traits" )
311  {
321  }
322 }
323 
324 TEST_CASE( "std::unordered_map<> container traits", "[unordered_map][traits]" )
325 {
326  typedef std::unordered_map<int,int> Container;
327  SECTION( "Checking container traits" )
328  {
338  }
339 }
340 
341 TEST_CASE( "std::unordered_multimap<> container traits", "[unordered_multimap][traits]" )
342 {
343  typedef std::unordered_multimap<int,int> Container;
344  SECTION( "Checking container traits" )
345  {
355  }
356 }
357 
DGtal is the top-level namespace which contains all DGtal functions and types.
TEST_CASE("int container traits", "[int][traits]")
SECTION("Testing constant forward iterators")
REQUIRE(domain.isInside(aPoint))