@@ -169,7 +169,7 @@ function runTests (solc, versionText) {
169
169
return { error : 'File not found' } ;
170
170
}
171
171
}
172
- var output = JSON . parse ( solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , findImports ) ) ;
172
+ var output = JSON . parse ( solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , { import : findImports } ) ) ;
173
173
var x = getBytecode ( output , 'cont.sol' , 'x' ) ;
174
174
var L = getBytecode ( output , 'lib.sol' , 'L' ) ;
175
175
st . ok ( typeof x === 'string' ) ;
@@ -193,7 +193,7 @@ function runTests (solc, versionText) {
193
193
function findImports ( path ) {
194
194
return { error : 'File not found' } ;
195
195
}
196
- var output = JSON . parse ( solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , findImports ) ) ;
196
+ var output = JSON . parse ( solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , { import : findImports } ) ) ;
197
197
st . plan ( 3 ) ;
198
198
st . ok ( 'errors' in output ) ;
199
199
// Check if the ParserError exists, but allow others too
@@ -224,7 +224,7 @@ function runTests (solc, versionText) {
224
224
throw new Error ( 'Could not implement this interface properly...' ) ;
225
225
}
226
226
st . throws ( function ( ) {
227
- solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , findImports ) ;
227
+ solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , { import : findImports } ) ;
228
228
} , / ^ E r r o r : C o u l d n o t i m p l e m e n t t h i s i n t e r f a c e p r o p e r l y .../ ) ;
229
229
st . end ( ) ;
230
230
} ) ;
@@ -242,7 +242,7 @@ function runTests (solc, versionText) {
242
242
} ;
243
243
st . throws ( function ( ) {
244
244
solc . lowlevel . compileCallback ( JSON . stringify ( { sources : input } ) , 0 , "this isn't a callback" ) ;
245
- } , / I n v a l i d c a l l b a c k s p e c i f i e d ./ ) ;
245
+ } , / I n v a l i d c a l l b a c k o b j e c t s p e c i f i e d ./ ) ;
246
246
st . end ( ) ;
247
247
} ) ;
248
248
@@ -387,7 +387,7 @@ function runTests (solc, versionText) {
387
387
}
388
388
}
389
389
390
- var output = JSON . parse ( solc . lowlevel . compileStandard ( JSON . stringify ( input ) , findImports ) ) ;
390
+ var output = JSON . parse ( solc . lowlevel . compileStandard ( JSON . stringify ( input ) , { import : findImports } ) ) ;
391
391
st . ok ( bytecodeExists ( output , 'cont.sol' , 'x' ) ) ;
392
392
st . ok ( bytecodeExists ( output , 'lib.sol' , 'L' ) ) ;
393
393
st . end ( ) ;
@@ -462,16 +462,13 @@ function runTests (solc, versionText) {
462
462
}
463
463
}
464
464
465
- var output = JSON . parse ( solc . compile ( JSON . stringify ( input ) , findImports ) ) ;
465
+ var output = JSON . parse ( solc . compile ( JSON . stringify ( input ) , { import : findImports } ) ) ;
466
466
var x = getBytecodeStandard ( output , 'cont.sol' , 'x' ) ;
467
467
st . ok ( typeof x === 'string' ) ;
468
468
st . ok ( x . length > 0 ) ;
469
469
var L = getBytecodeStandard ( output , 'lib.sol' , 'L' ) ;
470
470
st . ok ( typeof L === 'string' ) ;
471
471
st . ok ( L . length > 0 ) ;
472
-
473
- var outputNewApi = JSON . parse ( solc . compile ( JSON . stringify ( input ) , { import : findImports } ) ) ;
474
- st . deepEqual ( output , outputNewApi ) ;
475
472
st . end ( ) ;
476
473
} ) ;
477
474
0 commit comments