libcopp 2.3.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Data Structures | Namespaces | Functions | Variables
rc_ptr_test.cpp File Reference
#include <stdint.h>
#include <utility>
#include "frame/test_macros.h"
#include "libcopp/utils/config/libcopp_build_features.h"
#include "libcopp/utils/memory/rc_ptr.h"
Include dependency graph for rc_ptr_test.cpp:

Go to the source code of this file.

Data Structures

struct  strong_rc::n_constructors::A
 
struct  strong_rc::n_constructors::X
 
struct  strong_rc::n_constructors::Y
 
struct  strong_rc::n_constructors::deleter3
 
struct  strong_rc::n_assignment::A
 
struct  strong_rc::n_assignment::X
 
struct  strong_rc::n_assignment::Y
 
struct  strong_rc::n_reset::X
 
struct  strong_rc::n_reset::A
 
struct  strong_rc::n_reset::Y
 
struct  strong_rc::n_access::X
 
struct  strong_rc::n_use_count::X
 
struct  strong_rc::n_swap::X
 
struct  strong_rc::n_comparison::X
 
struct  strong_rc::n_comparison::Y
 
struct  strong_rc::n_comparison::Z
 
struct  strong_rc::n_static_cast::X
 
struct  strong_rc::n_static_cast::Y
 
struct  strong_rc::n_map::X
 
struct  strong_rc::n_transitive::X
 
class  strong_rc::n_report_1::foo
 
class  strong_rc::n_report_2::foo
 
class  strong_rc::n_report_2::deleter
 
class  strong_rc::n_spt_pimpl::file
 
class  strong_rc::n_spt_abstract::X
 
class  strong_rc::n_spt_preventing_delete::X
 
class  strong_rc::n_spt_preventing_delete::X::deleter
 
struct  strong_rc::n_spt_array::X
 
class  strong_rc::n_spt_static::X
 
struct  strong_rc::n_spt_static::null_deleter
 
struct  strong_rc::n_spt_intrusive::X
 
struct  strong_rc::n_spt_intrusive::intrusive_deleter< T >
 
class  strong_rc::n_spt_another_sp::another_ptr< T >
 
class  strong_rc::n_spt_another_sp::event_handler
 
class  strong_rc::n_spt_another_sp::event_handler_impl
 
class  strong_rc::n_spt_another_sp::smart_pointer_deleter< P >
 
class  strong_rc::n_spt_shared_from_this::X
 
class  strong_rc::n_spt_shared_from_this::Y
 
class  strong_rc::n_spt_shared_from_this::impl
 
class  strong_rc::n_spt_incomplete::file
 
class  strong_rc::n_spt_pimpl::file::impl
 
class  strong_rc::n_spt_abstract::X_impl
 
struct  strong_rc_fn::null_deleter
 
struct  strong_rc_move::X
 
class  make_strong_rc::X
 
struct  weak_rc::X
 
struct  weak_rc::Y
 
struct  weak_rc::Z
 
class  weak_rc::incomplete
 
struct  weak_rc_ptr_move::X
 
class  shared_from_this::X
 
class  shared_from_this::Y
 
class  shared_from_this::impl
 
class  shared_from_this::impl2
 
struct  shared_from_this::V
 
struct  sp_unique_ptr::X
 
struct  sp_unique_ptr::Y
 
struct  sp_unique_ptr::YD
 
class  allocate_strong_rc_test::X
 
class  allocate_strong_rc_esft_test::X
 

Namespaces

namespace  strong_rc
 
namespace  strong_rc::n_element_type
 
namespace  strong_rc::n_constructors
 
namespace  strong_rc::n_assignment
 
namespace  strong_rc::n_reset
 
namespace  strong_rc::n_access
 
namespace  strong_rc::n_use_count
 
namespace  strong_rc::n_swap
 
namespace  strong_rc::n_comparison
 
namespace  strong_rc::n_static_cast
 
namespace  strong_rc::n_const_cast
 
namespace  strong_rc::n_map
 
namespace  strong_rc::n_transitive
 
namespace  strong_rc::n_report_1
 
namespace  strong_rc::n_report_2
 
namespace  strong_rc::n_spt_incomplete
 
namespace  strong_rc::n_spt_pimpl
 
namespace  strong_rc::n_spt_abstract
 
namespace  strong_rc::n_spt_preventing_delete
 
namespace  strong_rc::n_spt_array
 
namespace  strong_rc::n_spt_static
 
namespace  strong_rc::n_spt_intrusive
 
namespace  strong_rc::n_spt_another_sp
 
namespace  strong_rc::n_spt_shared_from_this
 
namespace  strong_rc::n_spt_wrap
 
namespace  strong_rc_fn
 
namespace  strong_rc_move
 
namespace  make_strong_rc
 
namespace  weak_rc
 
namespace  weak_rc::n_element_type
 
namespace  weak_rc::n_constructors
 
namespace  weak_rc::n_assignment
 
namespace  weak_rc::n_reset
 
namespace  weak_rc::n_use_count
 
namespace  weak_rc::n_swap
 
namespace  weak_rc::n_lock
 
namespace  weak_rc_ptr_move
 
namespace  shared_from_this
 
namespace  sp_unique_ptr
 
namespace  allocate_strong_rc_test
 
namespace  allocate_strong_rc_esft_test
 

Functions

void strong_rc::n_element_type::f (int &)
 
void strong_rc::n_element_type::test ()
 
void strong_rc::n_constructors::default_constructor ()
 
template<class T >
void strong_rc::n_constructors::pc0_test (T *p)
 
void strong_rc::n_constructors::pointer_constructor ()
 
void strong_rc::n_constructors::deleter (int *p)
 
void strong_rc::n_constructors::deleter2 (int *p)
 
void strong_rc::n_constructors::deleter_constructor ()
 
void strong_rc::n_constructors::copy_constructor ()
 
void strong_rc::n_constructors::weak_ptr_constructor ()
 
void strong_rc::n_constructors::test ()
 
void strong_rc::n_assignment::copy_assignment ()
 
void strong_rc::n_assignment::conversion_assignment ()
 
void strong_rc::n_assignment::test ()
 
void strong_rc::n_reset::deleter (incomplete *)
 
void strong_rc::n_reset::plain_reset ()
 
void strong_rc::n_reset::pointer_reset ()
 
void strong_rc::n_reset::deleter2 (void *p)
 
void strong_rc::n_reset::deleter_reset ()
 
void strong_rc::n_reset::test ()
 
void strong_rc::n_access::test ()
 
void strong_rc::n_use_count::test ()
 
void strong_rc::n_swap::test ()
 
void strong_rc::n_comparison::test ()
 
void strong_rc::n_static_cast::test ()
 
void strong_rc::n_const_cast::test ()
 
void strong_rc::n_map::test ()
 
void strong_rc::n_transitive::test ()
 
void strong_rc::n_report_1::test ()
 
void strong_rc::n_report_2::test ()
 
copp::memory::strong_rc_ptr< filestrong_rc::n_spt_incomplete::fopen (char const *name, char const *mode)
 
void strong_rc::n_spt_incomplete::fread (copp::memory::strong_rc_ptr< file > f, void *data, int64_t size)
 
void strong_rc::n_spt_incomplete::test ()
 
void strong_rc::n_spt_pimpl::test ()
 
copp::memory::strong_rc_ptr< Xstrong_rc::n_spt_abstract::createX ()
 
void strong_rc::n_spt_abstract::test ()
 
void strong_rc::n_spt_preventing_delete::test ()
 
void strong_rc::n_spt_array::test ()
 
void strong_rc::n_spt_static::test ()
 
void strong_rc::n_spt_intrusive::intrusive_ptr_add_ref (X *p)
 
void strong_rc::n_spt_intrusive::intrusive_ptr_release (X *p)
 
copp::memory::strong_rc_ptr< Xstrong_rc::n_spt_intrusive::make_shared_from_intrusive (X *p)
 
void strong_rc::n_spt_intrusive::test ()
 
another_ptr< event_handlerstrong_rc::n_spt_another_sp::get_event_handler ()
 
void strong_rc::n_spt_another_sp::install_event_handler (copp::memory::strong_rc_ptr< event_handler > p)
 
void strong_rc::n_spt_another_sp::handle_event (int event)
 
void strong_rc::n_spt_another_sp::remove_event_handler ()
 
void strong_rc::n_spt_another_sp::test ()
 
void strong_rc::n_spt_shared_from_this::test ()
 
void strong_rc::n_spt_wrap::test ()
 
 strong_rc::CASE_TEST (rc_ptr, strong_rc_basic)
 
static void strong_rc_fn::f ()
 
 strong_rc_fn::CASE_TEST (rc_ptr, strong_rc_fn)
 
 strong_rc_move::CASE_TEST (rc_ptr, strong_rc_move)
 
 make_strong_rc::CASE_TEST (rc_ptr, make_strong_rc)
 
void weak_rc::n_element_type::f (int &)
 
void weak_rc::n_element_type::test ()
 
copp::memory::strong_rc_ptr< incompleteweak_rc::create_incomplete ()
 
void weak_rc::n_constructors::default_constructor ()
 
void weak_rc::n_constructors::shared_ptr_constructor ()
 
void weak_rc::n_constructors::copy_constructor ()
 
void weak_rc::n_constructors::conversion_constructor ()
 
void weak_rc::n_constructors::test ()
 
template<class T >
void weak_rc::n_assignment::copy_assignment (copp::memory::strong_rc_ptr< T > &sp)
 
void weak_rc::n_assignment::conversion_assignment ()
 
template<class T , class U >
void weak_rc::n_assignment::shared_ptr_assignment (copp::memory::strong_rc_ptr< U > &sp, T *=0)
 
void weak_rc::n_assignment::test ()
 
template<class T , class U >
void weak_rc::n_reset::test2 (copp::memory::strong_rc_ptr< U > &sp, T *=0)
 
void weak_rc::n_reset::test ()
 
void weak_rc::n_use_count::test ()
 
void weak_rc::n_swap::test ()
 
void weak_rc::n_lock::test ()
 
 weak_rc::CASE_TEST (rc_ptr, weak_rc_ptr_basic)
 
 weak_rc_ptr_move::CASE_TEST (rc_ptr, weak_rc_ptr_move)
 
template<class L , class R >
static bool owner_before_comp (const L &l, const R &r) noexcept
 
 CASE_TEST (rc_ptr, owner_before)
 
template<class L , class R >
static bool owner_equal_comp (const L &l, const R &r) noexcept
 
 CASE_TEST (rc_ptr, owner_equal)
 
template<class P >
static std::size_t get_owner_hash (const P &l) noexcept
 
 CASE_TEST (rc_ptr, owner_hash)
 
copp::memory::strong_rc_ptr< Yshared_from_this::createY ()
 
void shared_from_this::test ()
 
void shared_from_this::test2 ()
 
void shared_from_this::test3 ()
 
 shared_from_this::CASE_TEST (rc_ptr, shared_from_this)
 
template<class U , class T , class D >
static void sp_unique_ptr::test_null_unique_ptr (std::unique_ptr< T, D > p1, std::unique_ptr< T, D > p2)
 
 sp_unique_ptr::CASE_TEST (rc_ptr, sp_unique_ptr)
 
 CASE_TEST (rc_ptr, compat)
 
 allocate_strong_rc_test::CASE_TEST (rc_ptr, allocate_strong_rc_test)
 
 allocate_strong_rc_esft_test::CASE_TEST (rc_ptr, allocate_strong_rc_esft_test)
 

Variables

int strong_rc::n_constructors::m = 0
 
incomplete * strong_rc::n_constructors::p0 = 0
 
incomplete * strong_rc::n_reset::p0 = 0
 
void * strong_rc::n_reset::deleted = 0
 
int strong_rc::n_spt_incomplete::file_instances = 0
 
int strong_rc::n_spt_pimpl::file_instances = 0
 
int strong_rc::n_spt_abstract::X_instances = 0
 
int strong_rc::n_spt_preventing_delete::X_instances = 0
 
int strong_rc::n_spt_array::X_instances = 0
 
static X strong_rc::n_spt_static::x
 
int strong_rc::n_spt_intrusive::X_instances = 0
 
int strong_rc::n_spt_another_sp::begin_called = 0
 
int strong_rc::n_spt_another_sp::handle_called = 0
 
int strong_rc::n_spt_another_sp::end_called = 0
 
copp::memory::strong_rc_ptr< event_handlerstrong_rc::n_spt_another_sp::current_handler
 

Function Documentation

◆ CASE_TEST() [1/4]

CASE_TEST ( rc_ptr  ,
compat   
)

Definition at line 4555 of file rc_ptr_test.cpp.

◆ CASE_TEST() [2/4]

CASE_TEST ( rc_ptr  ,
owner_before   
)

Definition at line 3964 of file rc_ptr_test.cpp.

References CASE_EXPECT_TRUE, and owner_before_comp().

◆ CASE_TEST() [3/4]

CASE_TEST ( rc_ptr  ,
owner_equal   
)

Definition at line 4014 of file rc_ptr_test.cpp.

References CASE_EXPECT_TRUE, and owner_equal_comp().

◆ CASE_TEST() [4/4]

CASE_TEST ( rc_ptr  ,
owner_hash   
)

Definition at line 4122 of file rc_ptr_test.cpp.

References CASE_EXPECT_EQ, CASE_EXPECT_NE, CASE_EXPECT_TRUE, and get_owner_hash().

◆ get_owner_hash()

template<class P >
static std::size_t get_owner_hash ( const P &  l)
staticnoexcept

Definition at line 4118 of file rc_ptr_test.cpp.

Referenced by CASE_TEST().

◆ owner_before_comp()

template<class L , class R >
static bool owner_before_comp ( const L &  l,
const R &  r 
)
staticnoexcept

Definition at line 3960 of file rc_ptr_test.cpp.

Referenced by CASE_TEST().

◆ owner_equal_comp()

template<class L , class R >
static bool owner_equal_comp ( const L &  l,
const R &  r 
)
staticnoexcept

Definition at line 4010 of file rc_ptr_test.cpp.

Referenced by CASE_TEST().