-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port
codec
package tests to quicktest
Implement `NodeContentEquals` quicktest checker that checks two given nodes have equal content by comparing their printout using `printer.Sprint`. This simplifies the tests that use `datamode.DeepEqual` by performing an equivalent check while producing a human-readable error when nodes are not equal. The naming for this check is inspired by a similar equality check in quicktest, named `ContentEquals`. Port the tests in `codec` package to quicktest; use: - `qt.Assert` for `wish.Require` - `qt.Check` for `wish.Wish` - `qt.IsTrue` for `ShouldEqual` over `true` - `qt.IsFalse` for `ShouldEqual` over `false` - `qt.IsNil` for `ShouldEqual` over `nil` - `NodeContentEquals` for `ShouldEqual` over nodes - `NodeContentEquals` for `datamodel.DeepEqual` over nodes Update `NodeContentEquals` for `datamodel.DeepEqual` over nodes in `node` package while at it. Port `node/mixins/TestSplitExact` over to quicktest missed out in earlier PRs. Note, to assert equality `CmpEqual` is used with an `Exporter` that exports all unexpored fields. Address TODO in node tests by using `NodeContentEquals` to check node equality. Relates to: - #219 Depends on: - #294
- Loading branch information
Showing
17 changed files
with
217 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.