Re: kernel32: add a test for CreateFileA()
Austin English wrote:
Passed all the vm's on wtb.
------------------------------------------------------------------------
+ hFile = CreateFileA("c:\\*.*", GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL ); + ok(GetLastError() == ERROR_INVALID_NAME || broken(GetLastError() == ERROR_FILE_NOT_FOUND) || broken(GetLastError() == ERROR_PATH_NOT_FOUND), + "CreateFileA should have returned ERROR_INVALID_NAME on %s, but got %u\n", filename, GetLastError()); + CloseHandle( hFile ); Nice negative test, but how about one that should pass? James McKenzie
On Sun, Jul 18, 2010 at 9:39 AM, James McKenzie <jjmckenzie51(a)earthlink.net> wrote:
Austin English wrote:
Passed all the vm's on wtb.
------------------------------------------------------------------------
+ hFile = CreateFileA("c:\\*.*", GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL ); + ok(GetLastError() == ERROR_INVALID_NAME || broken(GetLastError() == ERROR_FILE_NOT_FOUND) || broken(GetLastError() == ERROR_PATH_NOT_FOUND), + "CreateFileA should have returned ERROR_INVALID_NAME on %s, but got %u\n", filename, GetLastError()); + CloseHandle( hFile );
Nice negative test, but how about one that should pass?
There are already several CreateFile tests. Look at the filename it's creating, that file should of course fail. -- -Austin
participants (2)
-
Austin English -
James McKenzie