fix: TestRealStorageResizeDirect and TestRealStorageDirectModeNoPalette bugs

- resize() was writing to wrong array (r.data instead of newData) and using
  wrong elementsPerLong during resize loop
- TestRealStorageDirectModeNoPalette had invalid test data (0x1FFFF needs
  bpe>=17 but test used bpe=9)
This commit is contained in:
adman
2026-04-27 01:45:41 +02:00
parent e810a60848
commit 8a4e44760e
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -292,7 +292,7 @@ func TestRealStorageDirectModeNoPalette(t *testing.T) {
}
data := make([]uint64, 36)
data[0] = 0x1FFFF
data[0] = 0x1FF
s, err := format.ImportDataDirect(data)
if err != nil {
@@ -303,8 +303,8 @@ func TestRealStorageDirectModeNoPalette(t *testing.T) {
if err != nil {
t.Fatalf("Get(0) failed: %v", err)
}
if got != 0x1FFFF {
t.Errorf("Get(0) = %d, want %d", got, 0x1FFFF)
if got != 0x1FF {
t.Errorf("Get(0) = %d, want %d", got, 0x1FF)
}
}