remove comments

This commit is contained in:
2026-08-29 23:27:15 +02:00
parent ec48cd6b37
commit 954bd762f7
84 changed files with 111 additions and 838 deletions
+2 -12
View File
@@ -2,8 +2,6 @@ package inc
import "testing"
// The engine's textWidth counts bytes, which mismeasures any non-ASCII string.
// Ours counts runes — pin that down, because wrapping depends on it.
func TestTextWidthCountsRunes(t *testing.T) {
if got, want := textW("naïve"), 5*glyphW; got != want {
t.Errorf("textW(naïve) = %d, want %d", got, want)
@@ -35,11 +33,6 @@ func TestClipFits(t *testing.T) {
}
}
// Regression guard for the bug that made the first build unreadable: the
// layout was derived from the wireframe deck's ratios, where text is 2.8% of
// the screen height, while the engine's debug font is a fixed 6×16 cell. At
// 320×200 that is 8% — so rows overlapped and the top bar overflowed into the
// scene. Every text row must be at least as tall as the glyph cell.
func TestLayoutFitsTheFont(t *testing.T) {
if LineH < glyphH {
t.Errorf("LineH (%d) is shorter than the glyph cell (%d): rows will overlap", LineH, glyphH)
@@ -47,21 +40,18 @@ func TestLayoutFitsTheFont(t *testing.T) {
if TopBarH < glyphH {
t.Errorf("TopBarH (%d) cannot hold a %dpx glyph", TopBarH, glyphH)
}
// The tape channel must fit a header, a rule and at least four body rows —
// below that the dialogue is unreadable.
const channelH = ScreenH - HUDTop - 4
body := (channelH - Pad*2 - LineH - 6) / LineH
if body < 4 {
t.Errorf("tape channel only fits %d body rows, want >= 4", body)
}
// The two tape slots must fit their two rows inside their border.
if slotsH < LineH*2+Pad {
t.Errorf("slotsH (%d) cannot hold two %dpx rows", slotsH, LineH)
}
}
// The HUD must not reach outside the screen, and the scene must keep a usable
// aspect ratio for a point & click background.
func TestSceneProportions(t *testing.T) {
if invY+invSlot*2+invGap > ScreenH {
t.Errorf("inventory runs off the bottom: %d > %d", invY+invSlot*2+invGap, ScreenH)