mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
accounts/abi: fix error message in test
This commit is contained in:
parent
6f8e28b4aa
commit
7f24420a5e
3 changed files with 8 additions and 8 deletions
|
|
@ -225,7 +225,7 @@ func testLinkCase(tcInput linkTestCaseInput) error {
|
|||
}
|
||||
|
||||
if len(res.Txs) != len(tcInput.expectDeployed) {
|
||||
return fmt.Errorf("got %d deployed contracts. expected %d.\n", len(res.Addresses), len(tcInput.expectDeployed))
|
||||
return fmt.Errorf("got %d deployed contracts. expected %d.\n", len(res.Txs), len(tcInput.expectDeployed))
|
||||
}
|
||||
for contract := range tcInput.expectDeployed {
|
||||
pattern := crypto.Keccak256Hash([]byte(string(contract))).String()[2:36]
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ done:
|
|||
t.Fatalf("expected e1Count of 2 from filter call. got %d", e1Count)
|
||||
}
|
||||
if e2Count != 1 {
|
||||
t.Fatalf("expected e2Count of 1 from filter call. got %d", e1Count)
|
||||
t.Fatalf("expected e2Count of 1 from filter call. got %d", e2Count)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -234,13 +234,13 @@ func TestConvertType(t *testing.T) {
|
|||
t.Errorf("ConvertType failed, got %v want %v", out2[0].X, big.NewInt(1))
|
||||
}
|
||||
if out2[0].Y.Cmp(big.NewInt(2)) != 0 {
|
||||
t.Errorf("ConvertType failed, got %v want %v", out2[1].Y, big.NewInt(2))
|
||||
t.Errorf("ConvertType failed, got %v want %v", out2[0].Y, big.NewInt(2))
|
||||
}
|
||||
if out2[1].X.Cmp(big.NewInt(3)) != 0 {
|
||||
t.Errorf("ConvertType failed, got %v want %v", out2[0].X, big.NewInt(1))
|
||||
t.Errorf("ConvertType failed, got %v want %v", out2[1].X, big.NewInt(3))
|
||||
}
|
||||
if out2[1].Y.Cmp(big.NewInt(4)) != 0 {
|
||||
t.Errorf("ConvertType failed, got %v want %v", out2[1].Y, big.NewInt(2))
|
||||
t.Errorf("ConvertType failed, got %v want %v", out2[1].Y, big.NewInt(4))
|
||||
}
|
||||
// Array Type
|
||||
val3 := reflect.New(reflect.ArrayOf(2, reflect.StructOf(fields)))
|
||||
|
|
@ -253,12 +253,12 @@ func TestConvertType(t *testing.T) {
|
|||
t.Errorf("ConvertType failed, got %v want %v", out3[0].X, big.NewInt(1))
|
||||
}
|
||||
if out3[0].Y.Cmp(big.NewInt(2)) != 0 {
|
||||
t.Errorf("ConvertType failed, got %v want %v", out3[1].Y, big.NewInt(2))
|
||||
t.Errorf("ConvertType failed, got %v want %v", out3[0].Y, big.NewInt(2))
|
||||
}
|
||||
if out3[1].X.Cmp(big.NewInt(3)) != 0 {
|
||||
t.Errorf("ConvertType failed, got %v want %v", out3[0].X, big.NewInt(1))
|
||||
t.Errorf("ConvertType failed, got %v want %v", out3[1].X, big.NewInt(3))
|
||||
}
|
||||
if out3[1].Y.Cmp(big.NewInt(4)) != 0 {
|
||||
t.Errorf("ConvertType failed, got %v want %v", out3[1].Y, big.NewInt(2))
|
||||
t.Errorf("ConvertType failed, got %v want %v", out3[1].Y, big.NewInt(4))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue