Lines Matching refs:commands
57 std::vector<SessionCommand*> commands;
58 commands.push_back(CreateCommandFromData(data));
59 backend->AppendCommands(new SessionCommands(commands), false);
60 commands.clear();
65 backend->ReadLastSessionCommandsImpl(&commands);
67 ASSERT_EQ(1U, commands.size());
68 AssertCommandEqualsData(data, commands[0]);
70 STLDeleteElements(&commands);
74 backend->ReadLastSessionCommandsImpl(&commands);
76 ASSERT_EQ(0U, commands.size());
80 backend->ReadLastSessionCommandsImpl(&commands);
81 ASSERT_EQ(0U, commands.size());
104 std::vector<SessionCommand*> commands;
107 backend->ReadLastSessionCommandsImpl(&commands);
108 ASSERT_EQ(i, commands.size());
109 for (std::vector<SessionCommand*>::iterator j = commands.begin();
110 j != commands.end(); ++j) {
111 AssertCommandEqualsData(data[j - commands.begin()], *j);
113 backend->AppendCommands(new SessionCommands(commands), false);
114 commands.clear();
116 commands.push_back(CreateCommandFromData(data[i]));
117 backend->AppendCommands(new SessionCommands(commands), false);
129 std::vector<SessionCommand*> commands;
130 commands.push_back(CreateCommandFromData(data[0]));
137 commands.push_back(big_command);
138 commands.push_back(CreateCommandFromData(data[1]));
139 backend->AppendCommands(new SessionCommands(commands), false);
140 commands.clear();
144 commands.clear();
145 backend->ReadLastSessionCommandsImpl(&commands);
146 ASSERT_EQ(3U, commands.size());
147 AssertCommandEqualsData(data[0], commands[0]);
148 AssertCommandEqualsData(data[1], commands[2]);
150 EXPECT_EQ(big_id, commands[1]->id());
151 ASSERT_EQ(big_size, commands[1]->size());
152 EXPECT_EQ('a', reinterpret_cast<char*>(commands[1]->contents())[0]);
154 reinterpret_cast<char*>(commands[1]->contents())[big_size - 1]);
155 STLDeleteElements(&commands);
169 std::vector<SessionCommand*> commands;
170 backend->ReadLastSessionCommandsImpl(&commands);
171 ASSERT_EQ(1U, commands.size());
172 AssertCommandEqualsData(empty_command, commands[0]);
173 STLDeleteElements(&commands);
182 std::vector<SessionCommand*> commands;
183 commands.push_back(CreateCommandFromData(first_data));
184 backend->AppendCommands(new SessionCommands(commands), false);
185 commands.clear();
189 commands.push_back(CreateCommandFromData(second_data));
190 backend->AppendCommands(new SessionCommands(commands), true);
191 commands.clear();
196 backend->ReadLastSessionCommandsImpl(&commands);
199 ASSERT_EQ(1U, commands.size());
200 AssertCommandEqualsData(second_data, commands[0]);
202 STLDeleteElements(&commands);