| 160 | } |
| 161 | |
| 162 | void CheckAlloc(const std::vector<bool>& expected, |
| 163 | const std::vector<AllocatorAttributes>& actual) { |
| 164 | ASSERT_EQ(expected.size(), actual.size()); |
| 165 | for (int i = 0; i < expected.size(); ++i) { |
| 166 | ASSERT_EQ(expected[i], actual[i].on_host()) << " at index " << i; |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | void CheckIndex(const Node& node, int expected_index) { |
| 171 | const AttrValue* attr_value; |