From 77415f561d9fe96c2c1149e9f59735d1ebe8f34e Mon Sep 17 00:00:00 2001 From: philipel Date: Thu, 27 Jul 2017 04:37:18 -0700 Subject: [PATCH] Revert of Disable SeqNumUnwrapper death tests to avoid breaking downstream builds. (patchset #1 id:1 of https://codereview.chromium.org/2985083002/ ) Reason for revert: Creating revert to fix these tests. Original issue's description: > Disable SeqNumUnwrapper death tests to avoid breaking downstream builds. > > BUG=None > TBR=stefan@webrtc.org > NOTRY=true > > Review-Url: https://codereview.webrtc.org/2985083002 > Cr-Commit-Position: refs/heads/master@{#19155} > Committed: https://chromium.googlesource.com/external/webrtc/+/8e245561f21aeef2ac99cf3752b060f56d4d5357 TBR=stefan@webrtc.org BUG=None Review-Url: https://codereview.webrtc.org/2992643002 Cr-Commit-Position: refs/heads/master@{#19166} --- .../video_coding/sequence_number_util_unittest.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/webrtc/modules/video_coding/sequence_number_util_unittest.cc b/webrtc/modules/video_coding/sequence_number_util_unittest.cc index 6988b3e827..e0db1a8a5f 100644 --- a/webrtc/modules/video_coding/sequence_number_util_unittest.cc +++ b/webrtc/modules/video_coding/sequence_number_util_unittest.cc @@ -209,25 +209,27 @@ TEST_F(TestSeqNumUtil, SeqNumComparatorWithDivisor) { } } -// TODO(philipel): Enable when downstream project can hande these death tests. - -TEST(SeqNumUnwrapper, DISABLED_NoBackWardWrap) { +#if GTEST_HAS_DEATH_TEST +#if !defined(WEBRTC_ANDROID) +TEST(SeqNumUnwrapper, NoBackWardWrap) { SeqNumUnwrapper unwrapper; EXPECT_EQ(0U, unwrapper.Unwrap(0)); // The unwrapped sequence is not allowed to wrap, if that happens the // SeqNumUnwrapper should have been constructed with a higher start value. - ASSERT_DEATH_IF_SUPPORTED(unwrapper.Unwrap(255), ""); + EXPECT_DEATH(unwrapper.Unwrap(255), ""); } -TEST(SeqNumUnwrapper, DISABLED_NoForwardWrap) { +TEST(SeqNumUnwrapper, NoForwardWrap) { SeqNumUnwrapper unwrapper(std::numeric_limits::max()); EXPECT_EQ(std::numeric_limits::max(), unwrapper.Unwrap(0)); // The unwrapped sequence is not allowed to wrap, if that happens the // SeqNumUnwrapper should have been constructed with a lower start value. - ASSERT_DEATH_IF_SUPPORTED(unwrapper.Unwrap(1), ""); + EXPECT_DEATH(unwrapper.Unwrap(1), ""); } +#endif +#endif TEST(SeqNumUnwrapper, ForwardWrap) { SeqNumUnwrapper unwrapper;