* Test QueryGetData() enumerator for the presence of CFSTR_SHELLIDLIST * but the absence of CFSTR_FILEDESCRIPTOR and CFSTR_FILECONTENTS. * * Format-limited version of _testQueryFormats() in DataObjectTests.h. */
| 141 | * Format-limited version of _testQueryFormats() in DataObjectTests.h. |
| 142 | */ |
| 143 | void _testCDataObjectQueryFormats(com_ptr<IDataObject> data_object) |
| 144 | { |
| 145 | // Test CFSTR_SHELLIDLIST (PIDL array) format succeeds |
| 146 | CFormatEtc fetcShellIdList(CFSTR_SHELLIDLIST); |
| 147 | BOOST_REQUIRE_OK(data_object->QueryGetData(&fetcShellIdList)); |
| 148 | |
| 149 | // Test CFSTR_FILEDESCRIPTOR (FILEGROUPDESCRIPTOR) format fails |
| 150 | CFormatEtc fetcDescriptor(CFSTR_FILEDESCRIPTOR); |
| 151 | BOOST_CHECK(data_object->QueryGetData(&fetcDescriptor) == S_FALSE); |
| 152 | |
| 153 | // Test CFSTR_FILECONTENTS (IStream) format fails |
| 154 | CFormatEtc fetcContents(CFSTR_FILECONTENTS); |
| 155 | BOOST_CHECK(data_object->QueryGetData(&fetcContents) == S_FALSE); |
| 156 | } |
| 157 | |
| 158 | class TestFixture : public SwishPidlFixture, public ComFixture |
| 159 | { |
no test coverage detected