|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Unit tests for AhArenaAllocator. More...
#include <gtest/gtest.h>#include <ah-arena.H>#include <string>#include <type_traits>#include <vector>#include <cstdint>Go to the source code of this file.
Classes | |
| class | ExternalBufferArena |
Functions | |
| TEST_F (ExternalBufferArena, InitialState) | |
| TEST_F (ExternalBufferArena, SimpleAllocation) | |
| TEST_F (ExternalBufferArena, MultipleAllocations) | |
| TEST_F (ExternalBufferArena, AllocationFailsWhenFull) | |
| TEST_F (ExternalBufferArena, ExactFitAllocation) | |
| TEST_F (ExternalBufferArena, ZeroAllocationReturnsNull) | |
| TEST_F (ExternalBufferArena, LIFODeallocation) | |
| TEST_F (ExternalBufferArena, NonLIFODeallocationIsNoop) | |
| TEST_F (ExternalBufferArena, Reset) | |
| TEST_F (ExternalBufferArena, Contains) | |
| TEST (InternalArena, DefaultSize) | |
| TEST (InternalArena, CustomSize) | |
| TEST (InternalArena, AllocationWorks) | |
| TEST (ArenaMoveSemantics, MoveConstruction) | |
| TEST (ArenaMoveSemantics, MoveAssignment) | |
| TEST (ArenaMoveSemantics, SelfMoveAssignment) | |
| TEST_F (TypedAllocationTest, AllocateAndDeallocate) | |
| TEST_F (TypedAllocationTest, MultipleObjects) | |
| TEST_F (TypedAllocationTest, ResetDoesNotCallDestructors) | |
| TEST_F (TypedAllocationTest, AllocationFailsReturnsNull) | |
| TEST (ArenaAlignment, AllocAligned) | |
| TEST (ArenaAlignment, MultipleAlignedAllocations) | |
| TEST (ArenaAlignment, TypedAllocationRespectAlignment) | |
| TEST (ArenaTypeTraits, NonCopyable) | |
| TEST (ArenaTypeTraits, Movable) | |
| TEST (ArenaTypeTraits, NoexceptMoveOperations) | |
| TEST (ArenaEdgeCases, VerySmallArena) | |
| TEST (ArenaEdgeCases, DeallocWithZeroSize) | |
| TEST (ArenaEdgeCases, DeallocWithNullPtr) | |
| TEST (ArenaEdgeCases, AllocAlignedZeroSize) | |
| TEST (ArenaEdgeCases, AllocAlignedZeroAlignment) | |
| TEST (ArenaBackwardCompat, DeprecatedMethods) | |
| TEST (ArenaBackwardCompat, DealllocAlias) | |
| int | main (int argc, char **argv) |
Unit tests for AhArenaAllocator.
Tests cover:
Definition in file ah_arena_test.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 555 of file ah_arena_test.cc.
References Aleph::maps().
| TEST | ( | ArenaAlignment | , |
| AllocAligned | |||
| ) |
Definition at line 403 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc(), Aleph::AhArenaAllocator::alloc_aligned(), and Aleph::maps().
| TEST | ( | ArenaAlignment | , |
| MultipleAlignedAllocations | |||
| ) |
Definition at line 417 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc_aligned(), and Aleph::maps().
| TEST | ( | ArenaAlignment | , |
| TypedAllocationRespectAlignment | |||
| ) |
Definition at line 434 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc(), and Aleph::maps().
| TEST | ( | ArenaBackwardCompat | , |
| DealllocAlias | |||
| ) |
Definition at line 543 of file ah_arena_test.cc.
References Aleph::dealloc(), Aleph::AhArenaAllocator::empty(), and Aleph::maps().
| TEST | ( | ArenaBackwardCompat | , |
| DeprecatedMethods | |||
| ) |
Definition at line 531 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::allocate(), Aleph::AhArenaAllocator::deallocate(), Aleph::AhArenaAllocator::empty(), and Aleph::maps().
| TEST | ( | ArenaEdgeCases | , |
| AllocAlignedZeroAlignment | |||
| ) |
Definition at line 519 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc_aligned(), and Aleph::maps().
| TEST | ( | ArenaEdgeCases | , |
| AllocAlignedZeroSize | |||
| ) |
Definition at line 511 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc_aligned(), and Aleph::maps().
| TEST | ( | ArenaEdgeCases | , |
| DeallocWithNullPtr | |||
| ) |
Definition at line 501 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc(), Aleph::AhArenaAllocator::allocated_size(), Aleph::AhArenaAllocator::dealloc(), and Aleph::maps().
| TEST | ( | ArenaEdgeCases | , |
| DeallocWithZeroSize | |||
| ) |
Definition at line 491 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc(), Aleph::AhArenaAllocator::allocated_size(), Aleph::AhArenaAllocator::dealloc(), and Aleph::maps().
| TEST | ( | ArenaEdgeCases | , |
| VerySmallArena | |||
| ) |
Definition at line 478 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc(), Aleph::AhArenaAllocator::full(), and Aleph::maps().
| TEST | ( | ArenaMoveSemantics | , |
| MoveAssignment | |||
| ) |
Definition at line 264 of file ah_arena_test.cc.
References Aleph::maps().
| TEST | ( | ArenaMoveSemantics | , |
| MoveConstruction | |||
| ) |
Definition at line 243 of file ah_arena_test.cc.
References Aleph::maps().
| TEST | ( | ArenaMoveSemantics | , |
| SelfMoveAssignment | |||
| ) |
Definition at line 283 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc(), Aleph::AhArenaAllocator::allocated_size(), Aleph::AhArenaAllocator::is_valid(), and Aleph::maps().
| TEST | ( | ArenaTypeTraits | , |
| Movable | |||
| ) |
Definition at line 462 of file ah_arena_test.cc.
| TEST | ( | ArenaTypeTraits | , |
| NoexceptMoveOperations | |||
| ) |
Definition at line 468 of file ah_arena_test.cc.
| TEST | ( | ArenaTypeTraits | , |
| NonCopyable | |||
| ) |
Definition at line 456 of file ah_arena_test.cc.
| TEST | ( | InternalArena | , |
| AllocationWorks | |||
| ) |
Definition at line 227 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::alloc(), Aleph::AhArenaAllocator::allocated_size(), and Aleph::maps().
| TEST | ( | InternalArena | , |
| CustomSize | |||
| ) |
Definition at line 218 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::capacity(), Aleph::AhArenaAllocator::is_valid(), Aleph::maps(), and Aleph::AhArenaAllocator::owns_memory().
| TEST | ( | InternalArena | , |
| DefaultSize | |||
| ) |
Definition at line 209 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::capacity(), Aleph::AhArenaAllocator::DEFAULT_SIZE, Aleph::AhArenaAllocator::is_valid(), Aleph::maps(), and Aleph::AhArenaAllocator::owns_memory().
| TEST_F | ( | ExternalBufferArena | , |
| AllocationFailsWhenFull | |||
| ) |
Definition at line 110 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| Contains | |||
| ) |
Definition at line 191 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| ExactFitAllocation | |||
| ) |
Definition at line 123 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| InitialState | |||
| ) |
Definition at line 71 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| LIFODeallocation | |||
| ) |
Definition at line 143 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| MultipleAllocations | |||
| ) |
Definition at line 93 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| NonLIFODeallocationIsNoop | |||
| ) |
Definition at line 159 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| Reset | |||
| ) |
Definition at line 171 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| SimpleAllocation | |||
| ) |
Definition at line 82 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | ExternalBufferArena | , |
| ZeroAllocationReturnsNull | |||
| ) |
Definition at line 136 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | TypedAllocationTest | , |
| AllocateAndDeallocate | |||
| ) |
Definition at line 337 of file ah_arena_test.cc.
References Aleph::deallocate(), and Aleph::maps().
| TEST_F | ( | TypedAllocationTest | , |
| AllocationFailsReturnsNull | |||
| ) |
Definition at line 388 of file ah_arena_test.cc.
References Aleph::maps().
| TEST_F | ( | TypedAllocationTest | , |
| MultipleObjects | |||
| ) |
Definition at line 353 of file ah_arena_test.cc.
References Aleph::deallocate(), Aleph::AhArenaAllocator::empty(), and Aleph::maps().
| TEST_F | ( | TypedAllocationTest | , |
| ResetDoesNotCallDestructors | |||
| ) |
Definition at line 372 of file ah_arena_test.cc.
References Aleph::AhArenaAllocator::empty(), Aleph::maps(), and Aleph::AhArenaAllocator::reset().