Tokenizer Test

This commit is contained in:
IlushaShurupov 2023-07-15 19:18:22 +03:00
parent 44bad77e93
commit b68539cc0c
8 changed files with 235 additions and 214 deletions

View file

@ -179,7 +179,8 @@ namespace tp {
for (ualni i = 0; i < mLoad; i++) mBuff[i].~tType();
mBuff = (tType*) mAllocator.allocate(sizeof(tType) * aSize);
mSize = aSize;
mLoad = 0;
mLoad = aSize;
for (ualni i = 0; i < mLoad; i++) new (mBuff + i) tType();
}
private:

View file

@ -13,8 +13,8 @@ const ualni size = 1000;
TEST_DEF_STATIC(Simple1) {
Buffer2D<int> buff;
buff.reserve({ 4, 4 });
buff.set( 2, 2, 5);
TEST(buff.get(2, 2) == 5);
buff.set( { 2, 2 }, 5);
TEST(buff.get( { 2, 2 } ) == 5);
}
TEST_DEF_STATIC(Simple2) {