activate test

pull/3094/head
yann300 7 years ago
parent b687a2befa
commit 3f6e4c52a0
  1. 10
      .circleci/config.yml
  2. 17
      remix-debug/test/tests.js

@ -30,6 +30,15 @@ jobs:
steps: steps:
- checkout - checkout
- run: cd remix-solidity && npm install && npm test - 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: workflows:
version: 2 version: 2
@ -38,4 +47,5 @@ workflows:
- remix-lib - remix-lib
- remix-core - remix-core
- remix-solidity - remix-solidity
- remix-debug

@ -8,6 +8,7 @@ var Debugger = require('../src/Ethdebugger')
var compiler = require('solc') var compiler = require('solc')
tape('debug contract', function (t) { tape('debug contract', function (t) {
t.plan(12)
var privateKey = new Buffer('dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a', 'hex') var privateKey = new Buffer('dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a', 'hex')
var vm = vmCall.initVM(t, privateKey) var vm = vmCall.initVM(t, privateKey)
var output = compiler.compileStandardWrapper(compilerInput(ballot)) var output = compiler.compileStandardWrapper(compilerInput(ballot))
@ -95,16 +96,22 @@ function testDebugging (t, debugManager) {
var sourceMappingDecoder = new remixLib.SourceMappingDecoder() var sourceMappingDecoder = new remixLib.SourceMappingDecoder()
var breakPointManager = new remixCore.code.BreakpointManager(debugManager, (rawLocation) => { 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) { breakPointManager.event.register('breakpointHit', function (sourceLocation, step) {
t.equal(sourceLocation, '') console.log('breakpointHit')
t.equal(step, 67) 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; var ballot = `pragma solidity ^0.4.0;

Loading…
Cancel
Save