From 5c788c2dd5d976e69c2a4101b2bf9081c7713553 Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Tue, 22 Sep 2015 16:17:22 -0700 Subject: [PATCH] Use StrEq for string comparison in mpd notifier unittests Change-Id: I9960908764aea29adbe8feae2a71359f9ff4ecee --- packager/mpd/base/dash_iop_mpd_notifier_unittest.cc | 3 ++- packager/mpd/base/mock_mpd_notifier.h | 2 +- packager/mpd/base/simple_mpd_notifier_unittest.cc | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packager/mpd/base/dash_iop_mpd_notifier_unittest.cc b/packager/mpd/base/dash_iop_mpd_notifier_unittest.cc index ac89222869..e01a2a03c4 100644 --- a/packager/mpd/base/dash_iop_mpd_notifier_unittest.cc +++ b/packager/mpd/base/dash_iop_mpd_notifier_unittest.cc @@ -20,6 +20,7 @@ using ::testing::_; using ::testing::Eq; using ::testing::InSequence; using ::testing::Return; +using ::testing::StrEq; namespace { @@ -719,7 +720,7 @@ TEST_P(DashIopMpdNotifierTest, UpdateEncryption) { const char kBogusNewPsshInBase64[] = "cHNzaHNvbWV0aGluZ2Vsc2U="; EXPECT_CALL(*default_mock_adaptation_set_, - UpdateContentProtectionPssh(kBogusNewPsshInBase64)); + UpdateContentProtectionPssh(StrEq(kBogusNewPsshInBase64))); EXPECT_TRUE(notifier.NotifyEncryptionUpdate( container_id, std::vector(), kBogusNewPsshVector)); } diff --git a/packager/mpd/base/mock_mpd_notifier.h b/packager/mpd/base/mock_mpd_notifier.h index c0293e4986..70bce62f89 100644 --- a/packager/mpd/base/mock_mpd_notifier.h +++ b/packager/mpd/base/mock_mpd_notifier.h @@ -19,7 +19,7 @@ namespace edash_packager { class MockMpdNotifier : public MpdNotifier { public: MockMpdNotifier(DashProfile profile); - virtual ~MockMpdNotifier() OVERRIDE; + virtual ~MockMpdNotifier(); MOCK_METHOD0(Init, bool()); MOCK_METHOD2(NotifyNewContainer, diff --git a/packager/mpd/base/simple_mpd_notifier_unittest.cc b/packager/mpd/base/simple_mpd_notifier_unittest.cc index 58e450f2c9..7cd169e78f 100644 --- a/packager/mpd/base/simple_mpd_notifier_unittest.cc +++ b/packager/mpd/base/simple_mpd_notifier_unittest.cc @@ -18,6 +18,7 @@ namespace edash_packager { using ::testing::_; using ::testing::Return; +using ::testing::StrEq; namespace { const char kValidMediaInfo[] = @@ -285,7 +286,7 @@ TEST_P(SimpleMpdNotifierTest, UpdateEncryption) { const char kBogusNewPsshInBase64[] = "cHNzaHNvbWV0aGluZ2Vsc2U="; EXPECT_CALL(*mock_representation, - UpdateContentProtectionPssh(kBogusNewPsshInBase64)); + UpdateContentProtectionPssh(StrEq(kBogusNewPsshInBase64))); EXPECT_TRUE(notifier.NotifyEncryptionUpdate( container_id, std::vector(), kBogusNewPsshVector)); }