aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorJordan Bayles <jophba@chromium.org>2020-11-24 23:34:53 -0800
committerCommit Bot <commit-bot@chromium.org>2020-11-25 07:50:09 +0000
commit9be11f7d2b44dff83dc88dff054b967a43f319cc (patch)
treebbea44b534f774d8b6102e6ae793635c8db5cffa /util
parentf5b12d69e45f9a771d7961c01a3768371be8bf6b (diff)
downloadopenscreen-9be11f7d2b44dff83dc88dff054b967a43f319cc.tar.gz
[HOTFIX] remove iOS death tests
This patch fixes an issue where google tests' lack of support of death tests on iOS causes a build failure on iOS and breaks the roller. TBR=miu@chromium.org Change-Id: I279fbe5b0633365cccf22c5316d0ef636ed7d12c Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2559716 Reviewed-by: Jordan Bayles <jophba@chromium.org> Commit-Queue: Jordan Bayles <jophba@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/flat_map_unittest.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/flat_map_unittest.cc b/util/flat_map_unittest.cc
index 92f0d5f7..17b690e1 100644
--- a/util/flat_map_unittest.cc
+++ b/util/flat_map_unittest.cc
@@ -44,7 +44,11 @@ TEST(FlatMapTest, Access) {
EXPECT_EQ("baz", kSimpleFlatMap.at(2).second);
EXPECT_EQ("", kSimpleFlatMap.at(3).second);
// The error message varies widely depending on how the test is run.
+ // NOTE: Google Test doesn't support death tests on some platforms, such
+ // as iOS.
+#if defined(GTEST_HAS_DEATH_TEST)
EXPECT_DEATH(kSimpleFlatMap.at(31337), ".*");
+#endif
}
TEST(FlatMapTest, ErasureAndEmplacement) {
@@ -57,8 +61,10 @@ TEST(FlatMapTest, ErasureAndEmplacement) {
EXPECT_NE(mutable_vector.find(-1), mutable_vector.end());
// We absolutely should fail to erase something that's not there.
+#if defined(GTEST_HAS_DEATH_TEST)
EXPECT_DEATH(mutable_vector.erase_key(12345),
".*failed to erase: element not found.*");
+#endif
}
TEST(FlatMapTest, Mutation) {