diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-15 22:51:25 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-15 22:51:25 +0800 |
commit | 46b932ccc03b0251d97084bbbde5193532b5618f (patch) | |
tree | 1bc3cd26f724f7ef83a77cc2ab1d0947c7882f22 /test | |
parent | f85f77f6cc536b94368c51edec2159d17d0672f6 (diff) | |
download | go-tangerine-46b932ccc03b0251d97084bbbde5193532b5618f.tar go-tangerine-46b932ccc03b0251d97084bbbde5193532b5618f.tar.gz go-tangerine-46b932ccc03b0251d97084bbbde5193532b5618f.tar.bz2 go-tangerine-46b932ccc03b0251d97084bbbde5193532b5618f.tar.lz go-tangerine-46b932ccc03b0251d97084bbbde5193532b5618f.tar.xz go-tangerine-46b932ccc03b0251d97084bbbde5193532b5618f.tar.zst go-tangerine-46b932ccc03b0251d97084bbbde5193532b5618f.zip |
negative integers support
Diffstat (limited to 'test')
-rw-r--r-- | test/abi.parsers.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/abi.parsers.js b/test/abi.parsers.js index 03cc90dfe..925324461 100644 --- a/test/abi.parsers.js +++ b/test/abi.parsers.js @@ -55,7 +55,7 @@ describe('abi', function() { }); - it('should parse input uint', function() { + it('should parse input uint256', function() { // given var d = clone(description); @@ -88,6 +88,9 @@ describe('abi', function() { // then assert.equal(parser.test(1), "0000000000000000000000000000000000000000000000000000000000000001"); assert.equal(parser.test(10), "000000000000000000000000000000000000000000000000000000000000000a"); + assert.equal(parser.test(-1), "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + assert.equal(parser.test(-2), "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"); + assert.equal(parser.test(-16), "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0"); }); @@ -106,6 +109,9 @@ describe('abi', function() { // then assert.equal(parser.test(1), "0000000000000000000000000000000000000000000000000000000000000001"); assert.equal(parser.test(10), "000000000000000000000000000000000000000000000000000000000000000a"); + assert.equal(parser.test(-1), "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + assert.equal(parser.test(-2), "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"); + assert.equal(parser.test(-16), "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0"); }); @@ -124,6 +130,9 @@ describe('abi', function() { // then assert.equal(parser.test(1), "0000000000000000000000000000000000000000000000000000000000000001"); assert.equal(parser.test(10), "000000000000000000000000000000000000000000000000000000000000000a"); + assert.equal(parser.test(-1), "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + assert.equal(parser.test(-2), "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"); + assert.equal(parser.test(-16), "fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0"); }); |