File: test_com_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 (30 lines) | stat: -rw-r--r-- 459 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
26
27
28
29
30

#if ISPTR_USE_MODULES
    import isptr;
    #ifdef _WIN32
        #include <Unknwn.h>
    #endif
#else
    #include <intrusive_shared_ptr/com_ptr.h>
#endif

#include <doctest/doctest.h>

#ifdef _WIN32

using namespace isptr;

TEST_SUITE("com") {

TEST_CASE( "COM Ptr") {

    com_shared_ptr<IStream> pStream;
    HRESULT res = CreateStreamOnHGlobal(nullptr, true, pStream.get_output_param());
    CHECK( SUCCEEDED(res) );
    CHECK( pStream );
}

}

#endif