From 3b7462a6c8968b1b2ff4c6b9d51b037ac2211e63 Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Sat, 22 Mar 2025 21:04:18 +0200 Subject: [PATCH] refactor(tests): some test renaming --- spec/integration/iferr_test.lua | 4 ++-- spec/integration/impl_test.lua | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/integration/iferr_test.lua b/spec/integration/iferr_test.lua index 84cf8d6..fff53ba 100644 --- a/spec/integration/iferr_test.lua +++ b/spec/integration/iferr_test.lua @@ -1,7 +1,7 @@ local t = require "spec.testutils" local child, T = t.setup "iferr" -T["iferr"]["works"] = function() +T["iferr"]["should add if != nil {"] = function() local rs = t.setup_test("iferr/iferr", child, { 8, 2 }) child.cmd "GoIfErr" child.cmd "write" @@ -10,7 +10,7 @@ T["iferr"]["works"] = function() t.cleanup(rs) end -T["iferr"]["works with custom message"] = function() +T["iferr"]["should add if err with custom message"] = function() child.lua [[ require("gopher").setup { iferr = { message = 'fmt.Errorf("failed to %w", err)' } diff --git a/spec/integration/impl_test.lua b/spec/integration/impl_test.lua index a70b581..602d2b1 100644 --- a/spec/integration/impl_test.lua +++ b/spec/integration/impl_test.lua @@ -1,7 +1,7 @@ local t = require "spec.testutils" local child, T = t.setup "impl" -T["impl"]["works w io.Writer"] = function() +T["impl"]["should do impl with 'w io.Writer'"] = function() local rs = t.setup_test("impl/writer", child, { 3, 0 }) child.cmd "GoImpl w io.Writer" child.cmd "write" @@ -12,7 +12,7 @@ T["impl"]["works w io.Writer"] = function() t.cleanup(rs) end -T["impl"]["works r Read io.Reader"] = function() +T["impl"]["should work with full input, 'r Read io.Reader'"] = function() local rs = t.setup_test("impl/reader", child) child.cmd "GoImpl r Read io.Reader" child.cmd "write" @@ -22,7 +22,7 @@ T["impl"]["works r Read io.Reader"] = function() t.cleanup(rs) end -T["impl"]["works io.Closer"] = function() +T["impl"]["should work with minimal input 'io.Closer'"] = function() local rs = t.setup_test("impl/closer", child, { 3, 6 }) child.cmd "GoImpl io.Closer" child.cmd "write"