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

Statements: 91.67% (11 / 12)      Branches: 100% (0 / 0)      Functions: 66.67% (2 / 3)      Lines: 91.67% (11 / 12)      Ignored: none     

All files » web3/lib/solidity/ » ureal.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       1  
var f = require('./formatters');
var SolidityType = require('./type');
 
/**
 * SolidityTypeUReal is a prootype that represents ureal type
 * It matches:
 * ureal
 * ureal[]
 * ureal[4]
 * ureal[][]
 * ureal[3][]
 * ureal[][6][], ...
 * ureal32
 * ureal64[]
 * ureal8[4]
 * ureal256[][]
 * ureal[3][]
 * ureal64[][6][], ...
 */
var SolidityTypeUReal = function () {
    this._inputFormatter = f.formatInputReal;
    this._outputFormatter = f.formatOutputUReal;
};
 
SolidityTypeUReal.prototype = new SolidityType({});
SolidityTypeUReal.prototype.constructor = SolidityTypeUReal;
 
SolidityTypeUReal.prototype.isType = function (name) {
    return !!name.match(/^ureal([0-9]*)?(\[([0-9]*)\])*$/);
};
 
SolidityTypeUReal.prototype.staticPartLength = function (name) {
    return 32 * this.staticArrayLength(name);
};
 
module.exports = SolidityTypeUReal;