From e242987806d8cc01c1224c41c3841306720967b1 Mon Sep 17 00:00:00 2001 From: bashbunni Date: Tue, 24 Sep 2024 16:58:37 -0700 Subject: [PATCH] refactor(test): update error message for TestSetCursor --- table/table_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/table/table_test.go b/table/table_test.go index c76c11e..2b17b2d 100644 --- a/table/table_test.go +++ b/table/table_test.go @@ -110,7 +110,7 @@ func TestSetCursor(t *testing.T) { ) table.SetCursor(tc.cursor) if table.cursor != tc.expected { - t.Fatalf("cursor out of range. Should be %d, got: %d\n%s", tc.expected, table.cursor, table.View()) + t.Fatalf("wrong cursor value, should be %d, got: %d\n%s", tc.expected, table.cursor, table.View()) } }) t.Run(tc.name+"/ table with headers", func(t *testing.T) { @@ -125,9 +125,8 @@ func TestSetCursor(t *testing.T) { }), ) table.SetCursor(tc.cursor) - t.Fatalf("%#v\n%s", table.SelectedRow(), table.View()) if table.cursor != tc.expected { - t.Fatalf("cursor out of range. Should be %d, got: %d\n%s", tc.expected, table.cursor, table.View()) + t.Fatalf("wrong cursor value, should be %d, got: %d\n%s", tc.expected, table.cursor, table.View()) } }) }