Merge pull request #20357 from vjpai/test_macros

Stop using deprecated gtest macros
pull/20363/head
Vijay Pai 5 years ago committed by GitHub
commit 0ce673e8cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      test/core/channel/channelz_test.cc
  2. 4
      test/core/debug/stats_test.cc
  3. 3
      test/core/end2end/h2_ssl_cert_test.cc
  4. 6
      test/core/transport/bdp_estimator_test.cc
  5. 2
      test/core/transport/pid_controller_test.cc
  6. 2
      test/core/util/fuzzer_corpus_test.cc
  7. 4
      test/cpp/common/time_jump_test.cc
  8. 11
      test/cpp/end2end/async_end2end_test.cc
  9. 4
      test/cpp/end2end/cfstream_test.cc
  10. 4
      test/cpp/end2end/client_callback_end2end_test.cc
  11. 10
      test/cpp/end2end/end2end_test.cc
  12. 4
      test/cpp/end2end/flaky_network_test.cc
  13. 4
      test/cpp/end2end/hybrid_end2end_test.cc
  14. 12
      test/cpp/end2end/message_allocator_end2end_test.cc
  15. 4
      test/cpp/end2end/port_sharing_end2end_test.cc
  16. 4
      test/cpp/end2end/server_builder_plugin_test.cc
  17. 4
      test/cpp/end2end/shutdown_test.cc

@ -533,8 +533,8 @@ TEST_F(ChannelzRegistryBasedTest, ManyServersTest) {
ValidateGetServers(10);
}
INSTANTIATE_TEST_CASE_P(ChannelzChannelTestSweep, ChannelzChannelTest,
::testing::Values(0, 8, 64, 1024, 1024 * 1024));
INSTANTIATE_TEST_SUITE_P(ChannelzChannelTestSweep, ChannelzChannelTest,
::testing::Values(0, 8, 64, 1024, 1024 * 1024));
} // namespace testing
} // namespace channelz

@ -135,8 +135,8 @@ TEST_P(HistogramTest, IncHistogram) {
}
}
INSTANTIATE_TEST_CASE_P(HistogramTestCases, HistogramTest,
::testing::Range<int>(0, GRPC_STATS_HISTOGRAM_COUNT));
INSTANTIATE_TEST_SUITE_P(HistogramTestCases, HistogramTest,
::testing::Range<int>(0, GRPC_STATS_HISTOGRAM_COUNT));
} // namespace testing
} // namespace grpc

@ -346,7 +346,8 @@ TEST_P(H2SslCertTest, SimpleRequestBody) {
simple_request_body(fixture_, GetParam().result);
}
INSTANTIATE_TEST_CASE_P(H2SslCert, H2SslCertTest, ::testing::ValuesIn(configs));
INSTANTIATE_TEST_SUITE_P(H2SslCert, H2SslCertTest,
::testing::ValuesIn(configs));
} // namespace testing
} // namespace grpc

@ -131,9 +131,9 @@ TEST_P(BdpEstimatorRandomTest, GetEstimateRandomValues) {
}
}
INSTANTIATE_TEST_CASE_P(TooManyNames, BdpEstimatorRandomTest,
::testing::Values(3, 4, 6, 9, 13, 19, 28, 42, 63, 94,
141, 211, 316, 474, 711));
INSTANTIATE_TEST_SUITE_P(TooManyNames, BdpEstimatorRandomTest,
::testing::Values(3, 4, 6, 9, 13, 19, 28, 42, 63, 94,
141, 211, 316, 474, 711));
} // namespace testing
} // namespace grpc_core

@ -75,7 +75,7 @@ TEST_P(SimpleConvergenceTest, Converges) {
}
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
X, SimpleConvergenceTest,
::testing::Values(SimpleConvergenceTestArgs{0.2, 0, 0, 1, 100, 0},
SimpleConvergenceTestArgs{0.2, 0.1, 0, 1, 100, 0},

@ -140,7 +140,7 @@ ExampleGenerator::End() const {
return new ExampleIterator(*this, examples_.end());
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
CorpusExamples, FuzzerCorpusTest,
::testing::internal::ParamGenerator<std::string>(new ExampleGenerator));

@ -75,8 +75,8 @@ class TimeJumpTest : public ::testing::TestWithParam<std::string> {
std::vector<std::string> CreateTestScenarios() {
return {"-1M", "+1M", "-1H", "+1H", "-1d", "+1d", "-1y", "+1y"};
}
INSTANTIATE_TEST_CASE_P(TimeJump, TimeJumpTest,
::testing::ValuesIn(CreateTestScenarios()));
INSTANTIATE_TEST_SUITE_P(TimeJump, TimeJumpTest,
::testing::ValuesIn(CreateTestScenarios()));
TEST_P(TimeJumpTest, TimerRunning) {
grpc_core::ExecCtx exec_ctx;

@ -1875,11 +1875,12 @@ std::vector<TestScenario> CreateTestScenarios(bool test_secure,
return scenarios;
}
INSTANTIATE_TEST_CASE_P(AsyncEnd2end, AsyncEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(true, true)));
INSTANTIATE_TEST_CASE_P(AsyncEnd2endServerTryCancel,
AsyncEnd2endServerTryCancelTest,
::testing::ValuesIn(CreateTestScenarios(false, false)));
INSTANTIATE_TEST_SUITE_P(AsyncEnd2end, AsyncEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(true, true)));
INSTANTIATE_TEST_SUITE_P(AsyncEnd2endServerTryCancel,
AsyncEnd2endServerTryCancelTest,
::testing::ValuesIn(CreateTestScenarios(false,
false)));
} // namespace
} // namespace testing

@ -324,8 +324,8 @@ std::vector<TestScenario> CreateTestScenarios() {
return scenarios;
}
INSTANTIATE_TEST_CASE_P(CFStreamTest, CFStreamTest,
::testing::ValuesIn(CreateTestScenarios()));
INSTANTIATE_TEST_SUITE_P(CFStreamTest, CFStreamTest,
::testing::ValuesIn(CreateTestScenarios()));
// gRPC should automatically detech network flaps (without enabling keepalives)
// when CFStream is enabled

@ -1375,8 +1375,8 @@ std::vector<TestScenario> CreateTestScenarios(bool test_insecure) {
return scenarios;
}
INSTANTIATE_TEST_CASE_P(ClientCallbackEnd2endTest, ClientCallbackEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(true)));
INSTANTIATE_TEST_SUITE_P(ClientCallbackEnd2endTest, ClientCallbackEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(true)));
} // namespace
} // namespace testing

@ -2251,23 +2251,23 @@ std::vector<TestScenario> CreateTestScenarios(bool use_proxy,
return scenarios;
}
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
End2end, End2endTest,
::testing::ValuesIn(CreateTestScenarios(false, true, true, true, true)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
End2endServerTryCancel, End2endServerTryCancelTest,
::testing::ValuesIn(CreateTestScenarios(false, true, true, true, true)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
ProxyEnd2end, ProxyEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(true, true, true, true, true)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
SecureEnd2end, SecureEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(false, false, true, false, true)));
INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
ResourceQuotaEnd2end, ResourceQuotaEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(false, true, true, true, true)));

@ -344,8 +344,8 @@ std::vector<TestScenario> CreateTestScenarios() {
return scenarios;
}
INSTANTIATE_TEST_CASE_P(FlakyNetworkTest, FlakyNetworkTest,
::testing::ValuesIn(CreateTestScenarios()));
INSTANTIATE_TEST_SUITE_P(FlakyNetworkTest, FlakyNetworkTest,
::testing::ValuesIn(CreateTestScenarios()));
// Network interface connected to server flaps
TEST_P(FlakyNetworkTest, NetworkTransition) {

@ -962,8 +962,8 @@ TEST_F(HybridEnd2endTest, GenericMethodWithoutGenericService) {
EXPECT_EQ(nullptr, server_.get());
}
INSTANTIATE_TEST_CASE_P(HybridEnd2endTest, HybridEnd2endTest,
::testing::Bool());
INSTANTIATE_TEST_SUITE_P(HybridEnd2endTest, HybridEnd2endTest,
::testing::Bool());
} // namespace
} // namespace testing

@ -400,12 +400,12 @@ std::vector<TestScenario> CreateTestScenarios(bool test_insecure) {
return scenarios;
}
INSTANTIATE_TEST_CASE_P(NullAllocatorTest, NullAllocatorTest,
::testing::ValuesIn(CreateTestScenarios(true)));
INSTANTIATE_TEST_CASE_P(SimpleAllocatorTest, SimpleAllocatorTest,
::testing::ValuesIn(CreateTestScenarios(true)));
INSTANTIATE_TEST_CASE_P(ArenaAllocatorTest, ArenaAllocatorTest,
::testing::ValuesIn(CreateTestScenarios(true)));
INSTANTIATE_TEST_SUITE_P(NullAllocatorTest, NullAllocatorTest,
::testing::ValuesIn(CreateTestScenarios(true)));
INSTANTIATE_TEST_SUITE_P(SimpleAllocatorTest, SimpleAllocatorTest,
::testing::ValuesIn(CreateTestScenarios(true)));
INSTANTIATE_TEST_SUITE_P(ArenaAllocatorTest, ArenaAllocatorTest,
::testing::ValuesIn(CreateTestScenarios(true)));
} // namespace
} // namespace testing

@ -359,8 +359,8 @@ TEST_P(PortSharingEnd2endTest, TwoHandoffPorts) {
}
}
INSTANTIATE_TEST_CASE_P(PortSharingEnd2end, PortSharingEnd2endTest,
::testing::ValuesIn(CreateTestScenarios()));
INSTANTIATE_TEST_SUITE_P(PortSharingEnd2end, PortSharingEnd2endTest,
::testing::ValuesIn(CreateTestScenarios()));
} // namespace
} // namespace testing

@ -257,8 +257,8 @@ TEST_P(ServerBuilderPluginTest, PluginWithServiceTest) {
EXPECT_TRUE(s.ok());
}
INSTANTIATE_TEST_CASE_P(ServerBuilderPluginTest, ServerBuilderPluginTest,
::testing::Values(false, true));
INSTANTIATE_TEST_SUITE_P(ServerBuilderPluginTest, ServerBuilderPluginTest,
::testing::Values(false, true));
} // namespace testing
} // namespace grpc

@ -136,8 +136,8 @@ std::vector<string> GetAllCredentialsTypeList() {
return credentials_types;
}
INSTANTIATE_TEST_CASE_P(End2EndShutdown, ShutdownTest,
::testing::ValuesIn(GetAllCredentialsTypeList()));
INSTANTIATE_TEST_SUITE_P(End2EndShutdown, ShutdownTest,
::testing::ValuesIn(GetAllCredentialsTypeList()));
// TODO(ctiller): leaked objects in this test
TEST_P(ShutdownTest, ShutdownTest) {

Loading…
Cancel
Save