refactor: clean GSD comments and translate remaining Java sources to English
- Reduce javadocs to one-liners across config/region/physics/tick/viz/plugin root - Translate residual French comments; no behavioural change - Tests adjusted where assertions referenced French strings
This commit is contained in:
@@ -10,10 +10,7 @@ import java.util.UUID;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
/**
|
||||
* Pure-data tests for {@link FallDamageGuard} — no Hytale runtime dependency.
|
||||
* Covers entry / in-region / exit / grace-window / re-entry / FallDamage=true override.
|
||||
*/
|
||||
/** Pure-data tests for {@link FallDamageGuard} — entry, in-region, exit, grace-window, re-entry. */
|
||||
class FallDamageGuardTest {
|
||||
|
||||
@Test
|
||||
@@ -69,8 +66,7 @@ class FallDamageGuardTest {
|
||||
GravityFlipRegion region = region(false, 2500);
|
||||
guard.markInRegion(uuid, region);
|
||||
guard.markExit(uuid, region, 1000L);
|
||||
guard.markInRegion(uuid, region); // re-enter
|
||||
// In-region again with FallDamage=false → immediate suppression, grace reset.
|
||||
guard.markInRegion(uuid, region);
|
||||
assertTrue(guard.shouldSuppressFallDamage(uuid, 1500L));
|
||||
}
|
||||
|
||||
@@ -82,7 +78,6 @@ class FallDamageGuardTest {
|
||||
GravityFlipRegion allowed = region(true, 2500);
|
||||
guard.markInRegion(uuid, suppressed);
|
||||
guard.markExit(uuid, suppressed, 1000L);
|
||||
// New region has FallDamage=true → override immediately.
|
||||
guard.markInRegion(uuid, allowed);
|
||||
assertFalse(guard.shouldSuppressFallDamage(uuid, 1500L));
|
||||
}
|
||||
|
||||
@@ -8,14 +8,7 @@ import java.util.UUID;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/**
|
||||
* Pure-diff + tracker-semantics tests for {@link GravityApplier}.
|
||||
*
|
||||
* <p>Pas de mocks (pattern Phase 02-02 deviation #4). Pas de runtime Hytale requis —
|
||||
* les tests 5 et 6 utilisent le hook package-private {@code __updateTrackerForTest} et
|
||||
* la vue {@code previouslyInvertedView()} pour valider la sémantique du tracker sans
|
||||
* toucher à {@code World} / {@code Store}.
|
||||
*/
|
||||
/** Pure-diff + tracker-semantics tests for {@link GravityApplier}. */
|
||||
class GravityApplierDiffTest {
|
||||
|
||||
@Test
|
||||
@@ -73,16 +66,12 @@ class GravityApplierDiffTest {
|
||||
applier.__updateTrackerForTest(new HashSet<>(Set.of(c)));
|
||||
assertEquals(Set.of(c), applier.previouslyInvertedView());
|
||||
|
||||
// View is immutable.
|
||||
Set<UUID> view = applier.previouslyInvertedView();
|
||||
assertThrows(UnsupportedOperationException.class, () -> view.add(UUID.randomUUID()));
|
||||
}
|
||||
|
||||
// NOTE (Rule 3 deviation — Plan 03-02) : les tests suivants ciblent la seam pure
|
||||
// `buildFlaggedDecision(double, double, boolean)` au lieu de `buildPhysicsValuesWithFlag`
|
||||
// parce que le static init de `PhysicsValues` déclenche un `ExceptionInInitializerError`
|
||||
// hors runtime Hytale (dépendance ModuleRegistry). La décomposition pure garantit la
|
||||
// sémantique attendue (mass/drag préservés, flag = target) sans couplage ECS.
|
||||
// These tests target the pure seam buildFlaggedDecision because PhysicsValues static init
|
||||
// triggers ExceptionInInitializerError outside the Hytale runtime.
|
||||
|
||||
@Test
|
||||
void buildFlaggedDecisionPreservesMassAndDrag() {
|
||||
|
||||
Reference in New Issue
Block a user