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

Unit tests for C++20 concepts: BinaryPredicate, StrictWeakOrder, EqualityComparator. More...

#include <gtest/gtest.h>
#include <ah-concepts.H>
#include <string>
#include <utility>
#include <ahFunction.H>
#include <ahFunctional.H>
#include <tpl_avl.H>
#include <tpl_splay_tree.H>
#include <tpl_odhash.H>
#include <htlist.H>
#include <tpl_dynDlist.H>
#include <tpl_array.H>
#include <tpl_dynArray.H>
#include <functional>
Include dependency graph for ah_concepts_test.cc:

Go to the source code of this file.

Classes

struct  VoidBinary
 
struct  Unary
 
struct  NotCallable
 
struct  ah_concepts_test_ops::Throwing_Ops
 

Namespaces

namespace  ah_concepts_test_ops
 

Typedefs

using BoolBinFn = bool(*)(const int &, const int &)
 

Functions

Throwing_Ops ah_concepts_test_ops::operator+ (const Throwing_Ops &, const Throwing_Ops &)
 
Throwing_Ops ah_concepts_test_ops::operator- (const Throwing_Ops &, const Throwing_Ops &)
 
Throwing_Ops ah_concepts_test_ops::operator* (const Throwing_Ops &, const Throwing_Ops &)
 
Throwing_Ops ah_concepts_test_ops::operator/ (const Throwing_Ops &, const Throwing_Ops &)
 
Throwing_Ops ah_concepts_test_ops::operator% (const Throwing_Ops &, const Throwing_Ops &)
 
Throwing_Ops ah_concepts_test_ops::operator- (const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator== (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator!= (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator< (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator> (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator<= (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator>= (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator&& (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator|| (const Throwing_Ops &, const Throwing_Ops &)
 
bool ah_concepts_test_ops::operator! (const Throwing_Ops &)
 
 TEST (AhConceptsTest, AvlTreeInstantiates)
 
 TEST (AhConceptsTest, ODhashTableInstantiates)
 
 TEST (AlephFillTest, FillDynList)
 
 TEST (AlephFillTest, FillArray)
 
 TEST (AlephFillTest, FillDynDlist)
 
 TEST (AlephFillTest, FillDynArray)
 
 TEST (AlephFillTest, FillEmptyContainerIsNoOp)
 
 TEST (AlephFillTest, FillDoesNotChangeSize)
 
 TEST (AlephIotaTest, IotaDynList)
 
 TEST (AlephIotaTest, IotaArray)
 
 TEST (AlephIotaTest, IotaDynArray)
 
 TEST (AlephIotaTest, IotaDynDlist)
 
 TEST (AlephIotaTest, IotaEmptyIsNoOp)
 
 TEST (AlephIotaStepTest, EvenNumbers)
 
 TEST (AlephIotaStepTest, DoubleStep)
 
 TEST (AlephIotaStepTest, NegativeStep)
 
 TEST (AlephIotaStepTest, SingleElement)
 
 TEST (AlephFillIotaTest, FillThenIota)
 

Variables

constexpr auto my_less = [](const int & a, const int & b) { return a < b; }
 

Detailed Description

Unit tests for C++20 concepts: BinaryPredicate, StrictWeakOrder, EqualityComparator.

Definition in file ah_concepts_test.cc.

Typedef Documentation

◆ BoolBinFn

using BoolBinFn = bool (*)(const int &, const int &)

Definition at line 80 of file ah_concepts_test.cc.

Function Documentation

◆ TEST() [1/18]

◆ TEST() [2/18]

TEST ( AhConceptsTest  ,
ODhashTableInstantiates   
)

◆ TEST() [3/18]

TEST ( AlephFillIotaTest  ,
FillThenIota   
)

Definition at line 382 of file ah_concepts_test.cc.

References Aleph::fill(), Aleph::iota(), and Aleph::rep().

◆ TEST() [4/18]

TEST ( AlephFillTest  ,
FillArray   
)

◆ TEST() [5/18]

TEST ( AlephFillTest  ,
FillDoesNotChangeSize   
)

Definition at line 272 of file ah_concepts_test.cc.

References Aleph::fill(), and Aleph::rep().

◆ TEST() [6/18]

TEST ( AlephFillTest  ,
FillDynArray   
)

◆ TEST() [7/18]

TEST ( AlephFillTest  ,
FillDynDlist   
)

◆ TEST() [8/18]

TEST ( AlephFillTest  ,
FillDynList   
)

◆ TEST() [9/18]

TEST ( AlephFillTest  ,
FillEmptyContainerIsNoOp   
)

Definition at line 265 of file ah_concepts_test.cc.

References Aleph::fill(), and Aleph::HTList::is_empty().

◆ TEST() [10/18]

TEST ( AlephIotaStepTest  ,
DoubleStep   
)

◆ TEST() [11/18]

TEST ( AlephIotaStepTest  ,
EvenNumbers   
)

Definition at line 333 of file ah_concepts_test.cc.

References Aleph::iota(), and Aleph::rep().

◆ TEST() [12/18]

TEST ( AlephIotaStepTest  ,
NegativeStep   
)

Definition at line 359 of file ah_concepts_test.cc.

References Aleph::iota(), and Aleph::rep().

◆ TEST() [13/18]

TEST ( AlephIotaStepTest  ,
SingleElement   
)

Definition at line 371 of file ah_concepts_test.cc.

References Aleph::iota(), and Aleph::rep().

◆ TEST() [14/18]

TEST ( AlephIotaTest  ,
IotaArray   
)

◆ TEST() [15/18]

TEST ( AlephIotaTest  ,
IotaDynArray   
)

◆ TEST() [16/18]

TEST ( AlephIotaTest  ,
IotaDynDlist   
)

◆ TEST() [17/18]

TEST ( AlephIotaTest  ,
IotaDynList   
)

Definition at line 283 of file ah_concepts_test.cc.

References Aleph::iota(), and Aleph::rep().

◆ TEST() [18/18]

TEST ( AlephIotaTest  ,
IotaEmptyIsNoOp   
)

Definition at line 322 of file ah_concepts_test.cc.

References Aleph::iota(), and Aleph::HTList::is_empty().

Variable Documentation

◆ my_less

constexpr auto my_less = [](const int & a, const int & b) { return a < b; }
constexpr

Definition at line 76 of file ah_concepts_test.cc.