git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 92bdd565f07820a196efab77f374ae697b1f1f6f

InterfaceRunner: use TestEnvironment

Alex Beregszaszi committed on 8/16/2016, 10:26:03 PM
Parent: 7b74d04925fc2be0babc02e191f66a3653f83dd4

Files changed

tests/interfaceRunner.jschanged
tests/interfaceRunner.jsView
@@ -3,9 +3,9 @@
33 const fs = require('fs')
44 const cp = require('child_process')
55
66 const Kernel = require('../index.js')
7-const Environment = require('../environment.js')
7+const TestEnvironment = require('../testEnvironment.js')
88 const Interface = require('../interface.js')
99 const DebugInterface = require('../debugInterface.js')
1010 const dir = __dirname + '/interface'
1111 // get the test names
@@ -17,13 +17,13 @@
1717 tape(testName, (t) => {
1818 // Compile Command
1919 cp.execSync(`${__dirname}/../tools/sexpr-wasm-prototype/out/sexpr-wasm ${dir}/${testName}.wast -o ${dir}/${testName}.wasm`)
2020 const buffer = fs.readFileSync(`${dir}/${testName}.wasm`)
21- const envData = fs.readFileSync(`${dir}/${testName}.json`)
22- const ethereum = new Kernel(new Environment(envData))
21+ const envData = fs.readFileSync(`${dir}/${testName}.json`).toString()
22+ const ethereum = new Kernel(new TestEnvironment(envData))
2323
2424 // manually `callHander`
25- const environment = new Environment(envData)
25+ const environment = new TestEnvironment(envData)
2626 environment.parent = ethereum
2727 const testContract = new Kernel(environment)
2828 const ethInterface = new Interface(environment, testContract)
2929 const debugInterface = new DebugInterface()

Built with git-ssb-web