ReactOS 0.4.17-dev-966-gf06eace
PathIsSlow.cpp File Reference
#include "shelltest.h"
#include <shlobj.h>
Include dependency graph for PathIsSlow.cpp:

Go to the source code of this file.

Functions

static void Test_PathIsSlowW (void)
 
static void Test_PathIsSlowA (void)
 
 START_TEST (PathIsSlow)
 

Function Documentation

◆ START_TEST()

START_TEST ( PathIsSlow  )

Definition at line 87 of file PathIsSlow.cpp.

88{
91}
static void Test_PathIsSlowW(void)
Definition: PathIsSlow.cpp:11
static void Test_PathIsSlowA(void)
Definition: PathIsSlow.cpp:51

◆ Test_PathIsSlowA()

static void Test_PathIsSlowA ( void  )
static

Definition at line 51 of file PathIsSlow.cpp.

52{
54
56 ok_int(PathIsSlowA("C:\\TestTestTest", INVALID_FILE_ATTRIBUTES), FALSE);
57
60
63
66
67 ok_int(PathIsSlowA("C:\\ThisPathDoesNotExist_ROS_Test", INVALID_FILE_ATTRIBUTES), FALSE);
68
71 ok_int(PathIsSlowA("C:\\SomeLocalFile.txt", FILE_ATTRIBUTE_OFFLINE), TRUE);
72 ok_int(PathIsSlowA("C:\\SomeLocalFile.txt",
74 ok_int(PathIsSlowA("C:\\SomeLocalFile.txt",
76
77 ok_int(PathIsSlowA("C:\\Windows\\notepad.exe", INVALID_FILE_ATTRIBUTES),
78 PathIsSlowW(L"C:\\Windows\\notepad.exe", INVALID_FILE_ATTRIBUTES));
79
81 PathIsSlowW(L"C:\\foo.txt", FILE_ATTRIBUTE_OFFLINE));
82
84 PathIsSlowW(L"C:\\foo.txt", FILE_ATTRIBUTE_NORMAL));
85}
#define ok_int(expression, result)
Definition: atltest.h:134
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
Definition: path.c:2355
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2072
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
Definition: path.c:2301
EXTERN_C BOOL WINAPI PathIsSlowA(_In_ LPCSTR pszFile, _In_ DWORD dwAttr)
Definition: utils.cpp:767
EXTERN_C BOOL WINAPI PathIsSlowW(_In_ LPCWSTR pszFile, _In_ DWORD dwAttr)
Definition: utils.cpp:718
#define L(x)
Definition: resources.c:13
LPCWSTR szPath
Definition: env.c:37
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_ATTRIBUTE_OFFLINE
Definition: nt_native.h:712
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
char CHAR
Definition: pedump.c:57
#define _countof(array)
Definition: sndvol32.h:70
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23

Referenced by START_TEST().

◆ Test_PathIsSlowW()

static void Test_PathIsSlowW ( void  )
static

Definition at line 11 of file PathIsSlow.cpp.

12{
14
16 ok_int(PathIsSlowW(L"C:\\TestTestTest", INVALID_FILE_ATTRIBUTES), FALSE);
17
20
23
26
27 ok_int(PathIsSlowW(L"C:\\ThisPathDoesNotExist_ROS_Test", INVALID_FILE_ATTRIBUTES), FALSE);
28
34
35 ok_int(PathIsSlowW(L"C:\\SomeLocalFile.txt", FILE_ATTRIBUTE_OFFLINE), TRUE);
36
37 ok_int(PathIsSlowW(L"C:\\SomeLocalFile.txt",
39 ok_int(PathIsSlowW(L"C:\\SomeLocalFile.txt",
41 ok_int(PathIsSlowW(L"C:\\SomeLocalFile.txt",
43
46
49}
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
Definition: path.c:2098
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2331
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2370
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
short WCHAR
Definition: pedump.c:58

Referenced by START_TEST().