Files
mg4/app/src/test/java/com/evsuite/abrp/EmpireAgeTest.java
T
nilsandClaude Opus 5.5 7d2c1e8bb4 App 2.38.0: Overview styles Visor and Empire
Visor, after Halo's helmet display: the battery as the shield bar, the
range as the ammunition counter, P R N D as grenade slots, the speed in
the reticle with power round it, and the power trail as blips on a
motion tracker that sweeps while moving. Original blue or the accent.

Empire, after Age of Empires: a wooden resource bar, an isometric world
that moves with the speed, the car as the selected unit, P R N D as
commands, a diamond minimap, and ages by odometer (EmpireAge, tested).
The app takes the player's blue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
2026-10-26 21:00:50 +01:00

41 lines
1.4 KiB
Java

package com.evsuite.abrp;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Test;
/** The Empire style's ages by odometer — pure JVM. */
public class EmpireAgeTest {
@Test
public void agesByOdometer() {
assertEquals("Dark Age", EmpireAge.name(0f));
assertEquals("Dark Age", EmpireAge.name(9_999f));
assertEquals("Feudal Age", EmpireAge.name(10_000f));
assertEquals("Castle Age", EmpireAge.name(45_000f));
assertEquals("Imperial Age", EmpireAge.name(60_000f));
assertEquals("Imperial Age", EmpireAge.name(250_000f));
}
@Test
public void theWayToTheNextAge() {
assertEquals("Castle Age", EmpireAge.next(12_000f));
assertEquals(18_000f, EmpireAge.toNext(12_000f), 0.01f);
assertEquals(0.1f, EmpireAge.progress(12_000f), 0.001f);
assertEquals(0.5f, EmpireAge.progress(5_000f), 0.001f);
assertNull(EmpireAge.next(70_000f));
assertNull(EmpireAge.toNext(70_000f));
assertEquals(1f, EmpireAge.progress(70_000f), 0f);
}
@Test
public void unreadIsNoAge() {
assertEquals("—", EmpireAge.name(null));
assertEquals(-1, EmpireAge.index(Float.NaN));
assertNull(EmpireAge.next(null));
assertNull(EmpireAge.toNext(null));
assertEquals(0f, EmpireAge.progress(null), 0f);
}
}