MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / TEST_F

Function TEST_F

Explorer++/TestHelper/TestHelper.cpp:132–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130};
131
132TEST_F(HardLinkTest, Simple)
133{
134 TCHAR szRoot[MAX_PATH];
135 StringCchCopy(szRoot, SIZEOF_ARRAY(szRoot), m_szResourceDirectory);
136 BOOL bRet = PathStripToRoot(szRoot);
137 ASSERT_NE(FALSE, bRet);
138
139 TCHAR szName[32];
140 bRet = GetVolumeInformation(szRoot, NULL, 0, NULL, NULL, NULL, szName, SIZEOF_ARRAY(szName));
141 ASSERT_NE(FALSE, bRet);
142
143 /* A little hacky, but hard links are
144 only supported on NTFS. */
145 if(lstrcmp(L"NTFS", szName) != 0)
146 {
147 return;
148 }
149
150 TCHAR szOriginalFile[MAX_PATH];
151 GetTestResourceFilePath(L"VersionInfo.dll", szOriginalFile, SIZEOF_ARRAY(szOriginalFile));
152
153 CreateTestFileHardLink(szOriginalFile, L"HardLinkCopy1");
154 CreateTestFileHardLink(szOriginalFile, L"HardLinkCopy2");
155 CreateTestFileHardLink(szOriginalFile, L"HardLinkCopy3");
156
157 /* 4 hard links expected - 3 copies + the original. */
158 DWORD dwLinks = GetNumFileHardLinks(szOriginalFile);
159 EXPECT_EQ(4, dwLinks);
160}
161
162void TestReadImageProperty(const TCHAR *szFile, PROPID propId, const TCHAR *szPropertyExpected)
163{

Callers

nothing calls this directly

Calls 2

GetTestResourceFilePathFunction · 0.85
GetNumFileHardLinksFunction · 0.85

Tested by

no test coverage detected