tangled
alpha
login
or
join now
huwcampbell.com
/
reactos
0
fork
atom
Reactos
0
fork
atom
overview
issues
pulls
pipelines
[ATL_APITEST] Add a test for CComBSTR.Attach/Detach
Mark Jansen
8 years ago
9187a815
bccdcded
+13
-4
1 changed file
expand all
collapse all
unified
split
modules
rostests
apitests
atl
CComBSTR.cpp
+13
-4
modules/rostests/apitests/atl/CComBSTR.cpp
reviewed
···
1
1
/*
2
2
-
* PROJECT: ReactOS api tests
3
3
-
* LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4
4
-
* PURPOSE: Test for CComBSTR
5
5
-
* PROGRAMMER: Mark Jansen
2
2
+
* PROJECT: ReactOS api tests
3
3
+
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4
4
+
* PURPOSE: Test for CComBSTR
5
5
+
* COPYRIGHT: Copyright 2015-2017 Mark Jansen (mark.jansen@reactos.org)
6
6
*/
7
7
8
8
#include <apitest.h>
···
105
105
hr = happy.CopyTo((BSTR*)NULL);
106
106
ok(hr == E_POINTER, "Expected hr to be E_POINTER, was: %u\n");
107
107
#endif
108
108
+
109
109
+
BSTR RawPtr = ::SysAllocString(L"TEST--");
110
110
+
happy.Attach(RawPtr);
111
111
+
ok_ptr(happy.m_str, RawPtr);
112
112
+
verify_str(happy, L"TEST--");
113
113
+
happyCopy1.Attach(happy.Detach());
114
114
+
ok_ptr(happyCopy1.m_str, RawPtr);
115
115
+
verify_str(happyCopy1, L"TEST--");
116
116
+
ok_ptr(happy.m_str, NULL);
108
117
}
109
118
110
119
void test_fromguid()