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

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

All files » web3/lib/solidity/ » real.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 28     1  
var f = require('./formatters');
var SolidityType = require('./type');
 
/**
 * SolidityTypeReal is a prootype that represents real type
 * It matches:
 * real
 * real[]
 * real[4]
 * real[][]
 * real[3][]
 * real[][6][], ...
 * real32
 * real64[]
 * real8[4]
 * real256[][]
 * real[3][]
 * real64[][6][], ...
 */
var SolidityTypeReal = function () {
    this._inputFormatter = f.formatInputReal;
    this._outputFormatter = f.formatOutputReal;
};
 
SolidityTypeReal.prototype = new SolidityType({});
SolidityTypeReal.prototype.constructor = SolidityTypeReal;
 
SolidityTypeReal.prototype.isType = function (name) {
    return !!name.match(/real([0-9]*)?(\[([0-9]*)\])?/);
};
 
SolidityTypeReal.prototype.staticPartLength = function (name) {
    return 32 * this.staticArrayLength(name);
};
 
module.exports = SolidityTypeReal;