aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/abi.js1
-rw-r--r--test/abi.parsers.js37
-rw-r--r--test/mocha.opts2
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
+