Merge pull request #1136 from ethereum/fixRemixLibTest

run remix-lib tests on v0.5.4+commit.9549d8ff
pull/5370/head
yann300 6 years ago committed by GitHub
commit 34ad11de06
  1. 9
      remix-lib/test/txFormat.js
  2. 2
      remix-tests/src/compiler.js

@ -6,8 +6,17 @@ var util = require('../src/util')
var compiler = require('solc') var compiler = require('solc')
var compilerInput = require('../src/helpers/compilerHelper').compilerInput var compilerInput = require('../src/helpers/compilerHelper').compilerInput
var executionContext = require('../src/execution/execution-context') var executionContext = require('../src/execution/execution-context')
var solidityVersion = 'v0.5.4+commit.9549d8ff'
/* tape *********************************************************** */ /* tape *********************************************************** */
tape('load compiler ' + solidityVersion, function (t) {
compiler.loadRemoteVersion(solidityVersion, (error, solcSnapshot) => {
if (error) console.log(error)
console.warn('testing *txFormat* against', solidityVersion)
compiler = solcSnapshot
t.end()
})
})
var context var context
tape('ContractParameters - (TxFormat.buildData) - format input parameters', function (t) { tape('ContractParameters - (TxFormat.buildData) - format input parameters', function (t) {

@ -4,7 +4,7 @@ var async = require('async')
var path = require('path') var path = require('path')
let RemixCompiler = require('remix-solidity').Compiler let RemixCompiler = require('remix-solidity').Compiler
String.prototype.regexIndexOf = function (regex, startpos) { String.prototype.regexIndexOf = function (regex, startpos) { // eslint-disable-line
var indexOf = this.substring(startpos || 0).search(regex) var indexOf = this.substring(startpos || 0).search(regex)
return (indexOf >= 0) ? (indexOf + (startpos || 0)) : indexOf return (indexOf >= 0) ? (indexOf + (startpos || 0)) : indexOf
} }

Loading…
Cancel
Save