Skip to content

Commit

Permalink
Merge pull request #112 from MarvinJWendt/98-improve-output-of-assert…
Browse files Browse the repository at this point in the history
…notequal
  • Loading branch information
MarvinJWendt committed Apr 6, 2022
2 parents b115b6a + 8d80002 commit b089f8e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<a name="unreleased"></a>
## [Unreleased]


<a name="v0.3.3"></a>
## [v0.3.3] - 2022-04-05
### Bug Fixes
- correct file perms on nested snapshot dir

Expand Down Expand Up @@ -295,7 +298,8 @@ Functions have a new structure.
- **internal:** rewrite `Fail` for a nicer output


[Unreleased]: https://github.com/MarvinJWendt/testza/compare/v0.3.2...HEAD
[Unreleased]: https://github.com/MarvinJWendt/testza/compare/v0.3.3...HEAD
[v0.3.3]: https://github.com/MarvinJWendt/testza/compare/v0.3.2...v0.3.3
[v0.3.2]: https://github.com/MarvinJWendt/testza/compare/v0.3.1...v0.3.2
[v0.3.1]: https://github.com/MarvinJWendt/testza/compare/v0.3.0...v0.3.1
[v0.3.0]: https://github.com/MarvinJWendt/testza/compare/v0.2.15...v0.3.0
Expand Down
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-3161-magenta?style=flat-square" alt="Unit test count"><!-- unittestcount:end -->
<!-- unittestcount:start --><img src="https://img.shields.io/badge/Unit_Tests-3167-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
9 changes: 8 additions & 1 deletion assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,14 @@ func AssertNotEqual(t testRunner, expected interface{}, actual interface{}, msg
}

if internal.IsEqual(expected, actual) {
internal.Fail(t, "Two objects that !!should not be equal!!, are equal.", internal.NewObjectsExpectedActual(expected, actual), msg...)
objects := internal.Objects{
{
Name: "Both Objects",
NameStyle: pterm.NewStyle(pterm.FgMagenta),
Data: expected,
},
}
internal.Fail(t, "Two objects that !!should not be equal!!, are equal.", objects, msg...)
}
}

Expand Down

0 comments on commit b089f8e

Please sign in to comment.