Skip to content

Commit

Permalink
fix(tdsuite): verbose tests raised an error
Browse files Browse the repository at this point in the history
Closes #252.

Signed-off-by: Maxime Soulé <[email protected]>
  • Loading branch information
maxatome committed Dec 27, 2023
1 parent 6250333 commit fbd1f97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helpers/tdsuite/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit fbd1f97

Please sign in to comment.