summaryrefslogtreecommitdiff
path: root/absl/container/btree_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/btree_test.cc')
-rw-r--r--absl/container/btree_test.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/container/btree_test.cc b/absl/container/btree_test.cc
index 6a5351fe..e6d4e360 100644
--- a/absl/container/btree_test.cc
+++ b/absl/container/btree_test.cc
@@ -3340,6 +3340,14 @@ TEST(Btree, IteratorSubtraction) {
}
}
+#ifndef NDEBUG
+TEST(Btree, DereferencingEndIterator) {
+ absl::btree_set<int> set;
+ for (int i = 0; i < 1000; ++i) set.insert(i);
+ EXPECT_DEATH(*set.end(), R"regex(Dereferencing end\(\) iterator)regex");
+}
+#endif
+
} // namespace
} // namespace container_internal
ABSL_NAMESPACE_END