mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
Major refactoring: testing
This commit is contained in:
@ -9,19 +9,20 @@ extern int WinFspNetTests;
|
||||
void mount_invalid_test(void)
|
||||
{
|
||||
NTSTATUS Result;
|
||||
FSP_FSCTL_VOLUME_PARAMS Params = { 0 };
|
||||
WCHAR VolumePath[MAX_PATH];
|
||||
FSP_FSCTL_VOLUME_PARAMS VolumeParams = { 0 };
|
||||
WCHAR VolumePath[MAX_PATH] = L"foo";
|
||||
HANDLE VolumeHandle;
|
||||
|
||||
Params.SectorSize = 16384;
|
||||
Params.SerialNumber = 0x12345678;
|
||||
Result = FspFsctlCreateVolume(L"WinFsp.DoesNotExist", &Params, 0, VolumePath, sizeof VolumePath);
|
||||
ASSERT(STATUS_NO_SUCH_DEVICE == Result);
|
||||
|
||||
Result = FspFsctlOpenVolume(L"\\Device\\Volume{31EF947D-B0F3-4A19-A4E7-BE0C1BE94886}.DoesNotExist", &VolumeHandle);
|
||||
VolumeParams.SectorSize = 16384;
|
||||
VolumeParams.SerialNumber = 0x12345678;
|
||||
Result = FspFsctlCreateVolume(L"WinFsp.DoesNotExist", &VolumeParams,
|
||||
VolumePath, sizeof VolumePath, &VolumeHandle);
|
||||
ASSERT(STATUS_NO_SUCH_DEVICE == Result);
|
||||
ASSERT(L'\0' == VolumePath[0]);
|
||||
ASSERT(INVALID_HANDLE_VALUE == VolumeHandle);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void mount_create_delete_dotest(PWSTR DeviceName)
|
||||
{
|
||||
NTSTATUS Result;
|
||||
@ -228,11 +229,14 @@ void mount_volume_transact_test(void)
|
||||
if (WinFspNetTests)
|
||||
mount_volume_transact_dotest(L"WinFsp.Net");
|
||||
}
|
||||
#endif
|
||||
|
||||
void mount_tests(void)
|
||||
{
|
||||
TEST(mount_invalid_test);
|
||||
#if 0
|
||||
TEST(mount_create_delete_test);
|
||||
TEST(mount_volume_cancel_test);
|
||||
TEST(mount_volume_transact_test);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user