Skip to content

Commit

Permalink
fix: prj.03: do not assert compiler related stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
j0tunn committed Oct 26, 2022
1 parent b60b57e commit 699c2f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/03/allocator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ TEST_F(BulkAllocatorTest, OnCreateEmptyContainer_ShouldNotDeallocate) {
}

TEST_F(BulkAllocatorTest, OnCreateContainerWithElements_ShouldAllocateWholeMemoryOnce) {
EXPECT_CALL(MemoryMgrMock::getInstance(), Allocate(3 * sizeof(Map<3>::node_type))).Times(Exactly(1));
EXPECT_CALL(MemoryMgrMock::getInstance(), Allocate).Times(Exactly(1));

Map<3> m{{1, 1}, {2, 2}, {3, 3}};
}

TEST_F(BulkAllocatorTest, OnCreateContainerWithTooMuchElements_ShouldAllocateNextBulk) {
EXPECT_CALL(MemoryMgrMock::getInstance(), Allocate(2 * sizeof(Map<3>::node_type))).Times(Exactly(2));
EXPECT_CALL(MemoryMgrMock::getInstance(), Allocate).Times(Exactly(2));

Map<2> m{{1, 1}, {2, 2}, {3, 3}};
}
Expand All @@ -69,7 +69,7 @@ TEST_F(BulkAllocatorTest, OnDestructContainerWithElements_ShouldDeallocateSameMe
TEST_F(BulkAllocatorTest, OnAddElements_ShouldAllocateWholeMemoryOnce) {
Map<3> m{};

EXPECT_CALL(MemoryMgrMock::getInstance(), Allocate(3 * sizeof(Map<3>::node_type))).Times(Exactly(1));
EXPECT_CALL(MemoryMgrMock::getInstance(), Allocate).Times(Exactly(1));

m[1] = 1;
m[2] = 2;
Expand Down

0 comments on commit 699c2f2

Please sign in to comment.