Files
mg4/app/src/test/java/com/evsuite/abrp/GearTest.java
T
nilsandClaude Opus 5.5 c6643e7df2 App 2.22.2: gear badge shows P, R, N and D
Codes read on the owner's car with 2.22.1: 1 P, 2 R, 3 N, 4 D. Gear
maps them (unit-tested); other codes show no letter, unread "—". The
temporary gear list on the Logs tab is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
2026-10-24 19:10:03 +02:00

30 lines
674 B
Java

package com.evsuite.abrp;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
/** The gear letter — pure JVM. */
public class GearTest {
@Test
public void theFourCodesReadOnTheCar() {
assertEquals("P", Gear.label(1));
assertEquals("R", Gear.label(2));
assertEquals("N", Gear.label(3));
assertEquals("D", Gear.label(4));
}
@Test
public void unknownCodesShowNoLetter() {
assertEquals("", Gear.label(0));
assertEquals("", Gear.label(5));
assertEquals("", Gear.label(-1));
}
@Test
public void unreadIsADash() {
assertEquals("—", Gear.label(null));
}
}