From fbd1f976bd253d2dfa1edc8468609d0a26b57ba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20Soul=C3=A9?= Date: Wed, 27 Dec 2023 18:03:39 +0100 Subject: [PATCH] fix(tdsuite): verbose tests raised an error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #252. Signed-off-by: Maxime Soulé --- helpers/tdsuite/suite_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helpers/tdsuite/suite_test.go b/helpers/tdsuite/suite_test.go index df35c885..73160291 100644 --- a/helpers/tdsuite/suite_test.go +++ b/helpers/tdsuite/suite_test.go @@ -178,7 +178,8 @@ func TestRun(t *testing.T) { t.Run("Without ptr: only non-ptr methods", func(t *testing.T) { defer traceFullNoPtr.clean() suite := FullNoPtr{} - td.CmpTrue(t, tdsuite.Run(t, suite)) // non-ptr + tb := test.NewTestingTB("TestWithoutPtr") + td.CmpTrue(t, tdsuite.Run(tb, suite)) // non-ptr ok := td.Cmp(t, traceFullNoPtr.calls, []string{ "Setup", /**/ "PreTest+Test1", @@ -207,8 +208,7 @@ func TestRun(t *testing.T) { } } // Yes it is a bit ugly - td.Cmp(t, t, td.Smuggle("output", - td.Contains("Run(): several methods are not accessible as suite is not a pointer but tdsuite_test.FullNoPtr: PostTest, Test2"))) + td.CmpEmpty(t, tb.ContainsMessages("Run(): several methods are not accessible as suite is not a pointer but tdsuite_test.FullNoPtr: PostTest, Test2")) }) t.Run("With ptr: all ptr & non-ptr methods", func(t *testing.T) {