MCPcopy Create free account
hub / github.com/HO-COOH/FastCopy / TEST_METHOD

Function TEST_METHOD

UnitTest/UnitTest.cpp:120–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

118 }
119
120 TEST_METHOD(ParseHelp)
121 {
122 auto& result = parser.getSwitches();
123 std::array const expectedFlags
124 {
125 "/A",
126 "/M",
127 "/D:m-d-y",
128 "/EXCLUDE:file1[+file2][+file3]...",
129 "/P",
130 "/S",
131 "/E",
132 "/V",
133 "/W",
134 "/C",
135 "/I",
136 "/-I",
137 "/Q",
138 "/F",
139 "/L",
140 "/G",
141 "/H",
142 "/R",
143 "/T",
144 "/U",
145 "/K",
146 "/N",
147 "/O",
148 "/X",
149 "/Y",
150 "/-Y",
151 "/Z",
152 "/B",
153 "/J",
154 "/COMPRESS",
155 "/SPARSE"
156 };
157 Assert::AreEqual(
158 result.size(),
159 expectedFlags.size(),
160 L"Parse xcopy commands failed, number of parsed flags does not match");
161
162 for (auto expectedFlag : expectedFlags)
163 {
164 Assert::IsTrue(
165 result.find(expectedFlag) != result.end(),
166 (winrt::hstring{ L"Parse xcopy commands failed, lacking flag: " } + winrt::to_hstring(expectedFlag)).data()
167 );
168 Assert::IsFalse(
169 result.find(expectedFlag)->second.empty(),
170 (winrt::hstring{L"Parse xcopy commands failed, flag: "} + winrt::to_hstring(expectedFlag) + L" does not have description").data()
171 );
172 }
173 }
174 };
175
176 TEST_CLASS(FastCopyShellExtensionTest)

Callers

nothing calls this directly

Calls 10

LoadModuleFunction · 0.85
GetInvokeFunctionFunction · 0.85
FillSourceFunction · 0.85
MakeTestFoldersFunction · 0.85
sizeMethod · 0.80
dataMethod · 0.80
DestinationMethod · 0.80
endMethod · 0.45
getMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected