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

Unit tests for ah_stdc++_utils.H. More...

#include <gtest/gtest.h>
#include <ah_stdc++_utils.H>
#include <stdexcept>
Include dependency graph for ah_stdc_utils_test.cc:

Go to the source code of this file.

Functions

 TEST (VerifyContainerAndIterator, ValidIteratorDoesNotThrow)
 
 TEST (VerifyContainerAndIterator, InvalidIteratorThrows)
 
 TEST (VerifyContainerAndIterator, NullIteratorThrows)
 
 TEST (VerifyContainerAndIterator, ExceptionMessageIsDescriptive)
 
 TEST (VerifyIterators, SameContainerDoesNotThrow)
 
 TEST (VerifyIterators, DifferentContainersThrows)
 
 TEST (VerifyIterators, SameIteratorDoesNotThrow)
 
 TEST (VerifyIterators, BothNullIteratorsDoNotThrow)
 
 TEST (VerifyIterators, OneNullIteratorThrows)
 
 TEST (VerifyContainerAndIterators2, BothIteratorsValidDoesNotThrow)
 
 TEST (VerifyContainerAndIterators2, FirstIteratorInvalidThrows)
 
 TEST (VerifyContainerAndIterators2, SecondIteratorInvalidThrows)
 
 TEST (VerifyContainerAndIterators2, BothIteratorsInvalidThrows)
 
 TEST (VerifyContainerAndIterators3, ValidDistinctIteratorsDoNotThrow)
 
 TEST (VerifyContainerAndIterators3, DestIteratorInvalidThrows)
 
 TEST (VerifyContainerAndIterators3, SourceIteratorsFromDifferentContainersThrows)
 
 TEST (VerifyContainerAndIterators3, DestAndSourceSameContainerThrows)
 
int main (int argc, char **argv)
 

Detailed Description

Unit tests for ah_stdc++_utils.H.

Tests cover:

  • verify_container_and_iterator: single iterator validation
  • verify_iterators: pair of iterators validation
  • verify_container_and_iterators: multiple overloads
  • Exception throwing on invalid cases

Definition in file ah_stdc_utils_test.cc.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 303 of file ah_stdc_utils_test.cc.

References Aleph::maps().

◆ TEST() [1/17]

TEST ( VerifyContainerAndIterator  ,
ExceptionMessageIsDescriptive   
)

◆ TEST() [2/17]

TEST ( VerifyContainerAndIterator  ,
InvalidIteratorThrows   
)

Definition at line 106 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_container_and_iterator().

◆ TEST() [3/17]

TEST ( VerifyContainerAndIterator  ,
NullIteratorThrows   
)

Definition at line 115 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_container_and_iterator().

◆ TEST() [4/17]

TEST ( VerifyContainerAndIterator  ,
ValidIteratorDoesNotThrow   
)

Definition at line 98 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_container_and_iterator().

◆ TEST() [5/17]

TEST ( VerifyContainerAndIterators2  ,
BothIteratorsInvalidThrows   
)

◆ TEST() [6/17]

TEST ( VerifyContainerAndIterators2  ,
BothIteratorsValidDoesNotThrow   
)

◆ TEST() [7/17]

TEST ( VerifyContainerAndIterators2  ,
FirstIteratorInvalidThrows   
)

◆ TEST() [8/17]

TEST ( VerifyContainerAndIterators2  ,
SecondIteratorInvalidThrows   
)

◆ TEST() [9/17]

TEST ( VerifyContainerAndIterators3  ,
DestAndSourceSameContainerThrows   
)

◆ TEST() [10/17]

TEST ( VerifyContainerAndIterators3  ,
DestIteratorInvalidThrows   
)

◆ TEST() [11/17]

TEST ( VerifyContainerAndIterators3  ,
SourceIteratorsFromDifferentContainersThrows   
)

◆ TEST() [12/17]

TEST ( VerifyContainerAndIterators3  ,
ValidDistinctIteratorsDoNotThrow   
)

◆ TEST() [13/17]

TEST ( VerifyIterators  ,
BothNullIteratorsDoNotThrow   
)

Definition at line 174 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_iterators().

◆ TEST() [14/17]

TEST ( VerifyIterators  ,
DifferentContainersThrows   
)

Definition at line 155 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_iterators().

◆ TEST() [15/17]

TEST ( VerifyIterators  ,
OneNullIteratorThrows   
)

Definition at line 183 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_iterators().

◆ TEST() [16/17]

TEST ( VerifyIterators  ,
SameContainerDoesNotThrow   
)

Definition at line 146 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_iterators().

◆ TEST() [17/17]

TEST ( VerifyIterators  ,
SameIteratorDoesNotThrow   
)

Definition at line 165 of file ah_stdc_utils_test.cc.

References Aleph::maps(), and Aleph::verify_iterators().