Clarify fuel savings comparison labels

This commit is contained in:
FuelBoard Contributor
2026-10-15 11:38:24 +01:00
parent 558f956d8d
commit a5688cbac2
14 changed files with 176 additions and 73 deletions
@@ -454,6 +454,25 @@ final class FuelSavingsEstimateTests: XCTestCase {
// MARK: Row copy
func testCompactComparisonLabelUsesGenericNearestStationWording() {
XCTAssertEqual(
FuelSavingsFormat.comparisonLabel(status: .worthTheDrive),
"vs nearest station"
)
XCTAssertEqual(
FuelSavingsFormat.comparisonLabel(status: .notWorthTheDrive),
"vs nearest station"
)
XCTAssertEqual(
FuelSavingsFormat.comparisonLabel(status: .breakEven),
"vs nearest station"
)
XCTAssertEqual(
FuelSavingsFormat.comparisonLabel(status: .baseline),
"your baseline"
)
}
/// The row's extra-driving caption must follow the DISPLAY unit: the stored
/// figure is always miles, and converting by the current unit instead would
/// leave a km user's figure unlabelled and 1.6× too large.