From 4a1ba11e3f014f0ecfde6108971a0b649df42fa5 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Tue, 28 Feb 2023 13:47:47 -0800 Subject: [PATCH] Do not use designated initializers PiperOrigin-RevId: 513028900 --- .../score_calibration_calculator_test.cc | 14 ++-- .../landmarks_to_matrix_calculator_test.cc | 84 +++++++++---------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/mediapipe/tasks/cc/components/calculators/score_calibration_calculator_test.cc b/mediapipe/tasks/cc/components/calculators/score_calibration_calculator_test.cc index 8134d86d..b42c1fa1 100644 --- a/mediapipe/tasks/cc/components/calculators/score_calibration_calculator_test.cc +++ b/mediapipe/tasks/cc/components/calculators/score_calibration_calculator_test.cc @@ -185,15 +185,15 @@ TEST_P(CalibrationWithoutIndicesTest, Succeeds) { INSTANTIATE_TEST_SUITE_P( ScoreCalibrationCalculatorTest, CalibrationWithoutIndicesTest, - Values(CalibrationTestParams{.score_transformation = "IDENTITY", - .expected_results = {0.4948505976, - 0.5059588508, 0.2, 0.2}}, + Values(CalibrationTestParams{ + /* score_transformation= */ "IDENTITY", + /* expected_results= */ {0.4948505976, 0.5059588508, 0.2, 0.2}}, CalibrationTestParams{ - .score_transformation = "LOG", - .expected_results = {0.2976901255, 0.3393665735, 0.2, 0.2}}, + /* score_transformation= */ "LOG", + /* expected_results= */ {0.2976901255, 0.3393665735, 0.2, 0.2}}, CalibrationTestParams{ - .score_transformation = "INVERSE_LOGISTIC", - .expected_results = {0.3203217641, 0.3778080605, 0.2, 0.2}}), + /* score_transformation= */ "INVERSE_LOGISTIC", + /* expected_results= */ {0.3203217641, 0.3778080605, 0.2, 0.2}}), [](const TestParamInfo& info) { return info.param.score_transformation; }); diff --git a/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/landmarks_to_matrix_calculator_test.cc b/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/landmarks_to_matrix_calculator_test.cc index a1a44c8d..70234a32 100644 --- a/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/landmarks_to_matrix_calculator_test.cc +++ b/mediapipe/tasks/cc/vision/gesture_recognizer/calculators/landmarks_to_matrix_calculator_test.cc @@ -117,24 +117,24 @@ TEST_P(Landmarks2dToMatrixCalculatorTest, OutputsCorrectResult) { INSTANTIATE_TEST_CASE_P( LandmarksToMatrixCalculatorTests, Landmarks2dToMatrixCalculatorTest, testing::ValuesIn( - {{.test_name = "TestWithOffset0", - .base_offset = 0, - .object_normalization_origin_offset = 0, - .expected_cell_0_2 = 0.1f, - .expected_cell_1_5 = 0.1875f, - .rotation = 0}, - {.test_name = "TestWithOffset21", - .base_offset = 21, - .object_normalization_origin_offset = 0, - .expected_cell_0_2 = 0.1f, - .expected_cell_1_5 = 0.1875f, - .rotation = 0}, - {.test_name = "TestWithRotation", - .base_offset = 0, - .object_normalization_origin_offset = 0, - .expected_cell_0_2 = 0.075f, - .expected_cell_1_5 = -0.25f, - .rotation = M_PI / 2.0}}), + {{/* test_name= */ "TestWithOffset0", + /* base_offset= */ 0, + /* object_normalization_origin_offset= */ 0, + /* expected_cell_0_2= */ 0.1f, + /* expected_cell_1_5= */ 0.1875f, + /* rotation= */ 0}, + {/* test_name= */ "TestWithOffset21", + /* base_offset= */ 21, + /* object_normalization_origin_offset= */ 0, + /* expected_cell_0_2= */ 0.1f, + /* expected_cell_1_5= */ 0.1875f, + /* rotation= */ 0}, + {/* test_name= */ "TestWithRotation", + /* base_offset= */ 0, + /* object_normalization_origin_offset= */ 0, + /* expected_cell_0_2= */ 0.075f, + /* expected_cell_1_5= */ -0.25f, + /* rotation= */ M_PI / 2.0}}), [](const testing::TestParamInfo< Landmarks2dToMatrixCalculatorTest::ParamType>& info) { return info.param.test_name; @@ -203,30 +203,30 @@ TEST_P(LandmarksWorld3dToMatrixCalculatorTest, OutputsCorrectResult) { INSTANTIATE_TEST_CASE_P( LandmarksToMatrixCalculatorTests, LandmarksWorld3dToMatrixCalculatorTest, testing::ValuesIn( - {{.test_name = "TestWithOffset0", - .base_offset = 0, - .object_normalization_origin_offset = 0, - .expected_cell_0_2 = 0.1f, - .expected_cell_1_5 = 0.25, - .rotation = 0}, - {.test_name = "TestWithOffset21", - .base_offset = 21, - .object_normalization_origin_offset = 0, - .expected_cell_0_2 = 0.1f, - .expected_cell_1_5 = 0.25, - .rotation = 0}, - {.test_name = "NoObjectNormalization", - .base_offset = 0, - .object_normalization_origin_offset = -1, - .expected_cell_0_2 = 0.021f, - .expected_cell_1_5 = 0.052f, - .rotation = 0}, - {.test_name = "TestWithRotation", - .base_offset = 0, - .object_normalization_origin_offset = 0, - .expected_cell_0_2 = 0.1f, - .expected_cell_1_5 = -0.25f, - .rotation = M_PI / 2.0}}), + {{/* test_name= */ "TestWithOffset0", + /* base_offset= */ 0, + /* object_normalization_origin_offset= */ 0, + /* expected_cell_0_2= */ 0.1f, + /* expected_cell_1_5= */ 0.25, + /* rotation= */ 0}, + {/* test_name= */ "TestWithOffset21", + /* base_offset= */ 21, + /* object_normalization_origin_offset= */ 0, + /* expected_cell_0_2= */ 0.1f, + /* expected_cell_1_5= */ 0.25, + /* rotation= */ 0}, + {/* test_name= */ "NoObjectNormalization", + /* base_offset= */ 0, + /* object_normalization_origin_offset= */ -1, + /* expected_cell_0_2= */ 0.021f, + /* expected_cell_1_5= */ 0.052f, + /* rotation= */ 0}, + {/* test_name= */ "TestWithRotation", + /* base_offset= */ 0, + /* object_normalization_origin_offset= */ 0, + /* expected_cell_0_2= */ 0.1f, + /* expected_cell_1_5= */ -0.25f, + /* rotation= */ M_PI / 2.0}}), [](const testing::TestParamInfo< LandmarksWorld3dToMatrixCalculatorTest::ParamType>& info) { return info.param.test_name;