BEGIN_TESTF(DeleteFileShouldDeleteFileIfNotReadOnly, DeleteFileFixture) { WIN_ASSERT_WINAPI_SUCCESS(DeleteFile(s_tempFileName)); WIN_ASSERT_FALSE(IsFileValid(s_tempFileName), _T("DeleteFile did not delete %s correctly."), s_tempFileName); }
END_TESTF BEGIN_TESTF(DeleteFileShouldFailIfFileIsReadOnly, DeleteFileFixture) { // Set file to read-only DWORD fileAttributes = GetFileAttributes(s_tempFileName); WIN_ASSERT_WINAPI_SUCCESS( SetFileAttributes(s_tempFileName, fileAttributes | FILE_ATTRIBUTE_READONLY)); // Verify that DeleteFile fails with ERROR_ACCESS_DENIED // (according to spec) WIN_ASSERT_FALSE(DeleteFile(s_tempFileName)); WIN_ASSERT_EQUAL(ERROR_ACCESS_DENIED, GetLastError()); }
BEGIN_TESTF(initialize_0, SharedMemoryInitializeFixture) { WIN_ASSERT_FALSE(Initialize(0)); }
END_TEST BEGIN_TEST(ItemTestIsInteractable3) { WIN_ASSERT_FALSE(i1.canInteractWithItem(i4)); }