mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-20 14:55:21 +03:00
Fixed broken tests after #10080.
This commit is contained in:
parent
b1a3699753
commit
d79dcbb388
2 changed files with 11 additions and 11 deletions
|
@ -350,7 +350,7 @@ TEST(LQTest, TestLQAlarm)
|
||||||
|
|
||||||
// and
|
// and
|
||||||
// using the metric unit system
|
// using the metric unit system
|
||||||
osdConfigMutable()->units = OSD_UNIT_METRIC;
|
osdConfigMutable()->units = UNIT_METRIC;
|
||||||
|
|
||||||
// when
|
// when
|
||||||
// the craft is armed
|
// the craft is armed
|
||||||
|
|
|
@ -480,7 +480,7 @@ TEST_F(OsdTest, TestStatsImperial)
|
||||||
|
|
||||||
// and
|
// and
|
||||||
// using imperial unit system
|
// using imperial unit system
|
||||||
osdConfigMutable()->units = OSD_UNIT_IMPERIAL;
|
osdConfigMutable()->units = UNIT_IMPERIAL;
|
||||||
|
|
||||||
// and
|
// and
|
||||||
// a GPS fix is present
|
// a GPS fix is present
|
||||||
|
@ -520,7 +520,7 @@ TEST_F(OsdTest, TestStatsMetric)
|
||||||
|
|
||||||
// and
|
// and
|
||||||
// using metric unit system
|
// using metric unit system
|
||||||
osdConfigMutable()->units = OSD_UNIT_METRIC;
|
osdConfigMutable()->units = UNIT_METRIC;
|
||||||
|
|
||||||
// when
|
// when
|
||||||
// the craft is armed
|
// the craft is armed
|
||||||
|
@ -556,7 +556,7 @@ TEST_F(OsdTest, TestStatsMetricDistanceUnits)
|
||||||
|
|
||||||
// and
|
// and
|
||||||
// using metric unit system
|
// using metric unit system
|
||||||
osdConfigMutable()->units = OSD_UNIT_METRIC;
|
osdConfigMutable()->units = UNIT_METRIC;
|
||||||
|
|
||||||
// when
|
// when
|
||||||
// the craft is armed
|
// the craft is armed
|
||||||
|
@ -622,7 +622,7 @@ TEST_F(OsdTest, TestAlarms)
|
||||||
|
|
||||||
// and
|
// and
|
||||||
// using the metric unit system
|
// using the metric unit system
|
||||||
osdConfigMutable()->units = OSD_UNIT_METRIC;
|
osdConfigMutable()->units = UNIT_METRIC;
|
||||||
|
|
||||||
// when
|
// when
|
||||||
// time is passing by
|
// time is passing by
|
||||||
|
@ -884,7 +884,7 @@ TEST_F(OsdTest, TestElementAltitude)
|
||||||
osdAnalyzeActiveElements();
|
osdAnalyzeActiveElements();
|
||||||
|
|
||||||
// and
|
// and
|
||||||
osdConfigMutable()->units = OSD_UNIT_METRIC;
|
osdConfigMutable()->units = UNIT_METRIC;
|
||||||
sensorsClear(SENSOR_GPS);
|
sensorsClear(SENSOR_GPS);
|
||||||
|
|
||||||
// when
|
// when
|
||||||
|
@ -948,7 +948,7 @@ TEST_F(OsdTest, TestElementCoreTemperature)
|
||||||
osdAnalyzeActiveElements();
|
osdAnalyzeActiveElements();
|
||||||
|
|
||||||
// and
|
// and
|
||||||
osdConfigMutable()->units = OSD_UNIT_METRIC;
|
osdConfigMutable()->units = UNIT_METRIC;
|
||||||
|
|
||||||
// and
|
// and
|
||||||
simulationCoreTemperature = 0;
|
simulationCoreTemperature = 0;
|
||||||
|
@ -971,7 +971,7 @@ TEST_F(OsdTest, TestElementCoreTemperature)
|
||||||
displayPortTestBufferSubstring(1, 8, "C%c 33%c", SYM_TEMPERATURE, SYM_C);
|
displayPortTestBufferSubstring(1, 8, "C%c 33%c", SYM_TEMPERATURE, SYM_C);
|
||||||
|
|
||||||
// given
|
// given
|
||||||
osdConfigMutable()->units = OSD_UNIT_IMPERIAL;
|
osdConfigMutable()->units = UNIT_IMPERIAL;
|
||||||
|
|
||||||
// when
|
// when
|
||||||
displayClearScreen(&testDisplayPort);
|
displayClearScreen(&testDisplayPort);
|
||||||
|
@ -1120,15 +1120,15 @@ TEST_F(OsdTest, TestFormatTimeString)
|
||||||
TEST_F(OsdTest, TestConvertTemperatureUnits)
|
TEST_F(OsdTest, TestConvertTemperatureUnits)
|
||||||
{
|
{
|
||||||
/* In Celsius */
|
/* In Celsius */
|
||||||
osdConfigMutable()->units = OSD_UNIT_METRIC;
|
osdConfigMutable()->units = UNIT_METRIC;
|
||||||
EXPECT_EQ(osdConvertTemperatureToSelectedUnit(40), 40);
|
EXPECT_EQ(osdConvertTemperatureToSelectedUnit(40), 40);
|
||||||
|
|
||||||
/* In Fahrenheit */
|
/* In Fahrenheit */
|
||||||
osdConfigMutable()->units = OSD_UNIT_IMPERIAL;
|
osdConfigMutable()->units = UNIT_IMPERIAL;
|
||||||
EXPECT_EQ(osdConvertTemperatureToSelectedUnit(40), 104);
|
EXPECT_EQ(osdConvertTemperatureToSelectedUnit(40), 104);
|
||||||
|
|
||||||
/* In Fahrenheit with rounding */
|
/* In Fahrenheit with rounding */
|
||||||
osdConfigMutable()->units = OSD_UNIT_IMPERIAL;
|
osdConfigMutable()->units = UNIT_IMPERIAL;
|
||||||
EXPECT_EQ(osdConvertTemperatureToSelectedUnit(41), 106);
|
EXPECT_EQ(osdConvertTemperatureToSelectedUnit(41), 106);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue