aboutsummaryrefslogtreecommitdiffstats
path: root/utils/merkletrie/change_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'utils/merkletrie/change_test.go')
-rw-r--r--utils/merkletrie/change_test.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/merkletrie/change_test.go b/utils/merkletrie/change_test.go
index c899ff9..4f908ce 100644
--- a/utils/merkletrie/change_test.go
+++ b/utils/merkletrie/change_test.go
@@ -12,6 +12,17 @@ type ChangeSuite struct{}
var _ = Suite(&ChangeSuite{})
+func (s *ChangeSuite) TestActionString(c *C) {
+ action := merkletrie.Insert
+ c.Assert(action.String(), Equals, "Insert")
+
+ action = merkletrie.Delete
+ c.Assert(action.String(), Equals, "Delete")
+
+ action = merkletrie.Modify
+ c.Assert(action.String(), Equals, "Modify")
+}
+
func (s *ChangeSuite) TestUnsupportedAction(c *C) {
a := merkletrie.Action(42)
c.Assert(a.String, PanicMatches, "unsupported action.*")