activate test

pull/7/head
yann300 7 years ago
parent ef504cf157
commit 1ed4c7d354
  1. 10
      .circleci/config.yml
  2. 17
      remix-debug/test/tests.js

@ -30,6 +30,15 @@ jobs:
steps:
- checkout
- run: cd remix-solidity && npm install && npm test
remix-debug:
docker:
- image: circleci/node:7.10
environment:
working_directory: ~/repo
steps:
- checkout
- run: cd remix-debug && npm install && npm test
workflows:
version: 2
@ -38,4 +47,5 @@ workflows:
- remix-lib
- remix-core
- remix-solidity
- remix-debug

@ -8,6 +8,7 @@ var Debugger = require('../src/Ethdebugger')
var compiler = require('solc')
tape('debug contract', function (t) {
t.plan(12)
var privateKey = new Buffer('dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a', 'hex')
var vm = vmCall.initVM(t, privateKey)
var output = compiler.compileStandardWrapper(compilerInput(ballot))
@ -95,16 +96,22 @@ function testDebugging (t, debugManager) {
var sourceMappingDecoder = new remixLib.SourceMappingDecoder()
var breakPointManager = new remixCore.code.BreakpointManager(debugManager, (rawLocation) => {
return sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, ballot)
return sourceMappingDecoder.convertOffsetToLineColumn(rawLocation, sourceMappingDecoder.getLinebreakPositions(ballot))
})
breakPointManager.add({fileName: 'test.sol', row: 24})
breakPointManager.add({fileName: 'test.sol', row: 23})
breakPointManager.event.register('breakpointHit', function (sourceLocation, step) {
t.equal(sourceLocation, '')
t.equal(step, 67)
console.log('breakpointHit')
t.equal(JSON.stringify(sourceLocation), JSON.stringify({ start: 591, length: 1, file: 0, jump: '-' }))
t.equal(step, 73)
})
breakPointManager.jumpNextBreakpoint(true)
breakPointManager.event.register('noBreakpointHit', function () {
t.end('noBreakpointHit')
console.log('noBreakpointHit')
})
breakPointManager.jumpNextBreakpoint(0, true)
}
var ballot = `pragma solidity ^0.4.0;

Loading…
Cancel
Save