aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/event_test.go
diff options
context:
space:
mode:
authorMartin Holst Swende <martin@swende.se>2017-12-21 23:18:37 +0800
committerMartin Holst Swende <martin@swende.se>2017-12-23 02:26:57 +0800
commitc095c87e117785ba5467487336215f86a958409b (patch)
tree74ff72e3798c2f14220113bc1b839d57141a0a47 /accounts/abi/event_test.go
parent73d4a57d47d3381faa0516b319fa5598e71681f9 (diff)
downloadgo-tangerine-c095c87e117785ba5467487336215f86a958409b.tar
go-tangerine-c095c87e117785ba5467487336215f86a958409b.tar.gz
go-tangerine-c095c87e117785ba5467487336215f86a958409b.tar.bz2
go-tangerine-c095c87e117785ba5467487336215f86a958409b.tar.lz
go-tangerine-c095c87e117785ba5467487336215f86a958409b.tar.xz
go-tangerine-c095c87e117785ba5467487336215f86a958409b.tar.zst
go-tangerine-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.go10
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)
}
-*/