diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2017-02-21 16:03:39 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2017-02-21 16:03:39 +0100 |
commit | ed288b30de1ac3dcb3ce675c4b9af89eb4e6fcba (patch) | |
tree | 6eb908b839d6c225d95691d91e3d5ef5220f54c1 /utils/merkletrie/internal | |
parent | d6a6decd1be0515faf36256ce06c58c7d662bbd0 (diff) | |
download | go-git-ed288b30de1ac3dcb3ce675c4b9af89eb4e6fcba.tar.gz |
documentation and API improvements
Diffstat (limited to 'utils/merkletrie/internal')
-rw-r--r-- | utils/merkletrie/internal/frame/frame_test.go | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/utils/merkletrie/internal/frame/frame_test.go b/utils/merkletrie/internal/frame/frame_test.go index 9cc0994..516d78b 100644 --- a/utils/merkletrie/internal/frame/frame_test.go +++ b/utils/merkletrie/internal/frame/frame_test.go @@ -89,20 +89,13 @@ func checkFirstAndDrop(c *C, f *Frame, expectedNodeName string, expectedOK bool) } // a mock noder that returns error when Children() is called -type errorNoder struct{} +type errorNoder struct{ noder.Noder } -func (e *errorNoder) Hash() []byte { return nil } -func (e *errorNoder) Name() string { return "" } -func (e *errorNoder) String() string { return "" } -func (e *errorNoder) IsDir() bool { return true } func (e *errorNoder) Children() ([]noder.Noder, error) { return nil, fmt.Errorf("mock error") } -func (e *errorNoder) NumChildren() (int, error) { - return 0, fmt.Errorf("mock error") -} func (s *FrameSuite) TestNewFrameErrors(c *C) { _, err := New(&errorNoder{}) - c.Assert(err, Not(IsNil)) + c.Assert(err, ErrorMatches, "mock error") } |