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

Tests for Test Al Vector. More...

#include <gtest/gtest.h>
#include <al-vector.H>
#include <al-domain.H>
#include <ah-errors.H>
#include <cmath>
Include dependency graph for test_al_vector.cc:

Go to the source code of this file.

Classes

class  VectorTest
 

Functions

 TEST_F (VectorTest, DefaultConstructor)
 
 TEST_F (VectorTest, ConstructorWithCustomEpsilon)
 
 TEST_F (VectorTest, ConstructorFromDynList)
 
 TEST_F (VectorTest, ConstructorFromDynListSizeMismatch)
 
 TEST_F (VectorTest, CopyConstructor)
 
 TEST_F (VectorTest, MoveConstructor)
 
 TEST_F (VectorTest, CopyAssignment)
 
 TEST_F (VectorTest, CopyAssignmentSelfAssignment)
 
 TEST_F (VectorTest, MoveAssignment)
 
 TEST_F (VectorTest, SetAndGetEntry)
 
 TEST_F (VectorTest, SetEntryToZeroRemovesIt)
 
 TEST_F (VectorTest, SetEntriesWithInitializerLists)
 
 TEST_F (VectorTest, SetEntriesSizeMismatch)
 
 TEST_F (VectorTest, SearchEntry)
 
 TEST_F (VectorTest, GetEntryConst)
 
 TEST_F (VectorTest, EpsilonDefaultValue)
 
 TEST_F (VectorTest, SetEpsilon)
 
 TEST_F (VectorTest, EpsilonAffectsZeroComparison)
 
 TEST_F (VectorTest, AreEqual)
 
 TEST_F (VectorTest, VectorAddition)
 
 TEST_F (VectorTest, VectorAdditionInPlace)
 
 TEST_F (VectorTest, VectorSubtraction)
 
 TEST_F (VectorTest, VectorSubtractionInPlace)
 
 TEST_F (VectorTest, ScalarMultiplication)
 
 TEST_F (VectorTest, ScalarMultiplicationFromLeft)
 
 TEST_F (VectorTest, ScalarMultiplicationByZero)
 
 TEST_F (VectorTest, ScalarMultiplicationByOne)
 
 TEST_F (VectorTest, ScalarDivision)
 
 TEST_F (VectorTest, ScalarDivisionByZero)
 
 TEST_F (VectorTest, ScalarDivisionByOne)
 
 TEST_F (VectorTest, UnaryMinus)
 
 TEST_F (VectorTest, ScalarProduct)
 
 TEST_F (VectorTest, ScalarProductOperator)
 
 TEST_F (VectorTest, ScalarProductOrthogonalVectors)
 
 TEST_F (VectorTest, ScalarProductWithZeroVector)
 
 TEST_F (VectorTest, EqualityOperator)
 
 TEST_F (VectorTest, EqualityWithEpsilon)
 
 TEST_F (VectorTest, InequalityOperator)
 
 TEST_F (VectorTest, EqualityZeroVectors)
 
 TEST_F (VectorTest, ProxyReadAccess)
 
 TEST_F (VectorTest, ProxyWriteAccess)
 
 TEST_F (VectorTest, ProxyWriteZero)
 
 TEST_F (VectorTest, ProxyParenthesesOperator)
 
 TEST_F (VectorTest, ProxyAssignmentBetweenEntries)
 
 TEST_F (VectorTest, IteratorBasic)
 
 TEST_F (VectorTest, ToList)
 
 TEST_F (VectorTest, ToStr)
 
 TEST_F (VectorTest, StringDomain)
 
 TEST_F (VectorTest, StringDomainArithmetic)
 
 TEST_F (VectorTest, VerySmallEpsilon)
 
 TEST_F (VectorTest, NegativeValues)
 
 TEST_F (VectorTest, LargeValues)
 
 TEST_F (VectorTest, MixedOperations)
 
 TEST_F (VectorTest, ChainedOperations)
 
 TEST_F (VectorTest, MapAndFilter)
 
 TEST_F (VectorTest, GetDomain)
 
 TEST (VectorFloatTest, FloatType)
 
 TEST (VectorFloatTest, FloatArithmetic)
 
 TEST_F (VectorTest, ComprehensiveIntegrationTest)
 
int main (int argc, char **argv)
 

Detailed Description

Tests for Test Al Vector.

Comprehensive Google Test suite for al-vector.H.

This test suite covers all major functionality of the Vector class including:

  • Construction and initialization
  • Entry access and modification
  • Arithmetic operations
  • Comparison operations
  • Epsilon-based comparisons
  • Proxy access patterns
  • Edge cases and error conditions
  • Iterator support
  • Move and copy semantics

Definition in file test_al_vector.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 855 of file test_al_vector.cc.

References Aleph::maps().

◆ TEST() [1/2]

TEST ( VectorFloatTest  ,
FloatArithmetic   
)

Definition at line 791 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST() [2/2]

TEST ( VectorFloatTest  ,
FloatType   
)

◆ TEST_F() [1/57]

TEST_F ( VectorTest  ,
AreEqual   
)

Definition at line 282 of file test_al_vector.cc.

References Aleph::Vector< T, NumType >::are_equal(), and Aleph::maps().

◆ TEST_F() [2/57]

TEST_F ( VectorTest  ,
ChainedOperations   
)

◆ TEST_F() [3/57]

TEST_F ( VectorTest  ,
ComprehensiveIntegrationTest   
)

◆ TEST_F() [4/57]

TEST_F ( VectorTest  ,
ConstructorFromDynList   
)

◆ TEST_F() [5/57]

TEST_F ( VectorTest  ,
ConstructorFromDynListSizeMismatch   
)

Definition at line 124 of file test_al_vector.cc.

References Aleph::DynList< T >::append(), and Aleph::maps().

◆ TEST_F() [6/57]

TEST_F ( VectorTest  ,
ConstructorWithCustomEpsilon   
)

Definition at line 103 of file test_al_vector.cc.

References Aleph::Vector< T, NumType >::get_epsilon(), and Aleph::maps().

◆ TEST_F() [7/57]

TEST_F ( VectorTest  ,
CopyAssignment   
)

◆ TEST_F() [8/57]

TEST_F ( VectorTest  ,
CopyAssignmentSelfAssignment   
)

◆ TEST_F() [9/57]

TEST_F ( VectorTest  ,
CopyConstructor   
)

◆ TEST_F() [10/57]

TEST_F ( VectorTest  ,
DefaultConstructor   
)

Definition at line 94 of file test_al_vector.cc.

References Aleph::Vector< T, NumType >::get_entry(), and Aleph::maps().

◆ TEST_F() [11/57]

TEST_F ( VectorTest  ,
EpsilonAffectsZeroComparison   
)

◆ TEST_F() [12/57]

TEST_F ( VectorTest  ,
EpsilonDefaultValue   
)

Definition at line 260 of file test_al_vector.cc.

References Aleph::Vector< T, NumType >::get_epsilon(), and Aleph::maps().

◆ TEST_F() [13/57]

TEST_F ( VectorTest  ,
EqualityOperator   
)

Definition at line 508 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [14/57]

TEST_F ( VectorTest  ,
EqualityWithEpsilon   
)

Definition at line 520 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [15/57]

TEST_F ( VectorTest  ,
EqualityZeroVectors   
)

Definition at line 540 of file test_al_vector.cc.

References Aleph::maps().

◆ TEST_F() [16/57]

TEST_F ( VectorTest  ,
GetDomain   
)

Definition at line 766 of file test_al_vector.cc.

References Aleph::Vector< T, NumType >::get_domain(), and Aleph::maps().

◆ TEST_F() [17/57]

TEST_F ( VectorTest  ,
GetEntryConst   
)

◆ TEST_F() [18/57]

TEST_F ( VectorTest  ,
InequalityOperator   
)

Definition at line 530 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [19/57]

◆ TEST_F() [20/57]

TEST_F ( VectorTest  ,
LargeValues   
)

◆ TEST_F() [21/57]

◆ TEST_F() [22/57]

TEST_F ( VectorTest  ,
MixedOperations   
)

◆ TEST_F() [23/57]

TEST_F ( VectorTest  ,
MoveAssignment   
)

◆ TEST_F() [24/57]

TEST_F ( VectorTest  ,
MoveConstructor   
)

◆ TEST_F() [25/57]

TEST_F ( VectorTest  ,
NegativeValues   
)

◆ TEST_F() [26/57]

TEST_F ( VectorTest  ,
ProxyAssignmentBetweenEntries   
)

Definition at line 588 of file test_al_vector.cc.

References Aleph::Vector< T, NumType >::get_entry(), and Aleph::maps().

◆ TEST_F() [27/57]

TEST_F ( VectorTest  ,
ProxyParenthesesOperator   
)

Definition at line 580 of file test_al_vector.cc.

References Aleph::maps().

◆ TEST_F() [28/57]

TEST_F ( VectorTest  ,
ProxyReadAccess   
)

Definition at line 551 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [29/57]

TEST_F ( VectorTest  ,
ProxyWriteAccess   
)

Definition at line 562 of file test_al_vector.cc.

References Aleph::Vector< T, NumType >::get_entry(), and Aleph::maps().

◆ TEST_F() [30/57]

◆ TEST_F() [31/57]

TEST_F ( VectorTest  ,
ScalarDivision   
)

◆ TEST_F() [32/57]

TEST_F ( VectorTest  ,
ScalarDivisionByOne   
)

◆ TEST_F() [33/57]

TEST_F ( VectorTest  ,
ScalarDivisionByZero   
)

Definition at line 413 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [34/57]

TEST_F ( VectorTest  ,
ScalarMultiplication   
)

◆ TEST_F() [35/57]

TEST_F ( VectorTest  ,
ScalarMultiplicationByOne   
)

◆ TEST_F() [36/57]

TEST_F ( VectorTest  ,
ScalarMultiplicationByZero   
)

◆ TEST_F() [37/57]

TEST_F ( VectorTest  ,
ScalarMultiplicationFromLeft   
)

◆ TEST_F() [38/57]

TEST_F ( VectorTest  ,
ScalarProduct   
)

◆ TEST_F() [39/57]

TEST_F ( VectorTest  ,
ScalarProductOperator   
)

Definition at line 463 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [40/57]

TEST_F ( VectorTest  ,
ScalarProductOrthogonalVectors   
)

Definition at line 478 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [41/57]

TEST_F ( VectorTest  ,
ScalarProductWithZeroVector   
)

Definition at line 492 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [42/57]

TEST_F ( VectorTest  ,
SearchEntry   
)

◆ TEST_F() [43/57]

TEST_F ( VectorTest  ,
SetAndGetEntry   
)

◆ TEST_F() [44/57]

TEST_F ( VectorTest  ,
SetEntriesSizeMismatch   
)

Definition at line 228 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entries().

◆ TEST_F() [45/57]

TEST_F ( VectorTest  ,
SetEntriesWithInitializerLists   
)

◆ TEST_F() [46/57]

◆ TEST_F() [47/57]

◆ TEST_F() [48/57]

TEST_F ( VectorTest  ,
StringDomain   
)

◆ TEST_F() [49/57]

TEST_F ( VectorTest  ,
StringDomainArithmetic   
)

Definition at line 660 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [50/57]

◆ TEST_F() [51/57]

◆ TEST_F() [52/57]

TEST_F ( VectorTest  ,
UnaryMinus   
)

◆ TEST_F() [53/57]

TEST_F ( VectorTest  ,
VectorAddition   
)

Definition at line 293 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [54/57]

TEST_F ( VectorTest  ,
VectorAdditionInPlace   
)

◆ TEST_F() [55/57]

TEST_F ( VectorTest  ,
VectorSubtraction   
)

Definition at line 326 of file test_al_vector.cc.

References Aleph::maps(), and Aleph::Vector< T, NumType >::set_entry().

◆ TEST_F() [56/57]

TEST_F ( VectorTest  ,
VectorSubtractionInPlace   
)

◆ TEST_F() [57/57]

TEST_F ( VectorTest  ,
VerySmallEpsilon   
)