Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.
This CL moves WebRTC to the new set of APIs.
More info in [1].
This CL has been generated with this script:
declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format
[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature
Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
This commit is contained in:
committed by
Commit Bot
parent
12e5d392cc
commit
c84f661b10
@ -323,8 +323,8 @@ TEST_P(TestMultiplexAdapter, ImageIndexIncreases) {
|
||||
}
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(TestMultiplexAdapter,
|
||||
TestMultiplexAdapter,
|
||||
::testing::Bool());
|
||||
INSTANTIATE_TEST_SUITE_P(TestMultiplexAdapter,
|
||||
TestMultiplexAdapter,
|
||||
::testing::Bool());
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -96,20 +96,20 @@ class VideoEncoderDecoderInstantiationTest
|
||||
std::vector<std::unique_ptr<VideoDecoder>> decoders_;
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(MultipleEncoders,
|
||||
VideoEncoderDecoderInstantiationTest,
|
||||
::testing::Combine(::testing::Range(1, 4),
|
||||
::testing::Range(1, 2)));
|
||||
INSTANTIATE_TEST_SUITE_P(MultipleEncoders,
|
||||
VideoEncoderDecoderInstantiationTest,
|
||||
::testing::Combine(::testing::Range(1, 4),
|
||||
::testing::Range(1, 2)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(MultipleDecoders,
|
||||
VideoEncoderDecoderInstantiationTest,
|
||||
::testing::Combine(::testing::Range(1, 2),
|
||||
::testing::Range(1, 9)));
|
||||
INSTANTIATE_TEST_SUITE_P(MultipleDecoders,
|
||||
VideoEncoderDecoderInstantiationTest,
|
||||
::testing::Combine(::testing::Range(1, 2),
|
||||
::testing::Range(1, 9)));
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(MultipleEncodersDecoders,
|
||||
VideoEncoderDecoderInstantiationTest,
|
||||
::testing::Combine(::testing::Range(1, 4),
|
||||
::testing::Range(1, 9)));
|
||||
INSTANTIATE_TEST_SUITE_P(MultipleEncodersDecoders,
|
||||
VideoEncoderDecoderInstantiationTest,
|
||||
::testing::Combine(::testing::Range(1, 4),
|
||||
::testing::Range(1, 9)));
|
||||
|
||||
// TODO(brandtr): Check that the factories actually support the codecs before
|
||||
// trying to instantiate. Currently, we will just crash with a Java exception
|
||||
|
||||
@ -77,7 +77,7 @@ class VideoCodecTestParameterized
|
||||
const VideoCodecType codec_type_;
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
CodecSettings,
|
||||
VideoCodecTestParameterized,
|
||||
::testing::Combine(::testing::ValuesIn(kBitrates),
|
||||
|
||||
@ -713,9 +713,9 @@ class TemporalLayersReferenceTest : public TemporalLayersTest,
|
||||
BufferState altref_state;
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(DefaultTemporalLayersTest,
|
||||
TemporalLayersReferenceTest,
|
||||
::testing::Range(1, kMaxTemporalStreams + 1));
|
||||
INSTANTIATE_TEST_SUITE_P(DefaultTemporalLayersTest,
|
||||
TemporalLayersReferenceTest,
|
||||
::testing::Range(1, kMaxTemporalStreams + 1));
|
||||
|
||||
TEST_P(TemporalLayersReferenceTest, ValidFrameConfigs) {
|
||||
const int num_layers = GetParam();
|
||||
|
||||
@ -254,8 +254,8 @@ TEST_P(SvcRateAllocatorTestParametrizedContentType, PaddingBitrate) {
|
||||
EXPECT_EQ(allocation.GetSpatialLayerSum(2), 0UL);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(_,
|
||||
SvcRateAllocatorTestParametrizedContentType,
|
||||
::testing::Bool());
|
||||
INSTANTIATE_TEST_SUITE_P(_,
|
||||
SvcRateAllocatorTestParametrizedContentType,
|
||||
::testing::Bool());
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -1238,10 +1238,10 @@ TEST_P(TestVp9ImplWithLayering, ExternalRefControl) {
|
||||
}
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(,
|
||||
TestVp9ImplWithLayering,
|
||||
::testing::Combine(::testing::Values(1, 2, 3),
|
||||
::testing::Values(1, 2, 3)));
|
||||
INSTANTIATE_TEST_SUITE_P(,
|
||||
TestVp9ImplWithLayering,
|
||||
::testing::Combine(::testing::Values(1, 2, 3),
|
||||
::testing::Values(1, 2, 3)));
|
||||
|
||||
class TestVp9ImplFrameDropping : public TestVp9Impl {
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user