Rename the load-time draw types to the read survey and fence, and move the survey to readsurvey.go

This commit is contained in:
2026-09-29 02:51:35 +02:00
committed by Lillem4n
parent 1cefa18039
commit 2d82f34cd4
11 changed files with 276 additions and 272 deletions
+4 -4
View File
@@ -1000,7 +1000,7 @@ func TestEnteredRowsAgreeWithPinning(t *testing.T) {
var none pinSet
for _, entered := range tables {
for row := 0; row < entered.rowCount(); row++ {
whole := drawAt{wholeTable: entered}
whole := surveyAt{wholeTable: entered}
whole.wholePins.add(entered, row)
s := none.entered(entered, row)
for _, cand := range tables {
@@ -1013,14 +1013,14 @@ func TestEnteredRowsAgreeWithPinning(t *testing.T) {
for cr := 0; cr < cand.rowCount(); cr++ {
beside := s.clone()
refused := beside.pinRow(cand, cr) != nil
candAt := drawAt{pins: none.entered(cand, cr)}
if got := alternatives(drawAt{pins: s}, candAt); got != refused {
candAt := surveyAt{pins: none.entered(cand, cr)}
if got := alternatives(surveyAt{pins: s}, candAt); got != refused {
t.Errorf("alternatives(%s, %s) = %v, but pinning both refuses = %v", entered.selectorSpelling(row), cand.selectorSpelling(cr), got, refused)
}
if alternatives(whole, candAt) || alternatives(candAt, whole) {
t.Errorf("%s rendered whole is an alternative to %s pinned, though the whole draw ignores the pin", entered.selectorSpelling(row), cand.selectorSpelling(cr))
}
other := drawAt{wholeTable: cand}
other := surveyAt{wholeTable: cand}
other.wholePins.add(cand, cr)
if want := cand == entered && cr != row; alternatives(whole, other) != want {
t.Errorf("alternatives(%s, %s), both rendered whole, = %v, want %v", entered.selectorSpelling(row), cand.selectorSpelling(cr), !want, want)