You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
481 B
21 lines
481 B
var fs = require('fs');
|
|
var path = require('path');
|
|
|
|
/**
|
|
* Retrieves code at source/<testType>/<test>.sol
|
|
* @param {String} _path path relative to `./source`
|
|
* @return {String} contents of a .sol file
|
|
*/
|
|
module.exports.getCode = function(_path){
|
|
return fs.readFileSync (path.join (__dirname, './../sources/' + _path), 'utf8')
|
|
}
|
|
|
|
module.exports.report = function(errors){
|
|
if (errors){
|
|
throw new Error("Instrumented solidity invalid: " + errors)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|