From 35030601e194f38da05e7534338add5569196b93 Mon Sep 17 00:00:00 2001 From: adman Date: Sun, 3 May 2026 14:58:04 +0200 Subject: [PATCH] fix PrettyToNbt test to include empty text field and improve error formatting --- text/text_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/text/text_test.go b/text/text_test.go index 35ad340..008815f 100644 --- a/text/text_test.go +++ b/text/text_test.go @@ -229,7 +229,7 @@ func TestPrettyToNbt(t *testing.T) { { name: "real data", f: `§dno gooning`, - want: nbt.Anon{Value: map[string]interface{}{"extra": []interface{}{map[string]interface{}{"color": "light_purple", "text": "no gooning"}}}}, + want: nbt.Anon{Value: map[string]interface{}{"extra": []interface{}{map[string]interface{}{"color": "light_purple", "text": "no gooning"}}, "text": ""}}, }, { name: "reset thing", @@ -242,7 +242,7 @@ func TestPrettyToNbt(t *testing.T) { a := Pretty(tt.f).AsNBT() b := tt.want if !cmp.Equal(a, b) { - t.Errorf("PrettyToNbt() = %v, want %v", a, b) + t.Errorf("PrettyToNbt() = %#v, want %#v", a, b) } }) }