Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated INSTANTIATE_TEST_CASE_P #3252

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions unittest/apiexample_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ TEST_P(MatchGroundTruth, TessPhototestOCR) {
TESSDATA_DIR, GetParam());
}

INSTANTIATE_TEST_CASE_P(Eng, MatchGroundTruth, ::testing::Values("eng"));
INSTANTIATE_TEST_CASE_P(DISABLED_Latin, MatchGroundTruth,
INSTANTIATE_TEST_SUITE_P(Eng, MatchGroundTruth, ::testing::Values("eng"));
INSTANTIATE_TEST_SUITE_P(DISABLED_Latin, MatchGroundTruth,
::testing::Values("script/Latin"));
INSTANTIATE_TEST_CASE_P(DISABLED_Deva, MatchGroundTruth,
INSTANTIATE_TEST_SUITE_P(DISABLED_Deva, MatchGroundTruth,
::testing::Values("script/Devanagari"));
INSTANTIATE_TEST_CASE_P(DISABLED_Arabic, MatchGroundTruth,
INSTANTIATE_TEST_SUITE_P(DISABLED_Arabic, MatchGroundTruth,
::testing::Values("script/Arabic"));

class EuroText : public QuickTest {};
Expand Down
12 changes: 6 additions & 6 deletions unittest/loadlang_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ TEST_P(LoadLanguage, vie) { LangLoader("vie", GetParam()); }
TEST_P(LoadLanguage, yid) { LangLoader("yid", GetParam()); }
TEST_P(LoadLanguage, yor) { LangLoader("yor", GetParam()); }

INSTANTIATE_TEST_CASE_P(DISABLED_Tessdata_fast, LoadLanguage,
INSTANTIATE_TEST_SUITE_P(DISABLED_Tessdata_fast, LoadLanguage,
::testing::Values(TESSDATA_DIR "_fast"));
INSTANTIATE_TEST_CASE_P(DISABLED_Tessdata_best, LoadLanguage,
INSTANTIATE_TEST_SUITE_P(DISABLED_Tessdata_best, LoadLanguage,
::testing::Values(TESSDATA_DIR "_best"));
INSTANTIATE_TEST_CASE_P(DISABLED_Tessdata, LoadLanguage,
INSTANTIATE_TEST_SUITE_P(DISABLED_Tessdata, LoadLanguage,
::testing::Values(TESSDATA_DIR));

// For all scripts
Expand Down Expand Up @@ -228,11 +228,11 @@ TEST_P(LoadScript, Thai) { LangLoader("script/Thai", GetParam()); }
TEST_P(LoadScript, Tibetan) { LangLoader("script/Tibetan", GetParam()); }
TEST_P(LoadScript, Vietnamese) { LangLoader("script/Vietnamese", GetParam()); }

INSTANTIATE_TEST_CASE_P(DISABLED_Tessdata_fast, LoadScript,
INSTANTIATE_TEST_SUITE_P(DISABLED_Tessdata_fast, LoadScript,
::testing::Values(TESSDATA_DIR "_fast"));
INSTANTIATE_TEST_CASE_P(DISABLED_Tessdata_best, LoadScript,
INSTANTIATE_TEST_SUITE_P(DISABLED_Tessdata_best, LoadScript,
::testing::Values(TESSDATA_DIR "_best"));
INSTANTIATE_TEST_CASE_P(DISABLED_Tessdata, LoadScript,
INSTANTIATE_TEST_SUITE_P(DISABLED_Tessdata, LoadScript,
::testing::Values(TESSDATA_DIR));

class LoadLang : public QuickTest {};
Expand Down
16 changes: 8 additions & 8 deletions unittest/osd_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,59 +72,59 @@ TEST_P(OSDTest, MatchOrientationDegrees) {
#endif
}

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataEngEuroHebrew, OSDTest,
::testing::Combine(::testing::Values(0),
::testing::Values(TESTING_DIR "/phototest.tif",
TESTING_DIR "/eurotext.tif",
TESTING_DIR "/hebrew.png"),
::testing::Values(TESSDATA_DIR)));

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataBestEngEuroHebrew, OSDTest,
::testing::Combine(::testing::Values(0),
::testing::Values(TESTING_DIR "/phototest.tif",
TESTING_DIR "/eurotext.tif",
TESTING_DIR "/hebrew.png"),
::testing::Values(TESSDATA_DIR "_best")));

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataFastEngEuroHebrew, OSDTest,
::testing::Combine(::testing::Values(0),
::testing::Values(TESTING_DIR "/phototest.tif",
TESTING_DIR "/eurotext.tif",
TESTING_DIR "/hebrew.png"),
::testing::Values(TESSDATA_DIR "_fast")));

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataFastRotated90, OSDTest,
::testing::Combine(::testing::Values(90),
::testing::Values(TESTING_DIR
"/phototest-rotated-R.png"),
::testing::Values(TESSDATA_DIR "_fast")));

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataFastRotated180, OSDTest,
::testing::Combine(::testing::Values(180),
::testing::Values(TESTING_DIR
"/phototest-rotated-180.png"),
::testing::Values(TESSDATA_DIR "_fast")));

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataFastRotated270, OSDTest,
::testing::Combine(::testing::Values(270),
::testing::Values(TESTING_DIR
"/phototest-rotated-L.png"),
::testing::Values(TESSDATA_DIR "_fast")));

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataFastDevaRotated270, OSDTest,
::testing::Combine(::testing::Values(270),
::testing::Values(TESTING_DIR
"/devatest-rotated-270.png"),
::testing::Values(TESSDATA_DIR "_fast")));

INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_SUITE_P(
TessdataFastDeva, OSDTest,
::testing::Combine(::testing::Values(0),
::testing::Values(TESTING_DIR "/devatest.png"),
Expand Down
2 changes: 1 addition & 1 deletion unittest/qrsequence_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ TEST_P(QRSequenceGeneratorTest, GeneratesValidSequence) {
}

// Run a parameterized test using the following range sizes.
INSTANTIATE_TEST_CASE_P(RangeTest, QRSequenceGeneratorTest,
INSTANTIATE_TEST_SUITE_P(RangeTest, QRSequenceGeneratorTest,
::testing::Values(2, 7, 8, 9, 16, 1e2, 1e4, 1e6));
} // namespace