Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
fix testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
JayChoi1736 committed Oct 21, 2022
1 parent 4157787 commit 60a43b5
Show file tree
Hide file tree
Showing 12 changed files with 7,821 additions and 9,467 deletions.
30 changes: 3 additions & 27 deletions klaytn/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ import (
"context"
"encoding/json"
"errors"
"github.com/klaytn/klaytn/node/cn/tracers"
"math/big"
"os"
"reflect"
"sort"
"strings"
"testing"

"github.com/klaytn/klaytn/node/cn/tracers"

"github.com/klaytn/klaytn"
"github.com/klaytn/klaytn/blockchain/types"
"github.com/klaytn/klaytn/blockchain/types/account"
Expand Down Expand Up @@ -2510,18 +2511,6 @@ func TestBlock_363753(t *testing.T) {
r, ok = new(big.Int).SetString(tx.Operations[2].Amount.Value, 10)
assert.True(t, ok)
kirReward = new(big.Int).Add(kirReward, r)
} else {
r, ok := new(big.Int).SetString(tx.Operations[1].Amount.Value, 10)
assert.True(t, ok)
cnReward = new(big.Int).Add(cnReward, r)

r, ok = new(big.Int).SetString(tx.Operations[2].Amount.Value, 10)
assert.True(t, ok)
kgfReward = new(big.Int).Add(kgfReward, r)

r, ok = new(big.Int).SetString(tx.Operations[3].Amount.Value, 10)
assert.True(t, ok)
kirReward = new(big.Int).Add(kirReward, r)
}
}

Expand Down Expand Up @@ -2919,18 +2908,6 @@ func TestBlock_363366(t *testing.T) {
r, ok = new(big.Int).SetString(tx.Operations[2].Amount.Value, 10)
assert.True(t, ok)
kirReward = new(big.Int).Add(kirReward, r)
} else {
r, ok := new(big.Int).SetString(tx.Operations[1].Amount.Value, 10)
assert.True(t, ok)
cnReward = new(big.Int).Add(cnReward, r)

r, ok = new(big.Int).SetString(tx.Operations[2].Amount.Value, 10)
assert.True(t, ok)
kgfReward = new(big.Int).Add(kgfReward, r)

r, ok = new(big.Int).SetString(tx.Operations[3].Amount.Value, 10)
assert.True(t, ok)
kirReward = new(big.Int).Add(kirReward, r)
}
}

Expand Down Expand Up @@ -3089,6 +3066,7 @@ func TestBlock_468194(t *testing.T) {

// Ensure types match
jsonResp, err := jsonifyBlock(resp)

assert.NoError(t, err)
assert.Equal(t, correctResp.Block, jsonResp)

Expand Down Expand Up @@ -3565,8 +3543,6 @@ func TestBlock_335049(t *testing.T) {

// Ensure types match
jsonResp, err := jsonifyBlock(resp)

assert.NoError(t, err)
assert.Equal(t, correctResp.Block, jsonResp)

mockJSONRPC.AssertExpectations(t)
Expand Down
Loading

0 comments on commit 60a43b5

Please sign in to comment.