From d0079a8ef8b03347cd91be67dd382707238d5d74 Mon Sep 17 00:00:00 2001 From: Alex Gartner Date: Thu, 24 Oct 2024 10:24:05 -0700 Subject: [PATCH] Use Eq to compare uint256 --- x/evm/keeper/statedb_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index 9f8fe1fb..b493bd5c 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -89,9 +89,9 @@ func (suite *KeeperTestSuite) TestAddBalance() { post := vmdb.GetBalance(suite.address) if tc.isNoOp { - suite.Require().Equal(prev.String(), post.String()) + suite.Require().True(prev.Eq(post)) } else { - suite.Require().Equal(new(uint256.Int).Add(prev, tc.amount).String(), post.String()) + suite.Require().True(new(uint256.Int).Add(prev, tc.amount).Eq(post)) } }) } @@ -136,9 +136,9 @@ func (suite *KeeperTestSuite) TestSubBalance() { post := vmdb.GetBalance(suite.address) if tc.isNoOp { - suite.Require().Equal(prev.String(), post.String()) + suite.Require().True(prev.Eq(post)) } else { - suite.Require().Equal(new(uint256.Int).Sub(prev, tc.amount).String(), post.String()) + suite.Require().True(new(uint256.Int).Sub(prev, tc.amount).Eq(post)) } }) }