10#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
17class MapTest :
public CPPUNIT_NS::TestCase
26#if !defined (STLPORT) || !defined (_STLP_USE_CONTAINERS_EXTENSION)
49 typedef map<char, int, less<char> > maptype;
90 mmap::iterator
i =
m.find(
'X');
92# define _STLP_CONST const
107 size_t count =
m.erase(
'X');
114 pair_type p1(3,
'c');
115 pair_type p2(6,
'f');
116 pair_type p3(1,
'a');
117 pair_type p4(2,
'b');
118 pair_type p5(3,
'x');
119 pair_type p6(6,
'f');
123 pair_type
array [] = {
134 i =
m.lower_bound(3);
138 i =
m.upper_bound(3);
146 typedef map<int, char, less<int> > int_map;
149 int_map::iterator ite(imap.begin());
150 int_map::const_iterator cite(imap.begin());
158 typedef mmap::value_type pair_type;
160 pair_type p1(3,
'c');
161 pair_type p2(6,
'f');
162 pair_type p3(1,
'a');
163 pair_type p4(2,
'b');
164 pair_type p5(3,
'x');
165 pair_type p6(6,
'f');
167 pair_type
array [] = {
179 mmap::iterator ite(
m.begin());
180 mmap::const_iterator cite(
m.begin());
194 int_map::iterator mite(imap.begin());
195 int_map::const_iterator mcite(imap.begin());
196 mmap::iterator mmite(
m.begin());
197 mmap::const_iterator mmcite(
m.begin());
210 mmap::reverse_iterator ri =
m.rbegin();
219 mmap::const_reverse_iterator rci = cm.rbegin();
229 typedef map<char, int, less<char> > maptype;
235 ret =
m.equal_range(
'x');
245 maptype::iterator
i =
m.lower_bound(
'x' );
248 i =
m.upper_bound(
'x' );
252 ret =
m.equal_range(
'x');
260 ret =
m.equal_range(
'x');
278 MapInt mint1(intLess, stack1);
280 for (
i = 0;
i < 5; ++
i)
281 mint1.insert(MapInt::value_type(
i,
i));
282 MapInt mint1Cpy(mint1);
284 MapInt mint2(intLess, stack2);
286 mint2.insert(MapInt::value_type(
i,
i));
287 MapInt mint2Cpy(mint2);
317 {
return lhs.
m_data < rhs; }
320 {
return lhs < rhs.
m_data; }
326 {
return (*lhs).m_data < (*rhs).m_data; }
329 {
return (*lhs).m_data < rhs; }
332 {
return lhs < (*rhs).m_data; }
337#if defined (STLPORT) && defined (_STLP_USE_CONTAINERS_EXTENSION)
339 typedef map<Key, int, KeyCmp> Container;
340 typedef Container::value_type
value;
356 Container
const& ccont = cont;
364 typedef map<Key*, int, KeyCmpPtr> Container;
365 typedef Container::value_type
value;
367 Key key1(1), key2(2), key3(3), key4(4);
369 cont.insert(
value(&key2, 2));
370 cont.insert(
value(&key3, 3));
371 cont.insert(
value(&key4, 4));
381 Container
const& ccont = cont;
389 typedef Container::value_type
value;
405 Container
const& ccont = cont;
414 typedef Container::value_type
value;
416 Key key1(1), key2(2), key3(3), key4(4);
418 cont.insert(
value(&key2, 2));
419 cont.insert(
value(&key3, 3));
420 cont.insert(
value(&key4, 4));
430 Container
const& ccont = cont;
439#if !defined (STLPORT) || \
440 !defined (_STLP_USE_PTR_SPECIALIZATIONS) || defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
441# if !defined (__DMC__)
pair< _T1, _T2 > _STLP_CALL make_pair(_T1 __x, _T2 __y)
multimap< IncompleteClass, IncompleteClass > minstances
map< IncompleteClass, IncompleteClass >::iterator it
multimap< IncompleteClass, IncompleteClass >::iterator mit
map< IncompleteClass, IncompleteClass > instances
CPPUNIT_TEST(allocator_with_state)
CPPUNIT_TEST_SUITE(MapTest)
CPPUNIT_TEST(template_methods)
CPPUNIT_TEST(equal_range)
void allocator_with_state()
_Rep_type::iterator iterator
_Rep_type::iterator iterator
#define CPPUNIT_TEST_SUITE_REGISTRATION(X)
#define CPPUNIT_ASSERT(X)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLuint64EXT GLuint GLuint GLenum GLenum GLuint GLuint GLenum GLuint GLuint key1
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
bool operator()(Key const volatile *lhs, Key const volatile *rhs) const
bool operator()(Key lhs, Key rhs) const