Skip to content

Commit

Permalink
Merge pull request #142 from MarvinJWendt/118-improve-output-of-asser…
Browse files Browse the repository at this point in the history
…tless
  • Loading branch information
MarvinJWendt committed Apr 7, 2022
2 parents 3af7b04 + e5935e2 commit d5fd12d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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-3203-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-3207-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
5 changes: 4 additions & 1 deletion assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,10 @@ func AssertLess(t testRunner, object1, object2 interface{}, msg ...interface{})
}

if !(v1 < v2) {
internal.Fail(t, "An object that !!should be less!! than the second object is not.", internal.Objects{{Name: "Object 1", Data: object1}, {Name: "Should be less than object 2", Data: object2}}, msg...)
internal.Fail(t, "An object that !!should be less!! than the second object is not.", internal.Objects{
internal.NewObjectsSingleNamed("Should be less than", object1)[0],
internal.NewObjectsSingleNamed("Actual", object2)[0],
}, msg...)
}
}

Expand Down

0 comments on commit d5fd12d

Please sign in to comment.