Audacity 3.2.0
Classes | Typedefs | Functions | Variables
anonymous_namespace{CompositeTest.cpp} Namespace Reference

Classes

struct  Ignore
 
struct  MyBuilder
 
struct  MyComponent
 
struct  MyComponentEx
 

Typedefs

using MyCompositeBase = Base< MyComponent, unique_ptr< MyComponent >, int >
 
using MyCompositeBase2 = Base< MyComponent, unique_ptr< MyComponent >, int, Ignore >
 

Functions

bool operator== (int n, const unique_ptr< MyComponent > &p)
 
template<bool members = true, typename Container1 , typename Container2 >
bool compareSequences (const Container1 &c1, const Container2 &c2)
 
bool operator== (int n, const std::unique_ptr< MyComponentEx > &p)
 
static auto Maker (int value)
 

Variables

constexpr auto Component = Callable::UniqueMaker<MyComponent, int>()
 

Typedef Documentation

◆ MyCompositeBase

using anonymous_namespace{CompositeTest.cpp}::MyCompositeBase = typedef Base<MyComponent, unique_ptr<MyComponent>, int>

Definition at line 36 of file CompositeTest.cpp.

◆ MyCompositeBase2

using anonymous_namespace{CompositeTest.cpp}::MyCompositeBase2 = typedef Base<MyComponent, unique_ptr<MyComponent>, int, Ignore>

Definition at line 37 of file CompositeTest.cpp.

Function Documentation

◆ compareSequences()

template<bool members = true, typename Container1 , typename Container2 >
bool anonymous_namespace{CompositeTest.cpp}::compareSequences ( const Container1 &  c1,
const Container2 &  c2 
)

Definition at line 48 of file CompositeTest.cpp.

49{
50 bool result = true;
51 if constexpr(members) {
52 result =
53 (equal(c1.begin(), c1.end(), c2.begin(), c2.end()))
54 &&
55 (equal(c1.cbegin(), c1.cend(), c2.cbegin(), c2.cend()))
56 &&
57 (equal(c1.rbegin(), c1.rend(), c2.rbegin(), c2.rend()))
58 &&
59 (equal(c1.crbegin(), c1.crend(), c2.crbegin(), c2.crend()));
60 }
61 result = result &&
62 (equal(begin(c1), end(c1), begin(c2), end(c2)))
63 &&
64 (equal(cbegin(c1), cend(c1), cbegin(c2), cend(c2)))
65 &&
66 (equal(rbegin(c1), rend(c1), rbegin(c2), rend(c2)))
67 &&
68 (equal(crbegin(c1), crend(c1), crbegin(c2), crend(c2)))
69 ;
70 return result;
71}
const char * end(const char *str) noexcept
Definition: StringUtils.h:106
const char * begin(const char *str) noexcept
Definition: StringUtils.h:101

References details::begin(), and details::end().

Referenced by DoTest(), and TEST_CASE().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Maker()

static auto anonymous_namespace{CompositeTest.cpp}::Maker ( int  value)
static

Definition at line 139 of file CompositeTest.cpp.

139{return std::make_unique<MyComponentEx>(value); };

Referenced by DoTest().

Here is the caller graph for this function:

◆ operator==() [1/2]

bool anonymous_namespace{CompositeTest.cpp}::operator== ( int  n,
const std::unique_ptr< MyComponentEx > &  p 
)
inline

Definition at line 135 of file CompositeTest.cpp.

136{
137 return n == *p;
138}

◆ operator==() [2/2]

bool anonymous_namespace{CompositeTest.cpp}::operator== ( int  n,
const unique_ptr< MyComponent > &  p 
)
inline

Definition at line 40 of file CompositeTest.cpp.

41{
42 return n == *p;
43}

Variable Documentation

◆ Component

constexpr auto anonymous_namespace{CompositeTest.cpp}::Component = Callable::UniqueMaker<MyComponent, int>()
constexpr

Definition at line 34 of file CompositeTest.cpp.

Referenced by DoTest().