From deff9e0a41eca43f832314219241c9a63cf8007e Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Fri, 13 Jul 2018 16:48:55 +0200 Subject: add basic tests for Bug and OperationIterator --- bug/operation_pack.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bug/operation_pack.go') diff --git a/bug/operation_pack.go b/bug/operation_pack.go index e3d64e72..21376b9c 100644 --- a/bug/operation_pack.go +++ b/bug/operation_pack.go @@ -15,6 +15,10 @@ func (opp *OperationPack) Append(op Operation) { opp.Operations = append(opp.Operations, op) } +func (opp *OperationPack) IsEmpty() bool { + return len(opp.Operations) == 0 +} + func (opp *OperationPack) IsValid() bool { - return len(opp.Operations) > 0 + return !opp.IsEmpty() } -- cgit