diff --git a/map/chart_generator.cpp b/map/chart_generator.cpp index 30442a22e8..0804840e09 100644 --- a/map/chart_generator.cpp +++ b/map/chart_generator.cpp @@ -169,7 +169,8 @@ bool GenerateYAxisChartData(uint32_t height, double minMetersPerPxl, double const freeHeightSpacePxl = drawHeightPxl - deltaAltM / metersPerPxl; if (freeHeightSpacePxl < 0 || freeHeightSpacePxl > drawHeightPxl) { - LOG(LERROR, ("freeHeightSpacePxl is out of the range [0, drawHeightPxl].")); + LOG(LERROR, ("Number of pixels free of chart points (", freeHeightSpacePxl, + ") is below zero or greater number of pixels for the chart (", drawHeightPxl, ").")); return false; } diff --git a/map/map_tests/chart_generator_tests.cpp b/map/map_tests/chart_generator_tests.cpp index 4fa1bc2e7c..4d43d59279 100644 --- a/map/map_tests/chart_generator_tests.cpp +++ b/map/map_tests/chart_generator_tests.cpp @@ -104,8 +104,8 @@ UNIT_TEST(GenerateYAxisChartData_SmokeTest) vector yAxisDataPxl; TEST(maps::GenerateYAxisChartData(30 /* height */, 1.0 /* minMetersPerPxl */, altitudeDataM, yAxisDataPxl), ()); - vector expecttedYAxisDataPxl = {15.0, 15.0}; - TEST(AlmostEqualAbs(yAxisDataPxl, expecttedYAxisDataPxl), ()); + vector expectedYAxisDataPxl = {15.0, 15.0}; + TEST(AlmostEqualAbs(yAxisDataPxl, expectedYAxisDataPxl), ()); } UNIT_TEST(GenerateYAxisChartData_EmptyAltitudeDataTest) @@ -123,8 +123,8 @@ UNIT_TEST(GenerateYAxisChartData_Test) vector yAxisDataPxl; TEST(maps::GenerateYAxisChartData(100 /* height */, 1.0 /* minMetersPerPxl */, altitudeDataM, yAxisDataPxl), ()); - vector expecttedYAxisDataPxl = {50.0, 48.0, 50.0, 52.0, 49.0}; - TEST(AlmostEqualAbs(yAxisDataPxl, expecttedYAxisDataPxl), ()); + vector expectedYAxisDataPxl = {50.0, 48.0, 50.0, 52.0, 49.0}; + TEST(AlmostEqualAbs(yAxisDataPxl, expectedYAxisDataPxl), ()); } UNIT_TEST(GenerateChartByPoints_NoGeometryTest)