Skip to content

Commit bba5ab9

Browse files
author
Leonardo
authored
Merge pull request #401 from ethereum/test-reorg
Rename test fixtures to be consistent and place them under test/resources
2 parents f750d30 + 5ed5e6c commit bba5ab9

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

test/cli.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ tape('CLI', function (t) {
1717
});
1818

1919
t.test('no mode specified', function (st) {
20-
var spt = spawn(st, './solcjs test/contracts/Smoke.sol');
20+
var spt = spawn(st, './solcjs test/resources/fixtureSmoke.sol');
2121
spt.stderr.match(/^Invalid option selected/);
2222
spt.end();
2323
});
2424

2525
t.test('--bin', function (st) {
26-
var spt = spawn(st, './solcjs --bin test/contracts/Smoke.sol');
26+
var spt = spawn(st, './solcjs --bin test/resources/fixtureSmoke.sol');
2727
spt.stderr.empty();
2828
spt.succeeds();
2929
spt.end();
3030
});
3131

3232
t.test('--bin --optimize', function (st) {
33-
var spt = spawn(st, './solcjs --bin --optimize test/contracts/Smoke.sol');
33+
var spt = spawn(st, './solcjs --bin --optimize test/resources/fixtureSmoke.sol');
3434
spt.stderr.empty();
3535
spt.succeeds();
3636
spt.end();
@@ -43,20 +43,20 @@ tape('CLI', function (t) {
4343
});
4444

4545
t.test('incorrect source source', function (st) {
46-
var spt = spawn(st, './solcjs --bin test/fixtureIncorrectSource.sol');
47-
spt.stderr.match(/^test\/fixtureIncorrectSource.sol:1:1: SyntaxError: Invalid pragma "contract"/);
46+
var spt = spawn(st, './solcjs --bin test/resources/fixtureIncorrectSource.sol');
47+
spt.stderr.match(/^test\/resources\/fixtureIncorrectSource.sol:1:1: SyntaxError: Invalid pragma "contract"/);
4848
spt.end();
4949
});
5050

5151
t.test('--abi', function (st) {
52-
var spt = spawn(st, './solcjs --abi test/contracts/Smoke.sol');
52+
var spt = spawn(st, './solcjs --abi test/resources/fixtureSmoke.sol');
5353
spt.stderr.empty();
5454
spt.succeeds();
5555
spt.end();
5656
});
5757

5858
t.test('--bin --abi', function (st) {
59-
var spt = spawn(st, './solcjs --bin --abi test/contracts/Smoke.sol');
59+
var spt = spawn(st, './solcjs --bin --abi test/resources/fixtureSmoke.sol');
6060
spt.stderr.empty();
6161
spt.succeeds();
6262
spt.end();
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/translate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ tape('Version string to Semver translator', function (t) {
4848

4949
tape('prettyPrintLegacyAssemblyJSON', function (t) {
5050
t.test('Works properly', function (st) {
51-
var fixtureAsmJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'fixtureAsmJson.json')).toString());
52-
var fixtureAsmJsonSource = fs.readFileSync(path.resolve(__dirname, 'fixtureAsmJson.sol')).toString();
53-
var fixtureAsmJsonOutput = fs.readFileSync(path.resolve(__dirname, 'fixtureAsmJson.output')).toString();
51+
var fixtureAsmJson = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'resources/fixtureAsmJson.json')).toString());
52+
var fixtureAsmJsonSource = fs.readFileSync(path.resolve(__dirname, 'resources/fixtureAsmJson.sol')).toString();
53+
var fixtureAsmJsonOutput = fs.readFileSync(path.resolve(__dirname, 'resources/fixtureAsmJson.output')).toString();
5454
st.equal(translate.prettyPrintLegacyAssemblyJSON(fixtureAsmJson, fixtureAsmJsonSource), fixtureAsmJsonOutput);
5555
st.end();
5656
});

0 commit comments

Comments
 (0)