File: test_apple_cf_ptr.cpp

package info (click to toggle)
intrusive-shared-ptr 1.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 412 kB
  • sloc: cpp: 2,852; ansic: 173; makefile: 3
file content (25 lines) | stat: -rw-r--r-- 418 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#if ISPTR_USE_MODULES
    import isptr;
#else
    #include <intrusive_shared_ptr/apple_cf_ptr.h>
#endif

#include <doctest/doctest.h>

#if (defined(__APPLE__) && defined(__MACH__))

using namespace isptr;

TEST_SUITE("apple") {

TEST_CASE( "Apple Ptr" ) {
    
    auto str = cf_attach(CFStringCreateWithCString(nullptr, "Hello", kCFStringEncodingUTF8));
    CHECK( CFStringGetLength(str.get()) == 5 );
}

}

#endif