MCPcopy Create free account
hub / github.com/catboost/catboost / capacity

Method capacity

util/generic/string_ut.cpp:458–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456 }
457
458 void capacity() {
459 TStringType s;
460
461 UNIT_ASSERT(s.capacity() < s.max_size());
462 UNIT_ASSERT(s.capacity() >= s.size());
463
464 for (int i = 0; i < 18; ++i) {
465 s += ' ';
466
467 UNIT_ASSERT(s.capacity() > 0);
468 UNIT_ASSERT(s.capacity() < s.max_size());
469 UNIT_ASSERT(s.capacity() >= s.size());
470 }
471 }
472
473 void assign() {
474 TStringType s;

Callers 10

Test1Method · 0.45
Test7Method · 0.45
TestCapacityMethod · 0.45
TestShrinkMethod · 0.45
TestEboMethod · 0.45
TestConstructorsMethod · 0.45
capacityFunction · 0.45
reserveMethod · 0.45
DoNextMethod · 0.45
DoNextMethod · 0.45

Calls 2

max_sizeMethod · 0.45
sizeMethod · 0.45

Tested by 6

Test1Method · 0.36
Test7Method · 0.36
TestCapacityMethod · 0.36
TestShrinkMethod · 0.36
TestEboMethod · 0.36
TestConstructorsMethod · 0.36