From 92f2abdf769f52ea8e5e6d02bf326744e926f5b4 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 5 Mar 2014 10:42:51 +0100 Subject: Partially refactored server/txpool/block manager/block chain The Ethereum structure now complies to a EthManager interface which is being used by the tx pool, block manager and block chain in order to gain access to each other. It's become simpeler. TODO: BlockManager => StateManager --- ethutil/value_test.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ethutil/value_test.go') diff --git a/ethutil/value_test.go b/ethutil/value_test.go index 0e2da5328..a100f44bc 100644 --- a/ethutil/value_test.go +++ b/ethutil/value_test.go @@ -50,3 +50,16 @@ func TestValueTypes(t *testing.T) { t.Errorf("expected BigInt to return '%v', got %v", bigExp, bigInt.BigInt()) } } + +func TestIterator(t *testing.T) { + value := NewValue([]interface{}{1, 2, 3}) + it := value.NewIterator() + values := []uint64{1, 2, 3} + i := 0 + for it.Next() { + if values[i] != it.Value().Uint() { + t.Errorf("Expected %d, got %d", values[i], it.Value().Uint()) + } + i++ + } +} -- cgit v1.2.3