diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-09 03:24:30 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-01-09 03:24:30 +0800 |
commit | c397e350f4903b13af901762547fcc4d7905d8cd (patch) | |
tree | 00a5397e6d8007ac9db751579f760c9728309404 | |
parent | b6058a837f9a90bd2973e4be54f0eab85e85674e (diff) | |
download | go-tangerine-c397e350f4903b13af901762547fcc4d7905d8cd.tar.gz go-tangerine-c397e350f4903b13af901762547fcc4d7905d8cd.tar.zst go-tangerine-c397e350f4903b13af901762547fcc4d7905d8cd.zip |
mocha opts file && init of parser tests
-rw-r--r-- | lib/abi.js | 1 | ||||
-rw-r--r-- | test/abi.parsers.js | 37 | ||||
-rw-r--r-- | test/mocha.opts | 2 |
3 files changed, 40 insertions, 0 deletions
diff --git a/lib/abi.js b/lib/abi.js index 5a4d64515..e37f477ee 100644 --- a/lib/abi.js +++ b/lib/abi.js @@ -263,3 +263,4 @@ module.exports = { inputParser: inputParser, outputParser: outputParser }; + diff --git a/test/abi.parsers.js b/test/abi.parsers.js new file mode 100644 index 000000000..06a77fb86 --- /dev/null +++ b/test/abi.parsers.js @@ -0,0 +1,37 @@ +var assert = require('assert'); +var abi = require('../lib/abi.js'); + +describe('abi', function() { + describe('inputParser', function() { + it('should parse ...', function() { + + var desc = [{ + "name": "multiply", + "inputs": [ + { + "name": "a", + "type": "uint256" + } + ], + "outputs": [ + { + "name": "d", + "type": "uint256" + } + ] + }]; + + var iParser = abi.inputParser(desc); + assert.equal(iParser.multiply(1), "0x000000000000000000000000000000000000000000000000000000000000000001"); + + }); + }); + + + describe('outputParser', function() { + it('parse ...', function() { + + }); + }); +}); + diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 000000000..b83917bb2 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1,2 @@ +--reporter Nyan + |