From 785a9ed0843908bcafa94415e9d08c446392e3c9 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 7 Feb 2023 11:52:10 -0800 Subject: [PATCH] unitTests: fix old API usage Found with google-upgrade-googletest-case Signed-off-by: Rosen Penev --- unitTests/test_XmpKey.cpp | 4 ++-- unitTests/test_slice.cpp | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/unitTests/test_XmpKey.cpp b/unitTests/test_XmpKey.cpp index 3693776d50..e45203c9dd 100644 --- a/unitTests/test_XmpKey.cpp +++ b/unitTests/test_XmpKey.cpp @@ -18,11 +18,11 @@ const std::string notRegisteredValidKey("Xmp.noregistered.prop"); // behavior of the XmpKey class class AXmpKey : public testing::Test { public: - static void SetUpTestCase() { + static void SetUpTestSuite() { XmpProperties::registerNs(expectedFamily, expectedPrefix); } - static void TearDownTestCase() { + static void TearDownTestSuite() { XmpProperties::unregisterNs(); } diff --git a/unitTests/test_slice.cpp b/unitTests/test_slice.cpp index 575a2bccbb..7f5231e777 100644 --- a/unitTests/test_slice.cpp +++ b/unitTests/test_slice.cpp @@ -111,8 +111,8 @@ const std::vector& get_test_data>(slice class mutableSlice : public slice {}; -TYPED_TEST_CASE_P(slice); -TYPED_TEST_CASE_P(mutableSlice); +TYPED_TEST_SUITE_P(slice); +TYPED_TEST_SUITE_P(mutableSlice); TYPED_TEST_P(slice, atAccess) { // typedef Slice slice_t; @@ -355,7 +355,7 @@ struct dataBufSlice : public ::testing::Test { template byte dataBufSlice::data[4] = {0xde, 0xad, 0xbe, 0xef}; -TYPED_TEST_CASE_P(dataBufSlice); +TYPED_TEST_SUITE_P(dataBufSlice); TYPED_TEST_P(dataBufSlice, successfulConstruction) { // just check that makeSlice appears to work @@ -375,18 +375,18 @@ TYPED_TEST_P(dataBufSlice, failedConstruction) { // // GTest boilerplate to get the tests running for all the different types // -REGISTER_TYPED_TEST_CASE_P(slice, atAccess, iteratorAccess, constructionFailsFromInvalidRange, - constructionFailsWithZeroLength, subSliceSuccessfulConstruction, subSliceFunctions, - subSliceFailedConstruction, subSliceConstructionOverflowResistance, - constMethodsPreserveConst); +REGISTER_TYPED_TEST_SUITE_P(slice, atAccess, iteratorAccess, constructionFailsFromInvalidRange, + constructionFailsWithZeroLength, subSliceSuccessfulConstruction, subSliceFunctions, + subSliceFailedConstruction, subSliceConstructionOverflowResistance, + constMethodsPreserveConst); using test_types_t = ::testing::Types, std::vector, int*, const int*>; -INSTANTIATE_TYPED_TEST_CASE_P(slice, slice, test_types_t); +INSTANTIATE_TYPED_TEST_SUITE_P(slice, slice, test_types_t); -REGISTER_TYPED_TEST_CASE_P(mutableSlice, iterators, at); +REGISTER_TYPED_TEST_SUITE_P(mutableSlice, iterators, at); using mut_test_types_t = ::testing::Types, int*>; -INSTANTIATE_TYPED_TEST_CASE_P(slice, mutableSlice, mut_test_types_t); +INSTANTIATE_TYPED_TEST_SUITE_P(slice, mutableSlice, mut_test_types_t); -REGISTER_TYPED_TEST_CASE_P(dataBufSlice, successfulConstruction, failedConstruction); +REGISTER_TYPED_TEST_SUITE_P(dataBufSlice, successfulConstruction, failedConstruction); using data_buf_types_t = ::testing::Types; -INSTANTIATE_TYPED_TEST_CASE_P(slice, dataBufSlice, data_buf_types_t); +INSTANTIATE_TYPED_TEST_SUITE_P(slice, dataBufSlice, data_buf_types_t);