KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_ki_any.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <memory>
#include <set>
#include <utility>
#include <type_traits>
#include <ki_any.h>

Go to the source code of this file.

Classes

struct  NoDefaultCtor
 
class  A
 
struct  combined
 
struct  LocationAware
 
struct  X
 
struct  X2
 
struct  X3
 
struct  wrapper
 
struct  Bad
 
struct  Bad2
 
struct  Good
 
struct  X_e
 
struct  X2_e
 

Functions

 BOOST_AUTO_TEST_CASE (AnyCast_1)
 
 BOOST_AUTO_TEST_CASE (AnyCast_2)
 
 BOOST_AUTO_TEST_CASE (AnyCast_3)
 
 BOOST_AUTO_TEST_CASE (AnyCast_4)
 
 BOOST_AUTO_TEST_CASE (AnyCast_5)
 
 BOOST_AUTO_TEST_CASE (AnyCast_6)
 
 BOOST_AUTO_TEST_CASE (AnyCast_7)
 
 BOOST_AUTO_TEST_CASE (NonTrivialType_1)
 
 BOOST_AUTO_TEST_CASE (NonTrivialType_2)
 
 BOOST_AUTO_TEST_CASE (NonTrivialType_3)
 
 BOOST_AUTO_TEST_CASE (MakeAny)
 
 BOOST_AUTO_TEST_CASE (TypeObserver)
 
 BOOST_AUTO_TEST_CASE (Swap)
 
 BOOST_AUTO_TEST_CASE (Modifiers)
 
 BOOST_AUTO_TEST_CASE (Construction_InPlace_1)
 
 BOOST_AUTO_TEST_CASE (Construction_Basic_1)
 
 BOOST_AUTO_TEST_CASE (Construction_Basic_2)
 
 BOOST_AUTO_TEST_CASE (Construction_Basic_3)
 
 BOOST_AUTO_TEST_CASE (Construction_Basic_4)
 
 BOOST_AUTO_TEST_CASE (Construction_Basic_5)
 
 BOOST_AUTO_TEST_CASE (Construction_InPlace_2)
 
 BOOST_AUTO_TEST_CASE (Construction_Pair)
 
bool stored_internally (void *obj, const ki::any &a)
 
 BOOST_AUTO_TEST_CASE (Construction_Alignment)
 
 BOOST_AUTO_TEST_CASE (Construction_Wrapper)
 
 BOOST_AUTO_TEST_CASE (Assign_1)
 
 BOOST_AUTO_TEST_CASE (Assign_2)
 
 BOOST_AUTO_TEST_CASE (Assign_3)
 
 BOOST_AUTO_TEST_CASE (Assign_4)
 
 BOOST_AUTO_TEST_CASE (Assign_5)
 
 BOOST_AUTO_TEST_CASE (Assign_6)
 
 BOOST_AUTO_TEST_CASE (Assign_7)
 
 BOOST_AUTO_TEST_CASE (Assign_8)
 
 BOOST_AUTO_TEST_CASE (Exceptions)
 
 BOOST_AUTO_TEST_CASE (Emplace_1)
 

Variables

static int move_count = 0
 
bool moved = false
 
bool copied = false
 
std::set< const void * > live_objects
 
bool should_throw = false
 
int del_count = 0
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/34]

BOOST_AUTO_TEST_CASE ( AnyCast_1  )

Definition at line 116 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [2/34]

BOOST_AUTO_TEST_CASE ( AnyCast_2  )

Definition at line 144 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [3/34]

BOOST_AUTO_TEST_CASE ( AnyCast_3  )

Definition at line 168 of file test_ki_any.cpp.

References m2, m3, and move_count.

◆ BOOST_AUTO_TEST_CASE() [4/34]

BOOST_AUTO_TEST_CASE ( AnyCast_4  )

Definition at line 187 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [5/34]

BOOST_AUTO_TEST_CASE ( AnyCast_5  )

Definition at line 200 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [6/34]

BOOST_AUTO_TEST_CASE ( AnyCast_6  )

Definition at line 212 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [7/34]

BOOST_AUTO_TEST_CASE ( AnyCast_7  )

Definition at line 245 of file test_ki_any.cpp.

References ki::any::type().

◆ BOOST_AUTO_TEST_CASE() [8/34]

BOOST_AUTO_TEST_CASE ( Assign_1  )

Definition at line 599 of file test_ki_any.cpp.

References ki::any::has_value(), live_objects, and ki::any::reset().

◆ BOOST_AUTO_TEST_CASE() [9/34]

BOOST_AUTO_TEST_CASE ( Assign_2  )

Definition at line 614 of file test_ki_any.cpp.

References live_objects.

◆ BOOST_AUTO_TEST_CASE() [10/34]

BOOST_AUTO_TEST_CASE ( Assign_3  )

Definition at line 633 of file test_ki_any.cpp.

References ki::any::has_value(), live_objects, ki::any::reset(), and ki::any::swap().

◆ BOOST_AUTO_TEST_CASE() [11/34]

BOOST_AUTO_TEST_CASE ( Assign_4  )

Definition at line 648 of file test_ki_any.cpp.

References copied, and moved.

◆ BOOST_AUTO_TEST_CASE() [12/34]

BOOST_AUTO_TEST_CASE ( Assign_5  )

Definition at line 663 of file test_ki_any.cpp.

References copied, and moved.

◆ BOOST_AUTO_TEST_CASE() [13/34]

BOOST_AUTO_TEST_CASE ( Assign_6  )

Definition at line 678 of file test_ki_any.cpp.

References copied, and moved.

◆ BOOST_AUTO_TEST_CASE() [14/34]

BOOST_AUTO_TEST_CASE ( Assign_7  )

Definition at line 693 of file test_ki_any.cpp.

References ki::any::has_value().

◆ BOOST_AUTO_TEST_CASE() [15/34]

BOOST_AUTO_TEST_CASE ( Assign_8  )

Definition at line 706 of file test_ki_any.cpp.

References ki::any::has_value().

◆ BOOST_AUTO_TEST_CASE() [16/34]

BOOST_AUTO_TEST_CASE ( Construction_Alignment  )

Definition at line 518 of file test_ki_any.cpp.

References stored_internally().

◆ BOOST_AUTO_TEST_CASE() [17/34]

BOOST_AUTO_TEST_CASE ( Construction_Basic_1  )

Definition at line 416 of file test_ki_any.cpp.

References moved.

◆ BOOST_AUTO_TEST_CASE() [18/34]

BOOST_AUTO_TEST_CASE ( Construction_Basic_2  )

Definition at line 427 of file test_ki_any.cpp.

References copied, and moved.

◆ BOOST_AUTO_TEST_CASE() [19/34]

BOOST_AUTO_TEST_CASE ( Construction_Basic_3  )

Definition at line 439 of file test_ki_any.cpp.

References copied, and moved.

◆ BOOST_AUTO_TEST_CASE() [20/34]

BOOST_AUTO_TEST_CASE ( Construction_Basic_4  )

Definition at line 452 of file test_ki_any.cpp.

References ki::any::has_value().

◆ BOOST_AUTO_TEST_CASE() [21/34]

BOOST_AUTO_TEST_CASE ( Construction_Basic_5  )

Definition at line 467 of file test_ki_any.cpp.

References ki::any::has_value().

◆ BOOST_AUTO_TEST_CASE() [22/34]

BOOST_AUTO_TEST_CASE ( Construction_InPlace_1  )

Definition at line 367 of file test_ki_any.cpp.

References ki::any::type().

◆ BOOST_AUTO_TEST_CASE() [23/34]

BOOST_AUTO_TEST_CASE ( Construction_InPlace_2  )

Definition at line 482 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [24/34]

BOOST_AUTO_TEST_CASE ( Construction_Pair  )

Definition at line 492 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [25/34]

BOOST_AUTO_TEST_CASE ( Construction_Wrapper  )

Definition at line 548 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [26/34]

BOOST_AUTO_TEST_CASE ( Emplace_1  )

Definition at line 778 of file test_ki_any.cpp.

References ki::any::emplace(), and ki::any::type().

◆ BOOST_AUTO_TEST_CASE() [27/34]

BOOST_AUTO_TEST_CASE ( Exceptions  )

Definition at line 747 of file test_ki_any.cpp.

References del_count, ki::any::has_value(), and should_throw.

◆ BOOST_AUTO_TEST_CASE() [28/34]

BOOST_AUTO_TEST_CASE ( MakeAny  )

Definition at line 306 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [29/34]

BOOST_AUTO_TEST_CASE ( Modifiers  )

Definition at line 351 of file test_ki_any.cpp.

References ki::any::has_value(), ki::any::reset(), and ki::any::swap().

◆ BOOST_AUTO_TEST_CASE() [30/34]

BOOST_AUTO_TEST_CASE ( NonTrivialType_1  )

Definition at line 277 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [31/34]

BOOST_AUTO_TEST_CASE ( NonTrivialType_2  )

Definition at line 284 of file test_ki_any.cpp.

◆ BOOST_AUTO_TEST_CASE() [32/34]

BOOST_AUTO_TEST_CASE ( NonTrivialType_3  )

Definition at line 297 of file test_ki_any.cpp.

References swap.

◆ BOOST_AUTO_TEST_CASE() [33/34]

BOOST_AUTO_TEST_CASE ( Swap  )

Definition at line 341 of file test_ki_any.cpp.

References ki::any::has_value(), and swap.

◆ BOOST_AUTO_TEST_CASE() [34/34]

BOOST_AUTO_TEST_CASE ( TypeObserver  )

Definition at line 330 of file test_ki_any.cpp.

References ki::any::type().

◆ stored_internally()

bool stored_internally ( void *  obj,
const ki::any a 
)

Definition at line 509 of file test_ki_any.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

Variable Documentation

◆ copied

◆ del_count

int del_count = 0

Definition at line 738 of file test_ki_any.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), and Good::~Good().

◆ live_objects

std::set<const void*> live_objects

Definition at line 591 of file test_ki_any.cpp.

Referenced by A::A(), BOOST_AUTO_TEST_CASE(), and A::~A().

◆ move_count

int move_count = 0
static

Definition at line 166 of file test_ki_any.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ moved

bool moved = false

Definition at line 398 of file test_ki_any.cpp.

Referenced by BOOST_AUTO_TEST_CASE(), X::X(), X2::X2(), X2_e::X2_e(), and X_e::X_e().

◆ should_throw

bool should_throw = false

Definition at line 724 of file test_ki_any.cpp.

Referenced by Bad::Bad(), Bad2::Bad2(), and BOOST_AUTO_TEST_CASE().