Skip to content

Commit

Permalink
Update test_fixtures.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb authored Jan 7, 2023
1 parent feb41ee commit 182e6ca
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions abicoder/test/test_fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@

class TestFixtures < MiniTest::Test

def assert_bin( exp, bin ) ## note: always check for BINARY encoding too
assert bin.encoding == Encoding::BINARY
assert_equal exp, bin
end



def test_basic

tests = read_yml( '../test/abicoder/basic.yml' )
Expand All @@ -39,7 +32,10 @@ def test_basic
=end
if hex
data = hex( hex ) ## convert hex string to binary string
assert_bin data, ABI.encode( types, args )
bin = ABI.encode( types, args )
assert bin.encoding == Encoding::BINARY ## note: always check for BINARY encoding too
assert_equal data, bin

assert_equal args, ABI.decode( types, data )
end
assert_equal args, ABI.decode( types, ABI.encode( types, args ))
Expand Down

0 comments on commit 182e6ca

Please sign in to comment.