diff options
author | Martin Holst Swende <martin@swende.se> | 2017-12-21 23:18:37 +0800 |
---|---|---|
committer | Martin Holst Swende <martin@swende.se> | 2017-12-23 02:26:57 +0800 |
commit | c095c87e117785ba5467487336215f86a958409b (patch) | |
tree | 74ff72e3798c2f14220113bc1b839d57141a0a47 /accounts/abi/event_test.go | |
parent | 73d4a57d47d3381faa0516b319fa5598e71681f9 (diff) | |
download | dexon-c095c87e117785ba5467487336215f86a958409b.tar dexon-c095c87e117785ba5467487336215f86a958409b.tar.gz dexon-c095c87e117785ba5467487336215f86a958409b.tar.bz2 dexon-c095c87e117785ba5467487336215f86a958409b.tar.lz dexon-c095c87e117785ba5467487336215f86a958409b.tar.xz dexon-c095c87e117785ba5467487336215f86a958409b.tar.zst dexon-c095c87e117785ba5467487336215f86a958409b.zip |
accounts/abi: merging of https://github.com/ethereum/go-ethereum/pull/15452 + lookup by id
Diffstat (limited to 'accounts/abi/event_test.go')
-rw-r--r-- | accounts/abi/event_test.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/accounts/abi/event_test.go b/accounts/abi/event_test.go index 93740f6a5..cca61e433 100644 --- a/accounts/abi/event_test.go +++ b/accounts/abi/event_test.go @@ -225,7 +225,7 @@ func TestEventTupleUnpack(t *testing.T) { err := unpackTestEventData(tc.dest, tc.data, tc.jsonLog, assert) if tc.error == "" { assert.Nil(err, "Should be able to unpack event data.") - assert.Equal(tc.expected, tc.dest) + assert.Equal(tc.expected, tc.dest, tc.name) } else { assert.EqualError(err, tc.error) } @@ -243,11 +243,10 @@ func unpackTestEventData(dest interface{}, hexData string, jsonEvent []byte, ass } /* -!TODO enable these when the fix is in. Taken from +Taken from https://github.com/ethereum/go-ethereum/pull/15568 - */ -/* + type testResult struct { Values [2]*big.Int Value1 *big.Int @@ -309,10 +308,9 @@ func TestEventIndexedWithArrayUnpack(t *testing.T) { b.Write(packNum(reflect.ValueOf(32))) b.Write(packNum(reflect.ValueOf(len(stringOut)))) b.Write(common.RightPadBytes([]byte(stringOut), 32)) - fmt.Println(b.Bytes()) + var rst testStruct require.NoError(t, abi.Unpack(&rst, "test", b.Bytes())) require.Equal(t, [2]uint8{0, 0}, rst.Value1) require.Equal(t, stringOut, rst.Value2) } -*/ |