]>
git.saurik.com Git - apple/xnu.git/blob - tests/intrusive_shared_ptr_src/compare.equal.raw.cpp
3 // template <typename T, typename U, typename R>
4 // bool operator==(intrusive_shared_ptr<T, R> const& x, U* y);
6 // template <typename T, typename U, typename R>
7 // bool operator!=(intrusive_shared_ptr<T, R> const& x, U* y);
9 // template <typename T, typename U, typename R>
10 // bool operator==(T* x, intrusive_shared_ptr<U, R> const& y);
12 // template <typename T, typename U, typename R>
13 // bool operator!=(T* x, intrusive_shared_ptr<U, R> const& y);
16 #include <libkern/c++/intrusive_shared_ptr.h>
17 #include <darwintest.h>
18 #include "test_policy.h"
20 struct Base
{ int i
; };
21 struct Derived
: Base
{ };
25 template <typename T
, typename U
>
35 template <typename T
, typename U
>
45 template <typename T
, typename TQual
>
53 test_shared_ptr
<TQual
> const a(&obj1
, libkern::no_retain
);
59 test_shared_ptr
<TQual
> const a(&obj1
, libkern::no_retain
);
65 test_shared_ptr
<TQual
> const a
= nullptr;
71 test_shared_ptr
<TQual
> const a(&obj1
, libkern::no_retain
);
77 test_shared_ptr
<TQual
> const a
= nullptr;
83 template <typename T
, typename RelatedT
>
90 test_shared_ptr
<T
> const a(&obj
, libkern::no_retain
);
96 test_shared_ptr
<RelatedT
> const a(&obj
, libkern::no_retain
);
102 T_DECL(compare_equal_raw
, "intrusive_shared_ptr.compare.equal.raw") {
105 tests_convert
<Derived
, Base
>();
106 tests_convert
<Derived
, Base
const>();