From 3e41f2585cefaef1d37f76224cdd8e8908c529da Mon Sep 17 00:00:00 2001 From: rsgowman Date: Mon, 12 Mar 2018 16:35:40 -0400 Subject: Fix test failures that occur during prod build (#910) * Fix ArraySortedMap.ChecksSize test (when NDEBUG is enabled) assert() is a noop when NDEBUG is defined (i.e. during production builds) so the size assertion check doesn't occur. Assuming we want this check even during prod use, I've switched assert to FIREBASE_ASSERT. * s/FIREBASE_ASSERT/FIREBASE_DEV_ASSERT/g in ordered_code.cc This keeps the behaviour in line with the original (which purposely differs if NDEBUG is defined or not.) Discovered due to the test suite (correctly) breaking during a prod build. --- .../core/test/firebase/firestore/immutable/array_sorted_map_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Firestore/core/test') diff --git a/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc b/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc index 3ec1e64..260506b 100644 --- a/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc +++ b/Firestore/core/test/firebase/firestore/immutable/array_sorted_map_test.cc @@ -244,7 +244,7 @@ TEST(ArraySortedMap, ChecksSize) { map = map.insert(5, 10); int next = kFixedSize; - ASSERT_DEATH_IF_SUPPORTED(map.insert(next, next), "new_size <= fixed_size"); + ASSERT_ANY_THROW(map.insert(next, next)); } TEST(ArraySortedMap, Empty) { -- cgit v1.2.3