Code coverage report for web3/lib/solidity/int.js

Statements: 100% (12 / 12)      Branches: 100% (0 / 0)      Functions: 100% (3 / 3)      Lines: 100% (12 / 12)      Ignored: none     

All files » web3/lib/solidity/ » int.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 371 1                                   1 1 1     1 1   1 267     1 234     1  
var f = require('./formatters');
var SolidityType = require('./type');
 
/**
 * SolidityTypeInt is a prootype that represents int type
 * It matches:
 * int
 * int[]
 * int[4]
 * int[][]
 * int[3][]
 * int[][6][], ...
 * int32
 * int64[]
 * int8[4]
 * int256[][]
 * int[3][]
 * int64[][6][], ...
 */
var SolidityTypeInt = function () {
    this._inputFormatter = f.formatInputInt;
    this._outputFormatter = f.formatOutputInt;
};
 
SolidityTypeInt.prototype = new SolidityType({});
SolidityTypeInt.prototype.constructor = SolidityTypeInt;
 
SolidityTypeInt.prototype.isType = function (name) {
    return !!name.match(/^int([0-9]*)?(\[([0-9]*)\])*$/);
};
 
SolidityTypeInt.prototype.staticPartLength = function (name) {
    return 32 * this.staticArrayLength(name);
};
 
module.exports = SolidityTypeInt;