Fully qualify googletest symbols.

Semi-automatically created with:

git grep -l " testing::" | xargs sed -i "s/ testing::/ ::testing::/g"
git grep -l "(testing::" | xargs sed -i "s/(testing::/(::testing::/g"
git cl format

After this, two .cc files failed to compile and I have fixed them
manually.

Bug: webrtc:10523
Change-Id: I4741d3bcedc831b6c5fdc04485678617eb4ce031
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132018
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27526}
This commit is contained in:
Mirko Bonadei
2019-04-09 15:11:12 +02:00
committed by Commit Bot
parent a857698d54
commit 6a489f22c7
210 changed files with 818 additions and 808 deletions

View File

@ -66,7 +66,7 @@ struct AudioDecoderFakeApi {
absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
auto dec = absl::make_unique<testing::StrictMock<MockAudioDecoder>>();
EXPECT_CALL(*dec, SampleRateHz())
.WillOnce(testing::Return(Params::CodecInfo().sample_rate_hz));
.WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz));
EXPECT_CALL(*dec, Die());
return std::move(dec);
}
@ -78,7 +78,7 @@ TEST(AudioDecoderFactoryTemplateTest, NoDecoderTypes) {
rtc::scoped_refptr<AudioDecoderFactory> factory(
new rtc::RefCountedObject<
audio_decoder_factory_template_impl::AudioDecoderFactoryT<>>());
EXPECT_THAT(factory->GetSupportedDecoders(), testing::IsEmpty());
EXPECT_THAT(factory->GetSupportedDecoders(), ::testing::IsEmpty());
EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
EXPECT_EQ(nullptr,
factory->MakeAudioDecoder({"bar", 16000, 1}, absl::nullopt));
@ -87,7 +87,7 @@ TEST(AudioDecoderFactoryTemplateTest, NoDecoderTypes) {
TEST(AudioDecoderFactoryTemplateTest, OneDecoderType) {
auto factory = CreateAudioDecoderFactory<AudioDecoderFakeApi<BogusParams>>();
EXPECT_THAT(factory->GetSupportedDecoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}}));
EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
EXPECT_TRUE(factory->IsSupportedDecoder({"bogus", 8000, 1}));
@ -102,7 +102,7 @@ TEST(AudioDecoderFactoryTemplateTest, TwoDecoderTypes) {
auto factory = CreateAudioDecoderFactory<AudioDecoderFakeApi<BogusParams>,
AudioDecoderFakeApi<ShamParams>>();
EXPECT_THAT(factory->GetSupportedDecoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}},
AudioCodecSpec{{"sham", 16000, 2, {{"param", "value"}}},
{16000, 2, 23456}}));
@ -126,7 +126,7 @@ TEST(AudioDecoderFactoryTemplateTest, TwoDecoderTypes) {
TEST(AudioDecoderFactoryTemplateTest, G711) {
auto factory = CreateAudioDecoderFactory<AudioDecoderG711>();
EXPECT_THAT(factory->GetSupportedDecoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"PCMU", 8000, 1}, {8000, 1, 64000}},
AudioCodecSpec{{"PCMA", 8000, 1}, {8000, 1, 64000}}));
EXPECT_FALSE(factory->IsSupportedDecoder({"G711", 8000, 1}));
@ -145,7 +145,7 @@ TEST(AudioDecoderFactoryTemplateTest, G711) {
TEST(AudioDecoderFactoryTemplateTest, G722) {
auto factory = CreateAudioDecoderFactory<AudioDecoderG722>();
EXPECT_THAT(factory->GetSupportedDecoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"G722", 8000, 1}, {16000, 1, 64000}}));
EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
EXPECT_TRUE(factory->IsSupportedDecoder({"G722", 8000, 1}));
@ -166,7 +166,7 @@ TEST(AudioDecoderFactoryTemplateTest, G722) {
TEST(AudioDecoderFactoryTemplateTest, Ilbc) {
auto factory = CreateAudioDecoderFactory<AudioDecoderIlbc>();
EXPECT_THAT(factory->GetSupportedDecoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"ILBC", 8000, 1}, {8000, 1, 13300}}));
EXPECT_FALSE(factory->IsSupportedDecoder({"foo", 8000, 1}));
EXPECT_TRUE(factory->IsSupportedDecoder({"ilbc", 8000, 1}));
@ -180,7 +180,7 @@ TEST(AudioDecoderFactoryTemplateTest, Ilbc) {
TEST(AudioDecoderFactoryTemplateTest, IsacFix) {
auto factory = CreateAudioDecoderFactory<AudioDecoderIsacFix>();
EXPECT_THAT(factory->GetSupportedDecoders(),
testing::ElementsAre(AudioCodecSpec{
::testing::ElementsAre(AudioCodecSpec{
{"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}}));
EXPECT_FALSE(factory->IsSupportedDecoder({"isac", 16000, 2}));
EXPECT_TRUE(factory->IsSupportedDecoder({"isac", 16000, 1}));
@ -196,7 +196,7 @@ TEST(AudioDecoderFactoryTemplateTest, IsacFloat) {
auto factory = CreateAudioDecoderFactory<AudioDecoderIsacFloat>();
EXPECT_THAT(
factory->GetSupportedDecoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}},
AudioCodecSpec{{"ISAC", 32000, 1}, {32000, 1, 56000, 10000, 56000}}));
EXPECT_FALSE(factory->IsSupportedDecoder({"isac", 16000, 2}));
@ -216,7 +216,7 @@ TEST(AudioDecoderFactoryTemplateTest, L16) {
auto factory = CreateAudioDecoderFactory<AudioDecoderL16>();
EXPECT_THAT(
factory->GetSupportedDecoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"L16", 8000, 1}, {8000, 1, 8000 * 16}},
AudioCodecSpec{{"L16", 16000, 1}, {16000, 1, 16000 * 16}},
AudioCodecSpec{{"L16", 32000, 1}, {32000, 1, 32000 * 16}},
@ -241,7 +241,7 @@ TEST(AudioDecoderFactoryTemplateTest, Opus) {
const SdpAudioFormat opus_format(
{"opus", 48000, 2, {{"minptime", "10"}, {"useinbandfec", "1"}}});
EXPECT_THAT(factory->GetSupportedDecoders(),
testing::ElementsAre(AudioCodecSpec{opus_format, opus_info}));
::testing::ElementsAre(AudioCodecSpec{opus_format, opus_info}));
EXPECT_FALSE(factory->IsSupportedDecoder({"opus", 48000, 1}));
EXPECT_TRUE(factory->IsSupportedDecoder({"opus", 48000, 2}));
EXPECT_EQ(nullptr,

View File

@ -67,7 +67,7 @@ struct AudioEncoderFakeApi {
absl::optional<AudioCodecPairId> /*codec_pair_id*/ = absl::nullopt) {
auto enc = absl::make_unique<testing::StrictMock<MockAudioEncoder>>();
EXPECT_CALL(*enc, SampleRateHz())
.WillOnce(testing::Return(Params::CodecInfo().sample_rate_hz));
.WillOnce(::testing::Return(Params::CodecInfo().sample_rate_hz));
return std::move(enc);
}
};
@ -78,7 +78,7 @@ TEST(AudioEncoderFactoryTemplateTest, NoEncoderTypes) {
rtc::scoped_refptr<AudioEncoderFactory> factory(
new rtc::RefCountedObject<
audio_encoder_factory_template_impl::AudioEncoderFactoryT<>>());
EXPECT_THAT(factory->GetSupportedEncoders(), testing::IsEmpty());
EXPECT_THAT(factory->GetSupportedEncoders(), ::testing::IsEmpty());
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
EXPECT_EQ(nullptr,
factory->MakeAudioEncoder(17, {"bar", 16000, 1}, absl::nullopt));
@ -87,7 +87,7 @@ TEST(AudioEncoderFactoryTemplateTest, NoEncoderTypes) {
TEST(AudioEncoderFactoryTemplateTest, OneEncoderType) {
auto factory = CreateAudioEncoderFactory<AudioEncoderFakeApi<BogusParams>>();
EXPECT_THAT(factory->GetSupportedEncoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}}));
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
EXPECT_EQ(AudioCodecInfo(8000, 1, 12345),
@ -103,7 +103,7 @@ TEST(AudioEncoderFactoryTemplateTest, TwoEncoderTypes) {
auto factory = CreateAudioEncoderFactory<AudioEncoderFakeApi<BogusParams>,
AudioEncoderFakeApi<ShamParams>>();
EXPECT_THAT(factory->GetSupportedEncoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"bogus", 8000, 1}, {8000, 1, 12345}},
AudioCodecSpec{{"sham", 16000, 2, {{"param", "value"}}},
{16000, 2, 23456}}));
@ -129,7 +129,7 @@ TEST(AudioEncoderFactoryTemplateTest, TwoEncoderTypes) {
TEST(AudioEncoderFactoryTemplateTest, G711) {
auto factory = CreateAudioEncoderFactory<AudioEncoderG711>();
EXPECT_THAT(factory->GetSupportedEncoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"PCMU", 8000, 1}, {8000, 1, 64000}},
AudioCodecSpec{{"PCMA", 8000, 1}, {8000, 1, 64000}}));
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"PCMA", 16000, 1}));
@ -148,7 +148,7 @@ TEST(AudioEncoderFactoryTemplateTest, G711) {
TEST(AudioEncoderFactoryTemplateTest, G722) {
auto factory = CreateAudioEncoderFactory<AudioEncoderG722>();
EXPECT_THAT(factory->GetSupportedEncoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"G722", 8000, 1}, {16000, 1, 64000}}));
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
EXPECT_EQ(AudioCodecInfo(16000, 1, 64000),
@ -163,7 +163,7 @@ TEST(AudioEncoderFactoryTemplateTest, G722) {
TEST(AudioEncoderFactoryTemplateTest, Ilbc) {
auto factory = CreateAudioEncoderFactory<AudioEncoderIlbc>();
EXPECT_THAT(factory->GetSupportedEncoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"ILBC", 8000, 1}, {8000, 1, 13333}}));
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));
EXPECT_EQ(AudioCodecInfo(8000, 1, 13333),
@ -178,7 +178,7 @@ TEST(AudioEncoderFactoryTemplateTest, Ilbc) {
TEST(AudioEncoderFactoryTemplateTest, IsacFix) {
auto factory = CreateAudioEncoderFactory<AudioEncoderIsacFix>();
EXPECT_THAT(factory->GetSupportedEncoders(),
testing::ElementsAre(AudioCodecSpec{
::testing::ElementsAre(AudioCodecSpec{
{"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}}));
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"isac", 16000, 2}));
EXPECT_EQ(AudioCodecInfo(16000, 1, 32000, 10000, 32000),
@ -200,7 +200,7 @@ TEST(AudioEncoderFactoryTemplateTest, IsacFloat) {
auto factory = CreateAudioEncoderFactory<AudioEncoderIsacFloat>();
EXPECT_THAT(
factory->GetSupportedEncoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"ISAC", 16000, 1}, {16000, 1, 32000, 10000, 32000}},
AudioCodecSpec{{"ISAC", 32000, 1}, {32000, 1, 56000, 10000, 56000}}));
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"isac", 16000, 2}));
@ -222,7 +222,7 @@ TEST(AudioEncoderFactoryTemplateTest, L16) {
auto factory = CreateAudioEncoderFactory<AudioEncoderL16>();
EXPECT_THAT(
factory->GetSupportedEncoders(),
testing::ElementsAre(
::testing::ElementsAre(
AudioCodecSpec{{"L16", 8000, 1}, {8000, 1, 8000 * 16}},
AudioCodecSpec{{"L16", 16000, 1}, {16000, 1, 16000 * 16}},
AudioCodecSpec{{"L16", 32000, 1}, {32000, 1, 32000 * 16}},
@ -246,7 +246,7 @@ TEST(AudioEncoderFactoryTemplateTest, Opus) {
info.supports_network_adaption = true;
EXPECT_THAT(
factory->GetSupportedEncoders(),
testing::ElementsAre(AudioCodecSpec{
::testing::ElementsAre(AudioCodecSpec{
{"opus", 48000, 2, {{"minptime", "10"}, {"useinbandfec", "1"}}},
info}));
EXPECT_EQ(absl::nullopt, factory->QueryAudioEncoder({"foo", 8000, 1}));