@@ -329,9 +329,9 @@ tape('Compilation', function (t) {
329
329
st . end ( ) ;
330
330
} ) ;
331
331
332
- t . test ( 'compiling standard JSON' , function ( st ) {
333
- if ( ! solc . supportsStandard ) {
334
- st . skip ( 'Not supported by solc ' ) ;
332
+ t . test ( 'compiling standard JSON (using lowlevel API) ' , function ( st ) {
333
+ if ( typeof solc . lowlevel . compileStandard !== 'function' ) {
334
+ st . skip ( 'Low-level compileStandard interface not implemented by this compiler version. ' ) ;
335
335
st . end ( ) ;
336
336
return ;
337
337
}
@@ -363,15 +363,15 @@ tape('Compilation', function (t) {
363
363
}
364
364
}
365
365
366
- var output = JSON . parse ( solc . compileStandard ( JSON . stringify ( input ) ) ) ;
366
+ var output = JSON . parse ( solc . lowlevel . compileStandard ( JSON . stringify ( input ) ) ) ;
367
367
st . ok ( bytecodeExists ( output , 'cont.sol' , 'x' ) ) ;
368
368
st . ok ( bytecodeExists ( output , 'lib.sol' , 'L' ) ) ;
369
369
st . end ( ) ;
370
370
} ) ;
371
371
372
- t . test ( 'invalid source code fails properly with standard JSON' , function ( st ) {
373
- if ( ! solc . supportsStandard ) {
374
- st . skip ( 'Not supported by solc ' ) ;
372
+ t . test ( 'invalid source code fails properly with standard JSON (using lowlevel API) ' , function ( st ) {
373
+ if ( typeof solc . lowlevel . compileStandard !== 'function' ) {
374
+ st . skip ( 'Low-level compileStandard interface not implemented by this compiler version. ' ) ;
375
375
st . end ( ) ;
376
376
return ;
377
377
}
@@ -391,7 +391,7 @@ tape('Compilation', function (t) {
391
391
}
392
392
}
393
393
} ;
394
- var output = JSON . parse ( solc . compileStandard ( JSON . stringify ( input ) ) ) ;
394
+ var output = JSON . parse ( solc . lowlevel . compileStandard ( JSON . stringify ( input ) ) ) ;
395
395
st . plan ( 3 ) ;
396
396
st . ok ( 'errors' in output ) ;
397
397
st . ok ( output . errors . length >= 1 ) ;
@@ -404,9 +404,9 @@ tape('Compilation', function (t) {
404
404
st . end ( ) ;
405
405
} ) ;
406
406
407
- t . test ( 'compiling standard JSON (with callback)' , function ( st ) {
408
- if ( ! solc . supportsStandard ) {
409
- st . skip ( 'Not supported by solc ' ) ;
407
+ t . test ( 'compiling standard JSON (with callback) (using lowlevel API) ' , function ( st ) {
408
+ if ( typeof solc . lowlevel . compileStandard !== 'function' ) {
409
+ st . skip ( 'Low-level compileStandard interface not implemented by this compiler version. ' ) ;
410
410
st . end ( ) ;
411
411
return ;
412
412
}
@@ -443,13 +443,13 @@ tape('Compilation', function (t) {
443
443
}
444
444
}
445
445
446
- var output = JSON . parse ( solc . compileStandard ( JSON . stringify ( input ) , findImports ) ) ;
446
+ var output = JSON . parse ( solc . lowlevel . compileStandard ( JSON . stringify ( input ) , findImports ) ) ;
447
447
st . ok ( bytecodeExists ( output , 'cont.sol' , 'x' ) ) ;
448
448
st . ok ( bytecodeExists ( output , 'lib.sol' , 'L' ) ) ;
449
449
st . end ( ) ;
450
450
} ) ;
451
451
452
- t . test ( 'compiling standard JSON (using wrapper) ' , function ( st ) {
452
+ t . test ( 'compiling standard JSON' , function ( st ) {
453
453
// Example needs support for compileJSONMulti
454
454
// FIXME: add test for wrapper without multiple files
455
455
if ( semver . lt ( solc . semver ( ) , '0.1.6' ) ) {
@@ -487,7 +487,7 @@ tape('Compilation', function (t) {
487
487
st . end ( ) ;
488
488
} ) ;
489
489
490
- t . test ( 'compiling standard JSON (using wrapper and libraries)' , function ( st ) {
490
+ t . test ( 'compiling standard JSON (using libraries)' , function ( st ) {
491
491
// Example needs support for compileJSONMulti
492
492
// FIXME: add test for wrapper without multiple files
493
493
if ( semver . lt ( solc . semver ( ) , '0.1.6' ) ) {
@@ -531,7 +531,7 @@ tape('Compilation', function (t) {
531
531
st . end ( ) ;
532
532
} ) ;
533
533
534
- t . test ( 'compiling standard JSON (using lowlevel API)' , function ( st ) {
534
+ t . test ( 'compiling standard JSON (using libraries) (using lowlevel API)' , function ( st ) {
535
535
if ( typeof solc . lowlevel . compileStandard !== 'function' ) {
536
536
st . skip ( 'Low-level compileStandard interface not implemented by this compiler version.' ) ;
537
537
st . end ( ) ;
0 commit comments