From c37ec8eb1a826b00f132c8c9dc1fbd308d53cb60 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Mon, 20 Jan 2025 08:20:38 +0100 Subject: [PATCH] fix clang-tidy Signed-off-by: Martijn Govers --- tests/cpp_unit_tests/test_power_sensor.cpp | 30 ++++++++++---------- tests/cpp_unit_tests/test_voltage_sensor.cpp | 12 ++++---- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/cpp_unit_tests/test_power_sensor.cpp b/tests/cpp_unit_tests/test_power_sensor.cpp index f051c6e7a..ba8b82806 100644 --- a/tests/cpp_unit_tests/test_power_sensor.cpp +++ b/tests/cpp_unit_tests/test_power_sensor.cpp @@ -572,21 +572,21 @@ TEST_CASE("Test power sensor") { } SUBCASE("Construction and update") { - PowerSensorInput sym_power_sensor_input{.id = 7, - .measured_object = 3, - .measured_terminal_type = - MeasuredTerminalType::branch_from, - .power_sigma = 269258.24035672517, - .p_measured = -2e5, - .q_measured = -1e6, - .p_sigma = 2.5e5, - .q_sigma = 1e5}; - PowerSensorUpdate sym_power_sensor_update{.id = 7, - .power_sigma = sym_power_sensor_input.power_sigma, - .p_measured = sym_power_sensor_input.p_measured, - .q_measured = sym_power_sensor_input.q_measured, - .p_sigma = sym_power_sensor_input.p_sigma, - .q_sigma = sym_power_sensor_input.q_sigma}; + PowerSensorInput const sym_power_sensor_input{.id = 7, + .measured_object = 3, + .measured_terminal_type = + MeasuredTerminalType::branch_from, + .power_sigma = 269258.24035672517, + .p_measured = -2e5, + .q_measured = -1e6, + .p_sigma = 2.5e5, + .q_sigma = 1e5}; + PowerSensorUpdate const sym_power_sensor_update{.id = 7, + .power_sigma = sym_power_sensor_input.power_sigma, + .p_measured = sym_power_sensor_input.p_measured, + .q_measured = sym_power_sensor_input.q_measured, + .p_sigma = sym_power_sensor_input.p_sigma, + .q_sigma = sym_power_sensor_input.q_sigma}; SymPowerSensor sym_power_sensor{sym_power_sensor_input}; auto const orig_calc_param = sym_power_sensor.calc_param(); diff --git a/tests/cpp_unit_tests/test_voltage_sensor.cpp b/tests/cpp_unit_tests/test_voltage_sensor.cpp index 432181d56..e01d9aada 100644 --- a/tests/cpp_unit_tests/test_voltage_sensor.cpp +++ b/tests/cpp_unit_tests/test_voltage_sensor.cpp @@ -497,13 +497,13 @@ TEST_CASE("Test voltage sensor") { } SUBCASE("Construction and update") { - VoltageSensorInput sym_voltage_sensor_input{ + VoltageSensorInput const sym_voltage_sensor_input{ .id = 7, .measured_object = 3, .u_sigma = 1.0, .u_measured = 25000, .u_angle_measured = -0.2}; - VoltageSensorUpdate sym_voltage_sensor_update{.id = 7, - .u_sigma = sym_voltage_sensor_input.u_sigma, - .u_measured = sym_voltage_sensor_input.u_measured, - .u_angle_measured = - sym_voltage_sensor_input.u_angle_measured}; + VoltageSensorUpdate const sym_voltage_sensor_update{ + .id = 7, + .u_sigma = sym_voltage_sensor_input.u_sigma, + .u_measured = sym_voltage_sensor_input.u_measured, + .u_angle_measured = sym_voltage_sensor_input.u_angle_measured}; SymVoltageSensor sym_voltage_sensor{sym_voltage_sensor_input, 31250}; auto const orig_calc_param = sym_voltage_sensor.calc_param();