h.add(i);
uptr tag = h.get() % 256;
StackTrace s(frames.data(), size, tag);
+ if (!s.size && !s.tag)
+ continue;
fn(s);
std::next_permutation(frames.begin(), frames.end());
};
StackStore store_ = {};
};
+TEST_F(StackStoreTest, Empty) {
+ uptr before = store_.Allocated();
+ EXPECT_EQ(0u, store_.Store({}));
+ uptr after = store_.Allocated();
+ EXPECT_EQ(before, after);
+}
+
TEST_F(StackStoreTest, Basic) {
std::vector<StackStore::Id> ids;
ForEachTrace([&](const StackTrace& s) { ids.push_back(store_.Store(s)); });