Update assembly unit tests

next
cgewecke 5 years ago
parent 91c5202483
commit b558f21f8c
  1. 31
      test/units/assembly.js

@ -1,31 +1,16 @@
/* eslint-env node, mocha */ const assert = require('assert');
const util = require('./../util/util.js');
/*const solc = require('solc'); describe('assembly expressions', () => {
const getInstrumentedVersion = require('./../lib/instrumentSolidity.js');
const util = require('./util/util.js');
const path = require('path');*/
/**
* NB: passing '1' to solc as an option activates the optimiser
* NB: solc will throw if there is a compilation error, causing the test to fail
* and passing the error to mocha.
*/
/*describe('generic expressions', () => {
const filePath = path.resolve('./test.sol');
it('should compile after instrumenting an assembly function with spaces in parameters', () => { it('should compile after instrumenting an assembly function with spaces in parameters', () => {
const contract = util.getCode('assembly/spaces-in-function.sol'); const info = util.instrumentAndCompile('assembly/spaces-in-function');
const info = getInstrumentedVersion(contract, filePath); util.report(info.solcOutput.errors);
const output = JSON.parse(solc.compile(util.codeToCompilerInput(info.contract)));
util.report(output.errors);
}); });
it('should compile after instrumenting an assembly if statement', () => { it('should compile after instrumenting an assembly if statement', () => {
const contract = util.getCode('assembly/if.sol'); const info = util.instrumentAndCompile('assembly/if');
const info = getInstrumentedVersion(contract, filePath); util.report(info.solcOutput.errors);
const output = JSON.parse(solc.compile(util.codeToCompilerInput(info.contract)));
util.report(output.errors);
}); });
});*/ });

Loading…
Cancel
Save