Home | History | Annotate | Download | only in tests

Lines Matching defs:keys

64   // As gtest uses pthread keys, we can't allocate exactly PTHREAD_KEYS_MAX
65 // pthread keys, but We should be able to allocate at least this many keys.
67 std::vector<pthread_key_t> keys;
69 auto scope_guard = make_scope_guard([&keys]{
70 for (auto key : keys) {
79 keys.push_back(key);
83 for (int i = keys.size() - 1; i >= 0; --i) {
84 ASSERT_EQ(reinterpret_cast<void*>(i), pthread_getspecific(keys.back()));
85 pthread_key_t key = keys.back();
86 keys.pop_back();
92 std::vector<pthread_key_t> keys;
95 // Pthread keys are used by gtest, so PTHREAD_KEYS_MAX should
104 keys.push_back(key);
107 // Don't leak keys.
108 for (auto key : keys) {
111 keys.clear();
113 // We should have eventually reached the maximum number of keys and received