| 674 | vector<Operation> operations; |
| 675 | |
| 676 | foreach (const Log::Entry& entry, entries.get()) { |
| 677 | // Parse the Operation from the Log::Entry. |
| 678 | Operation operation; |
| 679 | |
| 680 | google::protobuf::io::ArrayInputStream stream( |
| 681 | entry.data.data(), |
| 682 | entry.data.size()); |
| 683 | |
| 684 | ASSERT_TRUE(operation.ParseFromZeroCopyStream(&stream)); |
| 685 | |
| 686 | operations.push_back(operation); |
| 687 | } |
| 688 | |
| 689 | ASSERT_EQ(2u, operations.size()); |
| 690 | EXPECT_EQ(Operation::SNAPSHOT, operations[0].type()); |