Skip to content

Commit

Permalink
Merge pull request #144 from MarvinJWendt/117-expected-object-should-…
Browse files Browse the repository at this point in the history
…be-green-in-assertlen
  • Loading branch information
MarvinJWendt committed Apr 7, 2022
2 parents 860383e + 32a5449 commit 531f8fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</a>

<a href="https://codecov.io/gh/MarvinJWendt/testza">
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-3213-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-3211-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
</a>

<a href="https://pkg.go.dev/github.com/MarvinJWendt/testza" target="_blank">
Expand Down
6 changes: 3 additions & 3 deletions assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -675,14 +675,14 @@ func AssertLen(t testRunner, object interface{}, length int, msg ...interface{})
internal.Fail(t, "The length of 'object' !!is not!! the expected length.", internal.Objects{
{
Name: "Expected length",
NameStyle: pterm.NewStyle(pterm.FgRed),
NameStyle: pterm.NewStyle(pterm.FgLightGreen),
Data: fmt.Sprint(length) + "\n",
DataStyle: pterm.NewStyle(pterm.FgRed),
DataStyle: pterm.NewStyle(pterm.FgGreen),
Raw: true,
},
{
Name: "Actual length",
NameStyle: pterm.NewStyle(pterm.FgRed),
NameStyle: pterm.NewStyle(pterm.FgLightRed),
Data: fmt.Sprint(v.Len()) + "\n",
DataStyle: pterm.NewStyle(pterm.FgRed),
Raw: true,
Expand Down

0 comments on commit 531f8fc

Please sign in to comment.