good morning!!!!

Skip to content
Snippets Groups Projects
Commit 823fb299 authored by Marek Kotewicz's avatar Marek Kotewicz
Browse files

tests for parsing output array

parent 1e2c1ae9
Branches
Tags
No related merge requests found
...@@ -716,6 +716,33 @@ describe('abi', function() { ...@@ -716,6 +716,33 @@ describe('abi', function() {
}); });
it('should parse output array', function () {
// given
var d = clone(description);
d[0].outputs = [
{ type: 'int[]' }
];
// when
var parser = abi.outputParser(d);
// then
assert.equal(parser.test("0x" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000005" +
"0000000000000000000000000000000000000000000000000000000000000006")[0][0],
5
);
assert.equal(parser.test("0x" +
"0000000000000000000000000000000000000000000000000000000000000002" +
"0000000000000000000000000000000000000000000000000000000000000005" +
"0000000000000000000000000000000000000000000000000000000000000006")[0][1],
6
);
});
}); });
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment