class OopStorageSetTest : public ::testing::Test { protected: // Returns index of s in storages, or size if not found. template <uint count> static size_t find_storage(OopStorage* s, OopStorage* storages[count]) { for (uint i = 0; i < count; ++i) { if (s == storages[i]) { return i;
}
} return count;
}
template <uint count, typename Range> staticvoid check_iteration(Range range, OopStorage* storages[count]) {
ASSERT_EQ(range.size(), count); for (auto id : range) {
OopStorage* storage = OopStorageSet::storage(id);
size_t index = find_storage<count>(storage, storages);
ASSERT_LT(index, count);
storages[index] = nullptr;
} for (uint i = 0; i < count; ++i) {
ASSERT_EQ(nullptr /* null_storage */, storages[i]);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.