Skip to content

Commit 54cfd48

Browse files
authored
Merge pull request #292 from ethereum/features
Use solc.features.* instead of solc.supports* in tests
2 parents ab2f003 + 9f921a9 commit 54cfd48

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

test/package.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ tape('Version and license', function (t) {
4848

4949
tape('Compilation', function (t) {
5050
t.test('single files can be compiled', function (st) {
51-
if (!solc.supportsSingle) {
51+
if (!solc.features.legacySingleInput) {
5252
st.skip('Not supported by solc');
5353
st.end();
5454
return;
@@ -76,7 +76,7 @@ tape('Compilation', function (t) {
7676
});
7777

7878
t.test('invalid source code fails properly', function (st) {
79-
if (!solc.supportsSingle) {
79+
if (!solc.features.legacySingleInput) {
8080
st.skip('Not supported by solc');
8181
st.end();
8282
return;
@@ -114,7 +114,7 @@ tape('Compilation', function (t) {
114114
return;
115115
}
116116

117-
if (!solc.supportsMulti) {
117+
if (!solc.features.multipleInputs) {
118118
st.skip('Not supported by solc');
119119
st.end();
120120
return;
@@ -162,7 +162,7 @@ tape('Compilation', function (t) {
162162
return;
163163
}
164164

165-
if (!solc.supportsImportCallback) {
165+
if (!solc.features.importCallback) {
166166
st.skip('Not supported by solc');
167167
st.end();
168168
return;
@@ -222,7 +222,7 @@ tape('Compilation', function (t) {
222222
return;
223223
}
224224

225-
if (!solc.supportsImportCallback) {
225+
if (!solc.features.importCallback) {
226226
st.skip('Not supported by solc');
227227
st.end();
228228
return;
@@ -257,7 +257,7 @@ tape('Compilation', function (t) {
257257
return;
258258
}
259259

260-
if (!solc.supportsImportCallback) {
260+
if (!solc.features.importCallback) {
261261
st.skip('Not supported by solc');
262262
st.end();
263263
return;
@@ -282,7 +282,7 @@ tape('Compilation', function (t) {
282282
return;
283283
}
284284

285-
if (!solc.supportsImportCallback) {
285+
if (!solc.features.importCallback) {
286286
st.skip('Not supported by solc');
287287
st.end();
288288
return;
@@ -304,7 +304,7 @@ tape('Compilation', function (t) {
304304
return;
305305
}
306306

307-
if (!solc.supportsImportCallback) {
307+
if (!solc.features.importCallback) {
308308
st.skip('Not supported by solc');
309309
st.end();
310310
return;

wrapper.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ function setupMethods (soljson) {
232232
compileStandard: compileStandard
233233
},
234234
features: {
235+
legacySingleInput: compileJSON !== null,
235236
multipleInputs: compileJSONMulti !== null || compileStandard !== null,
236237
importCallback: compileJSONCallback !== null || compileStandard !== null,
237238
nativeStandardJSON: compileStandard !== null

0 commit comments

Comments
 (0)