diff options
author | Remco Bloemen <remco@wicked.ventures> | 2018-06-14 00:12:45 +0800 |
---|---|---|
committer | Remco Bloemen <remco@wicked.ventures> | 2018-06-23 19:53:38 +0800 |
commit | 384cd2f6059bba994a6af2992a7df4909e24897c (patch) | |
tree | fa4f1ca39a91457b290e3c3c748a7cb3e724b10b /packages/contracts/test | |
parent | 425af46f98c83e2796aaf0b946d250193393754c (diff) | |
download | dexon-0x-contracts-384cd2f6059bba994a6af2992a7df4909e24897c.tar dexon-0x-contracts-384cd2f6059bba994a6af2992a7df4909e24897c.tar.gz dexon-0x-contracts-384cd2f6059bba994a6af2992a7df4909e24897c.tar.bz2 dexon-0x-contracts-384cd2f6059bba994a6af2992a7df4909e24897c.tar.lz dexon-0x-contracts-384cd2f6059bba994a6af2992a7df4909e24897c.tar.xz dexon-0x-contracts-384cd2f6059bba994a6af2992a7df4909e24897c.tar.zst dexon-0x-contracts-384cd2f6059bba994a6af2992a7df4909e24897c.zip |
Add trailing garbage testcase for LibBytes.equals
Diffstat (limited to 'packages/contracts/test')
-rw-r--r-- | packages/contracts/test/libraries/lib_bytes.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts index 0c8431a6a..5edb5835a 100644 --- a/packages/contracts/test/libraries/lib_bytes.ts +++ b/packages/contracts/test/libraries/lib_bytes.ts @@ -172,6 +172,16 @@ describe('LibBytes', () => { ); return expect(equals).to.be.false(); }); + + describe('should ignore trailing data', () => { + it('should return true when both < 32 bytes', async () => { + const equals = await libBytes.publicEqualsPop1.callAsync( + '0x0102', + '0x0103', + ); + return expect(equals).to.be.true(); + }); + }); }); describe('deepCopyBytes', () => { |