• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/xnu-2422.115.4/iokit/Tests/

Lines Matching refs:set1

282     OSSet *set1, *set2;
286 set1 = OSSet::withCapacity(1);
287 TEST_ASSERT('S', "0a", set1);
288 if (set1)
289 set1->release();
299 set1 = OSSet::withCapacity(1);
300 TEST_ASSERT('S', "1a", set1);
301 if (set1) {
302 TEST_ASSERT('S', "1b", !set1->getCount());
303 TEST_ASSERT('S', "1c", 1 == set1->getCapacity());
304 TEST_ASSERT('S', "1d", 1 == set1->getCapacityIncrement());
305 TEST_ASSERT('S', "1e", 4 == set1->setCapacityIncrement(4));
306 TEST_ASSERT('S', "1f", 4 == set1->getCapacityIncrement());
307 TEST_ASSERT('S', "1g", 8 == set1->ensureCapacity(5));
313 TEST_ASSERT('S', "1h", set1->setObject(cache[0]));
314 TEST_ASSERT('S', "1i", set1->containsObject(cache[0]));
315 TEST_ASSERT('S', "1j", cache[0] == set1->getAnyObject());
319 TEST_ASSERT('S', "1l", 1 == set1->getCount());
320 set1->flushCollection();
321 TEST_ASSERT('S', "1m", !set1->getCount());
324 set1->release();
333 set1 = OSSet::withObjects(cache, numStrCache, numStrCache);
334 TEST_ASSERT('S', "2a", set1);
337 if (set1) {
338 TEST_ASSERT('S', "2b", numStrCache == (int) set1->getCount());
339 TEST_ASSERT('S', "2c", numStrCache == (int) set1->getCapacity());
341 numStrCache == (int) set1->getCapacityIncrement());
344 for (i = set1->getCount(); --i >= 0; )
345 count += set1->member(cache[i]);
348 set1->release();
358 set1 = OSSet::withObjects(cache, numStrCache, numStrCache);
359 TEST_ASSERT('S', "3a", set1);
363 if (set1) {
364 set2 = OSSet::withCapacity(set1->getCount());
367 TEST_ASSERT('S', "3d", set2->setObject(set1));
368 TEST_ASSERT('S', "3e", set1->getCount() == set2->getCount());
375 count2 += set1->member(str);
389 if (set1) {
390 set2 = OSSet::withSet(set1, numStrCache - 1);
392 set2 = OSSet::withSet(set1, set1->getCount());
394 set1->release();
416 set1 = OSSet::withCapacity(numStrCache);
417 TEST_ASSERT('S', "4a", set1);
418 if (set1) {
422 count += set1->setObject(sym);
425 TEST_ASSERT('S', "4b", numStrCache != (int) set1->getCount());
426 TEST_ASSERT('S', "4c", count == (int) set1->getCount());
431 count += set1->member(sym);
438 set2 = OSSet::withSet(set1, 2 * set1->getCount());
442 set2->setObject(set1);
443 TEST_ASSERT('S', "4g", set1->getCount() == set2->getCount());
444 set1->release();
457 set1 = OSSet::withArray(array, numStrCache);
458 TEST_ASSERT('S', "5a", set1);
459 if (set1) {
460 TEST_ASSERT('S', "5b", array->getCount() != set1->getCount());
463 count = count2 = set1->getCount();
464 while ( (sym = set1->getAnyObject()) ) {
465 count -= set1->__takeObject(sym);
471 set1->release();