Lines Matching refs:command
172 Command command = Command::Parse(input, 0, &err); in TEST() local
173 ASSERT_TRUE(command); in TEST()
175 ASSERT_EQ(TargetInfo(), command.target()); in TEST()
176 ASSERT_EQ(SourceInfo(), command.source()); in TEST()
177 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
178 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()
184 Command command = Command::Parse(input, 0, &err); in TEST() local
185 ASSERT_FALSE(command); in TEST()
196 Command command = Command::Parse(input, 1, &err); in TEST() local
197 ASSERT_TRUE(command); in TEST()
199 ASSERT_EQ(Command::Type::BSDIFF, command.type()); in TEST()
200 ASSERT_EQ(1, command.index()); in TEST()
201 ASSERT_EQ(input, command.cmdline()); in TEST()
205 command.target()); in TEST()
208 command.source()); in TEST()
209 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
210 ASSERT_EQ(PatchInfo(0, 148), command.patch()); in TEST()
216 Command command = Command::Parse(input, 2, &err); in TEST() local
217 ASSERT_TRUE(command); in TEST()
219 ASSERT_EQ(Command::Type::ERASE, command.type()); in TEST()
220 ASSERT_EQ(2, command.index()); in TEST()
221 ASSERT_EQ(input, command.cmdline()); in TEST()
223 ASSERT_EQ(TargetInfo("unknown-hash", RangeSet({ { 5, 10 } })), command.target()); in TEST()
224 ASSERT_EQ(SourceInfo(), command.source()); in TEST()
225 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
226 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()
232 Command command = Command::Parse(input, 3, &err); in TEST() local
233 ASSERT_TRUE(command); in TEST()
235 ASSERT_EQ(Command::Type::FREE, command.type()); in TEST()
236 ASSERT_EQ(3, command.index()); in TEST()
237 ASSERT_EQ(input, command.cmdline()); in TEST()
239 ASSERT_EQ(TargetInfo(), command.target()); in TEST()
240 ASSERT_EQ(SourceInfo(), command.source()); in TEST()
241 ASSERT_EQ(StashInfo("hash1", RangeSet()), command.stash()); in TEST()
242 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()
253 Command command = Command::Parse(input, 4, &err); in TEST() local
254 ASSERT_TRUE(command); in TEST()
256 ASSERT_EQ(Command::Type::IMGDIFF, command.type()); in TEST()
257 ASSERT_EQ(4, command.index()); in TEST()
258 ASSERT_EQ(input, command.cmdline()); in TEST()
261 command.target()); in TEST()
264 command.source()); in TEST()
265 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
266 ASSERT_EQ(PatchInfo(29629269, 185), command.patch()); in TEST()
275 Command command = Command::Parse(input, 5, &err); in TEST() local
276 ASSERT_TRUE(command); in TEST()
278 ASSERT_EQ(Command::Type::MOVE, command.type()); in TEST()
279 ASSERT_EQ(5, command.index()); in TEST()
280 ASSERT_EQ(input, command.cmdline()); in TEST()
284 command.target()); in TEST()
287 command.source()); in TEST()
288 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
289 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()
295 Command command = Command::Parse(input, 6, &err); in TEST() local
296 ASSERT_TRUE(command); in TEST()
298 ASSERT_EQ(Command::Type::NEW, command.type()); in TEST()
299 ASSERT_EQ(6, command.index()); in TEST()
300 ASSERT_EQ(input, command.cmdline()); in TEST()
302 ASSERT_EQ(TargetInfo("unknown-hash", RangeSet({ { 3, 5 }, { 10, 12 } })), command.target()); in TEST()
303 ASSERT_EQ(SourceInfo(), command.source()); in TEST()
304 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
305 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()
311 Command command = Command::Parse(input, 7, &err); in TEST() local
312 ASSERT_TRUE(command); in TEST()
314 ASSERT_EQ(Command::Type::STASH, command.type()); in TEST()
315 ASSERT_EQ(7, command.index()); in TEST()
316 ASSERT_EQ(input, command.cmdline()); in TEST()
318 ASSERT_EQ(TargetInfo(), command.target()); in TEST()
319 ASSERT_EQ(SourceInfo(), command.source()); in TEST()
320 ASSERT_EQ(StashInfo("hash1", RangeSet({ { 5, 10 } })), command.stash()); in TEST()
321 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()
327 Command command = Command::Parse(input, 8, &err); in TEST() local
328 ASSERT_TRUE(command); in TEST()
330 ASSERT_EQ(Command::Type::ZERO, command.type()); in TEST()
331 ASSERT_EQ(8, command.index()); in TEST()
332 ASSERT_EQ(input, command.cmdline()); in TEST()
334 ASSERT_EQ(TargetInfo("unknown-hash", RangeSet({ { 1, 5 } })), command.target()); in TEST()
335 ASSERT_EQ(SourceInfo(), command.source()); in TEST()
336 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
337 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()
343 Command command = Command::Parse(input, 9, &err); in TEST() local
344 ASSERT_TRUE(command); in TEST()
346 ASSERT_EQ(Command::Type::COMPUTE_HASH_TREE, command.type()); in TEST()
347 ASSERT_EQ(9, command.index()); in TEST()
348 ASSERT_EQ(input, command.cmdline()); in TEST()
352 ASSERT_EQ(expected_info, command.hash_tree_info()); in TEST()
353 ASSERT_EQ(TargetInfo(), command.target()); in TEST()
354 ASSERT_EQ(SourceInfo(), command.source()); in TEST()
355 ASSERT_EQ(StashInfo(), command.stash()); in TEST()
356 ASSERT_EQ(PatchInfo(), command.patch()); in TEST()