Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/OpenNMT/CTranslate2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Klein <guillaumekln@users.noreply.github.com>2022-09-28 13:27:16 +0300
committerGitHub <noreply@github.com>2022-09-28 13:27:16 +0300
commitb71317497417b122789b8c568915b3f94b68d33f (patch)
tree203fe8727c5a9477cf3bf3c1877c43e757df0208 /tests
parent4b2e8fd9dd1dacf9a22cf26092470ce0de153c9c (diff)
Update deprecated GoogleTest macro (#924)
Diffstat (limited to 'tests')
-rw-r--r--tests/ops_test.cc18
-rw-r--r--tests/primitives_test.cc4
-rw-r--r--tests/storage_view_test.cc4
-rw-r--r--tests/translator_test.cc18
4 files changed, 22 insertions, 22 deletions
diff --git a/tests/ops_test.cc b/tests/ops_test.cc
index 481d319e..9d56a971 100644
--- a/tests/ops_test.cc
+++ b/tests/ops_test.cc
@@ -832,14 +832,14 @@ static std::string fp_test_name(::testing::TestParamInfo<std::pair<Device, DataT
return dtype_name(param_info.param.second);
}
-INSTANTIATE_TEST_CASE_P(CPU, OpDeviceTest, ::testing::Values(Device::CPU));
-INSTANTIATE_TEST_CASE_P(CPU, OpDeviceFPTest,
- ::testing::Values(std::make_pair(Device::CPU, DataType::FLOAT)),
- fp_test_name);
+INSTANTIATE_TEST_SUITE_P(CPU, OpDeviceTest, ::testing::Values(Device::CPU));
+INSTANTIATE_TEST_SUITE_P(CPU, OpDeviceFPTest,
+ ::testing::Values(std::make_pair(Device::CPU, DataType::FLOAT)),
+ fp_test_name);
#ifdef CT2_WITH_CUDA
-INSTANTIATE_TEST_CASE_P(CUDA, OpDeviceTest, ::testing::Values(Device::CUDA));
-INSTANTIATE_TEST_CASE_P(CUDA, OpDeviceFPTest,
- ::testing::Values(std::make_pair(Device::CUDA, DataType::FLOAT),
- std::make_pair(Device::CUDA, DataType::FLOAT16)),
- fp_test_name);
+INSTANTIATE_TEST_SUITE_P(CUDA, OpDeviceTest, ::testing::Values(Device::CUDA));
+INSTANTIATE_TEST_SUITE_P(CUDA, OpDeviceFPTest,
+ ::testing::Values(std::make_pair(Device::CUDA, DataType::FLOAT),
+ std::make_pair(Device::CUDA, DataType::FLOAT16)),
+ fp_test_name);
#endif
diff --git a/tests/primitives_test.cc b/tests/primitives_test.cc
index 5b2fedc5..6114ca66 100644
--- a/tests/primitives_test.cc
+++ b/tests/primitives_test.cc
@@ -43,7 +43,7 @@ TEST_P(PrimitiveTest, PenalizePreviousTokens) {
expect_storage_eq(scores, expected);
}
-INSTANTIATE_TEST_CASE_P(CPU, PrimitiveTest, ::testing::Values(Device::CPU));
+INSTANTIATE_TEST_SUITE_P(CPU, PrimitiveTest, ::testing::Values(Device::CPU));
#ifdef CT2_WITH_CUDA
-INSTANTIATE_TEST_CASE_P(CUDA, PrimitiveTest, ::testing::Values(Device::CUDA));
+INSTANTIATE_TEST_SUITE_P(CUDA, PrimitiveTest, ::testing::Values(Device::CUDA));
#endif
diff --git a/tests/storage_view_test.cc b/tests/storage_view_test.cc
index aabc8a00..ef1dbcb5 100644
--- a/tests/storage_view_test.cc
+++ b/tests/storage_view_test.cc
@@ -74,7 +74,7 @@ TEST_P(StorageViewDeviceTest, HalfConversion) {
expect_storage_eq(b.to_float(), a);
}
-INSTANTIATE_TEST_CASE_P(CPU, StorageViewDeviceTest, ::testing::Values(Device::CPU));
+INSTANTIATE_TEST_SUITE_P(CPU, StorageViewDeviceTest, ::testing::Values(Device::CPU));
#ifdef CT2_WITH_CUDA
-INSTANTIATE_TEST_CASE_P(CUDA, StorageViewDeviceTest, ::testing::Values(Device::CUDA));
+INSTANTIATE_TEST_SUITE_P(CUDA, StorageViewDeviceTest, ::testing::Values(Device::CUDA));
#endif
diff --git a/tests/translator_test.cc b/tests/translator_test.cc
index cdc87edf..51c0c009 100644
--- a/tests/translator_test.cc
+++ b/tests/translator_test.cc
@@ -82,7 +82,7 @@ TEST_P(ModelVariantTest, Transliteration) {
}
}
-INSTANTIATE_TEST_CASE_P(
+INSTANTIATE_TEST_SUITE_P(
TranslatorTest,
ModelVariantTest,
::testing::Values(
@@ -329,7 +329,7 @@ TEST_P(SearchVariantTest, NormalizeScoresAlternativesNoEos) {
}
-INSTANTIATE_TEST_CASE_P(
+INSTANTIATE_TEST_SUITE_P(
TranslatorTest,
SearchVariantTest,
::testing::Values(1, 4),
@@ -672,14 +672,14 @@ TEST_P(BiasedDecodingDeviceFPTest, NonZeroTimestepDiverge) {
static std::string fp_test_name(::testing::TestParamInfo<std::pair<Device, DataType>> param_info) {
return dtype_name(param_info.param.second);
}
-INSTANTIATE_TEST_CASE_P(CPU, BiasedDecodingDeviceFPTest,
- ::testing::Values(std::make_pair(Device::CPU, DataType::FLOAT)),
- fp_test_name);
+INSTANTIATE_TEST_SUITE_P(CPU, BiasedDecodingDeviceFPTest,
+ ::testing::Values(std::make_pair(Device::CPU, DataType::FLOAT)),
+ fp_test_name);
#ifdef CT2_WITH_CUDA
-INSTANTIATE_TEST_CASE_P(CUDA, BiasedDecodingDeviceFPTest,
- ::testing::Values(std::make_pair(Device::CUDA, DataType::FLOAT),
- std::make_pair(Device::CUDA, DataType::FLOAT16)),
- fp_test_name);
+INSTANTIATE_TEST_SUITE_P(CUDA, BiasedDecodingDeviceFPTest,
+ ::testing::Values(std::make_pair(Device::CUDA, DataType::FLOAT),
+ std::make_pair(Device::CUDA, DataType::FLOAT16)),
+ fp_test_name);
#endif
TEST(TranslatorTest, TranslatePrefixWithLargeBeam) {