Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
small_vector_test.cc File Reference

Tests for Aleph::SmallVector (tpl_small_vector.H). More...

#include <memory>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <vector>
#include <gtest/gtest.h>
#include <tpl_small_vector.H>
Include dependency graph for small_vector_test.cc:

Go to the source code of this file.

Functions

 TEST (SmallVector, StaysInlineUpToNThenSpills)
 
 TEST (SmallVector, InlineBufferIsInsideTheObject)
 
 TEST (SmallVector, ElementLifetimesAreBalanced)
 
 TEST (SmallVector, FailedConstructorsCleanPartialElements)
 
 TEST (SmallVector, MoveOnlyElementsAreSupported)
 
 TEST (SmallVector, CopySemanticsInBothModes)
 
 TEST (SmallVector, MoveSemanticsInBothModes)
 
 TEST (SmallVector, InsertAndEraseAtPosition)
 
 TEST (SmallVector, CheckedAndUncheckedAccess)
 
 TEST (SmallVector, IterationAndRangeFor)
 
 TEST (SmallVector, AlephConventionsEmptyClearTraverse)
 
 TEST (SmallVector, ReserveGrowsAndKeepsElements)
 
 TEST (SmallVector, ReserveDetectsCapacityOverflow)
 
 TEST (SmallVector, RangeConstructorAndFillConstructor)
 
 TEST (SmallVector, EqualityAcrossDifferentInlineCapacities)
 
 TEST (SmallVector, SwapInAllModeCombinations)
 
 TEST (SmallVector, AppendRangeTrivialTypeStaysInlineThenSpillsCorrectly)
 
 TEST (SmallVector, AppendRangeOfZeroIsANoOp)
 
 TEST (SmallVector, AppendRangeRejectsNullSourceWhenCountIsPositive)
 
 TEST (SmallVector, AppendRangeSingleCallGrowsAtMostOnce)
 
 TEST (SmallVector, AppendRangeNonTrivialTypeKeepsLifetimesBalanced)
 
 TEST (SmallVector, AppendRangeFailedCopyLeavesSizeUnchangedAndNoLeak)
 

Detailed Description

Tests for Aleph::SmallVector (tpl_small_vector.H).

Covers the inline/heap storage transition (is_small), element lifetime (constructor/destructor balance via an instrumented type), move-only element support, copy/move semantics in both storage modes, positional insert/erase, checked access, and Aleph conventions.

Definition in file small_vector_test.cc.

Function Documentation

◆ TEST() [1/22]

◆ TEST() [2/22]

TEST ( SmallVector  ,
AppendRangeFailedCopyLeavesSizeUnchangedAndNoLeak   
)

◆ TEST() [3/22]

TEST ( SmallVector  ,
AppendRangeNonTrivialTypeKeepsLifetimesBalanced   
)

◆ TEST() [4/22]

◆ TEST() [5/22]

TEST ( SmallVector  ,
AppendRangeRejectsNullSourceWhenCountIsPositive   
)

◆ TEST() [6/22]

TEST ( SmallVector  ,
AppendRangeSingleCallGrowsAtMostOnce   
)

◆ TEST() [7/22]

TEST ( SmallVector  ,
AppendRangeTrivialTypeStaysInlineThenSpillsCorrectly   
)

◆ TEST() [8/22]

◆ TEST() [9/22]

TEST ( SmallVector  ,
CopySemanticsInBothModes   
)

◆ TEST() [10/22]

◆ TEST() [11/22]

TEST ( SmallVector  ,
EqualityAcrossDifferentInlineCapacities   
)

Definition at line 400 of file small_vector_test.cc.

References Aleph::SmallVector< T, N >::append().

◆ TEST() [12/22]

TEST ( SmallVector  ,
FailedConstructorsCleanPartialElements   
)

Definition at line 179 of file small_vector_test.cc.

References Aleph::SmallVector< T, N >::emplace_back(), and value.

◆ TEST() [13/22]

TEST ( SmallVector  ,
InlineBufferIsInsideTheObject   
)

◆ TEST() [14/22]

◆ TEST() [15/22]

TEST ( SmallVector  ,
IterationAndRangeFor   
)

◆ TEST() [16/22]

TEST ( SmallVector  ,
MoveOnlyElementsAreSupported   
)

◆ TEST() [17/22]

◆ TEST() [18/22]

TEST ( SmallVector  ,
RangeConstructorAndFillConstructor   
)

◆ TEST() [19/22]

TEST ( SmallVector  ,
ReserveDetectsCapacityOverflow   
)

◆ TEST() [20/22]

◆ TEST() [21/22]

◆ TEST() [22/22]

TEST ( SmallVector  ,
SwapInAllModeCombinations   
)