345{
346#if defined (STLPORT)
348 {
349
350 umset iumset;
352
353 size_t nbBuckets = iumset.bucket_count();
354
355 for (
size_t i = 0;
i < nbBuckets; ++
i) {
357 iumset.insert(
i + nbBuckets);
358 iumset.insert(
i + 2 * nbBuckets);
359 iumset.insert(
i + 3 * nbBuckets);
360 iumset.insert(
i + 4 * nbBuckets);
361 }
362
365
368
369 size_t nbElems = iumset.size();
371 for (umset::iterator
j =
p.first;
j !=
p.second;) {
373 }
374
376
377 p = iumset.equal_range(2);
380 iumset.erase(
p.first,
p.second);
382 }
383
384 {
385
386 umset iumset;
387
389
390
391 iumset.rehash(193);
392
393 size_t nbBuckets = iumset.bucket_count();
394 const size_t targetedBucket = nbBuckets / 2;
395
396
397 for (
i = 0;
i < 10; ++
i) {
398 iumset.insert(targetedBucket + (
i * nbBuckets));
399 }
400
401
402 for (
i = 9;
i <= 10; --
i) {
403 iumset.insert(targetedBucket + (
i * nbBuckets));
404 }
405
406
408 while (iumset.bucket_count() == nbBuckets) {
410 }
411
412
413
417
418
419 nbBuckets = iumset.bucket_count();
420 while (iumset.bucket_count() == nbBuckets &&
421 !iumset.empty()) {
422 iumset.erase(iumset.begin());
423 }
424 CPPUNIT_ASSERT( iumset.load_factor() <= iumset.max_load_factor() );
425
426
427 nbBuckets = iumset.bucket_count();
428 iumset.insert(0);
430 }
431
432 {
434 for (int runs = 0; runs < 2; ++runs) {
435 size_t magic =
rand();
436 umset hum;
438 for (
int i = 0;
i < 10000; ++
i) {
439 if ((
rand() % 500) == 0) {
440 hum.insert(magic);
442 }
443 else {
445 while ((
r =
rand()) == magic)
446 ;
448 }
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469 }
471 }
472 }
473#endif
474}
float max_load_factor() const
_ACRTIMP int __cdecl rand(void)
_ACRTIMP void __cdecl srand(unsigned int)
GLdouble GLdouble GLdouble r
GLsizei GLsizei GLfloat distance
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 GLint GLint j