From 1dca871d0928f4849ac7be01a6d423b963a6b53d Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Mon, 27 Feb 2023 15:26:37 -0800 Subject: [PATCH] Remove designated initializer use from CombinedPredictionCalculatorTestCase PiperOrigin-RevId: 512747781 --- .../combined_prediction_calculator_test.cc | 185 +++++++++--------- 1 file changed, 95 insertions(+), 90 deletions(-) diff --git a/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/combined_prediction_calculator_test.cc b/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/combined_prediction_calculator_test.cc index ecf49795b..509fac5f0 100644 --- a/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/combined_prediction_calculator_test.cc +++ b/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/combined_prediction_calculator_test.cc @@ -203,106 +203,111 @@ INSTANTIATE_TEST_CASE_P( CombinedPredictionCalculatorTests, CombinedPredictionCalculatorTest, testing::ValuesIn({ { - .test_name = "TestCustomDramaWinnnerWith_HighCanned_Thresh", - .custom_negative_score = 0.1, - .drama_score = 0.5, - .llama_score = 0.3, - .drama_thresh = 0.25, - .llama_thresh = 0.7, - .canned_negative_score = 0.1, - .bazinga_score = 0.3, - .joy_score = 0.3, - .peace_score = 0.3, - .bazinga_thresh = 0.7, - .joy_thresh = 0.7, - .peace_thresh = 0.7, - .max_scoring_label = "CustomDrama", - .max_score = 0.5, + /* test_name= */ "TestCustomDramaWinnnerWith_HighCanned_Thresh", + /* custom_negative_score= */ 0.1, + /* drama_score= */ 0.5, + /* llama_score= */ 0.3, + /* drama_thresh= */ 0.25, + /* llama_thresh= */ 0.7, + /* canned_negative_score= */ 0.1, + /* bazinga_score= */ 0.3, + /* joy_score= */ 0.3, + /* peace_score= */ 0.3, + /* bazinga_thresh= */ 0.7, + /* joy_thresh= */ 0.7, + /* peace_thresh= */ 0.7, + /* max_scoring_label= */ "CustomDrama", + /* max_score= */ 0.5, }, { - .test_name = "TestCannedWinnerWith_HighCustom_ZeroCanned_Thresh", - .custom_negative_score = 0.1, - .drama_score = 0.3, - .llama_score = 0.6, - .drama_thresh = 0.4, - .llama_thresh = 0.8, - .canned_negative_score = 0.1, - .bazinga_score = 0.4, - .joy_score = 0.3, - .peace_score = 0.2, - .bazinga_thresh = 0.0, - .joy_thresh = 0.0, - .peace_thresh = 0.0, - .max_scoring_label = "CannedBazinga", - .max_score = 0.4, + /* test_name= */ "TestCannedWinnerWith_HighCustom_ZeroCanned_" + "Thresh", + /* custom_negative_score= */ 0.1, + /* drama_score= */ 0.3, + /* llama_score= */ 0.6, + /* drama_thresh= */ 0.4, + /* llama_thresh= */ 0.8, + /* canned_negative_score= */ 0.1, + /* bazinga_score= */ 0.4, + /* joy_score= */ 0.3, + /* peace_score= */ 0.2, + /* bazinga_thresh= */ 0.0, + /* joy_thresh= */ 0.0, + /* peace_thresh= */ 0.0, + /* max_scoring_label= */ "CannedBazinga", + /* max_score= */ 0.4, }, { - .test_name = "TestNegativeWinnerWith_LowCustom_HighCanned_Thresh", - .custom_negative_score = 0.5, - .drama_score = 0.1, - .llama_score = 0.4, - .drama_thresh = 0.1, - .llama_thresh = 0.05, - .canned_negative_score = 0.1, - .bazinga_score = 0.3, - .joy_score = 0.3, - .peace_score = 0.3, - .bazinga_thresh = 0.7, - .joy_thresh = 0.7, - .peace_thresh = 0.7, - .max_scoring_label = "Negative", - .max_score = 0.5, + /* test_name= */ "TestNegativeWinnerWith_LowCustom_HighCanned_" + "Thresh", + /* custom_negative_score= */ 0.5, + /* drama_score= */ 0.1, + /* llama_score= */ 0.4, + /* drama_thresh= */ 0.1, + /* llama_thresh= */ 0.05, + /* canned_negative_score= */ 0.1, + /* bazinga_score= */ 0.3, + /* joy_score= */ 0.3, + /* peace_score= */ 0.3, + /* bazinga_thresh= */ 0.7, + /* joy_thresh= */ 0.7, + /* peace_thresh= */ 0.7, + /* max_scoring_label= */ "Negative", + /* max_score= */ 0.5, }, { - .test_name = "TestNegativeWinnerWith_HighCustom_HighCanned_Thresh", - .custom_negative_score = 0.8, - .drama_score = 0.1, - .llama_score = 0.1, - .drama_thresh = 0.25, - .llama_thresh = 0.7, - .canned_negative_score = 0.1, - .bazinga_score = 0.3, - .joy_score = 0.3, - .peace_score = 0.3, - .bazinga_thresh = 0.7, - .joy_thresh = 0.7, - .peace_thresh = 0.7, - .max_scoring_label = "Negative", - .max_score = 0.8, + /* test_name= */ "TestNegativeWinnerWith_HighCustom_HighCanned_" + "Thresh", + /* custom_negative_score= */ 0.8, + /* drama_score= */ 0.1, + /* llama_score= */ 0.1, + /* drama_thresh= */ 0.25, + /* llama_thresh= */ 0.7, + /* canned_negative_score= */ 0.1, + /* bazinga_score= */ 0.3, + /* joy_score= */ 0.3, + /* peace_score= */ 0.3, + /* bazinga_thresh= */ 0.7, + /* joy_thresh= */ 0.7, + /* peace_thresh= */ 0.7, + /* max_scoring_label= */ "Negative", + /* max_score= */ 0.8, }, { - .test_name = "TestNegativeWinnerWith_HighCustom_HighCannedThresh2", - .custom_negative_score = 0.1, - .drama_score = 0.2, - .llama_score = 0.7, - .drama_thresh = 1.1, - .llama_thresh = 1.1, - .canned_negative_score = 0.1, - .bazinga_score = 0.3, - .joy_score = 0.3, - .peace_score = 0.3, - .bazinga_thresh = 0.7, - .joy_thresh = 0.7, - .peace_thresh = 0.7, - .max_scoring_label = "Negative", - .max_score = 0.1, + /* test_name= */ "TestNegativeWinnerWith_HighCustom_" + "HighCannedThresh2", + /* custom_negative_score= */ 0.1, + /* drama_score= */ 0.2, + /* llama_score= */ 0.7, + /* drama_thresh= */ 1.1, + /* llama_thresh= */ 1.1, + /* canned_negative_score= */ 0.1, + /* bazinga_score= */ 0.3, + /* joy_score= */ 0.3, + /* peace_score= */ 0.3, + /* bazinga_thresh= */ 0.7, + /* joy_thresh= */ 0.7, + /* peace_thresh= */ 0.7, + /* max_scoring_label= */ "Negative", + /* max_score= */ 0.1, }, { - .test_name = "TestNegativeWinnerWith_HighCustom_HighCanned_Thresh3", - .custom_negative_score = 0.1, - .drama_score = 0.3, - .llama_score = 0.6, - .drama_thresh = 0.4, - .llama_thresh = 0.8, - .canned_negative_score = 0.3, - .bazinga_score = 0.2, - .joy_score = 0.3, - .peace_score = 0.2, - .bazinga_thresh = 0.5, - .joy_thresh = 0.5, - .peace_thresh = 0.5, - .max_scoring_label = "Negative", - .max_score = 0.1, + /* test_name= */ "TestNegativeWinnerWith_HighCustom_HighCanned_" + "Thresh3", + /* custom_negative_score= */ 0.1, + /* drama_score= */ 0.3, + /* llama_score= */ 0.6, + /* drama_thresh= */ 0.4, + /* llama_thresh= */ 0.8, + /* canned_negative_score= */ 0.3, + /* bazinga_score= */ 0.2, + /* joy_score= */ 0.3, + /* peace_score= */ 0.2, + /* bazinga_thresh= */ 0.5, + /* joy_thresh= */ 0.5, + /* peace_thresh= */ 0.5, + /* max_scoring_label= */ "Negative", + /* max_score= */ 0.1, }, }), [](const testing::TestParamInfo<