Skip to content

Commit fbd1f97

Browse files
committed
fix(tdsuite): verbose tests raised an error
Closes #252. Signed-off-by: Maxime Soulé <[email protected]>
1 parent 6250333 commit fbd1f97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

helpers/tdsuite/suite_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ func TestRun(t *testing.T) {
178178
t.Run("Without ptr: only non-ptr methods", func(t *testing.T) {
179179
defer traceFullNoPtr.clean()
180180
suite := FullNoPtr{}
181-
td.CmpTrue(t, tdsuite.Run(t, suite)) // non-ptr
181+
tb := test.NewTestingTB("TestWithoutPtr")
182+
td.CmpTrue(t, tdsuite.Run(tb, suite)) // non-ptr
182183
ok := td.Cmp(t, traceFullNoPtr.calls, []string{
183184
"Setup",
184185
/**/ "PreTest+Test1",
@@ -207,8 +208,7 @@ func TestRun(t *testing.T) {
207208
}
208209
}
209210
// Yes it is a bit ugly
210-
td.Cmp(t, t, td.Smuggle("output",
211-
td.Contains("Run(): several methods are not accessible as suite is not a pointer but tdsuite_test.FullNoPtr: PostTest, Test2")))
211+
td.CmpEmpty(t, tb.ContainsMessages("Run(): several methods are not accessible as suite is not a pointer but tdsuite_test.FullNoPtr: PostTest, Test2"))
212212
})
213213

214214
t.Run("With ptr: all ptr & non-ptr methods", func(t *testing.T) {

0 commit comments

Comments
 (0)