Skip to content

Commit f6df2e6

Browse files
committed
fixed lint errors
1 parent 71c6f63 commit f6df2e6

6 files changed

Lines changed: 16 additions & 12 deletions

File tree

.solcover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
gas: config.gas,
99
gasPrice: config.gasPrice,
1010
norpc: true,
11-
testCommand: 'npx truffle test ./test/unit/**/*.js',
11+
testCommand: 'npx truffle test ./test/unit/*.js',
1212
compileCommand: 'npx truffle compile',
1313
skipFiles: ['mocks'],
1414
copyPackages: ['openzeppelin-zos'],

contracts/mocks/Mock.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pragma solidity 0.4.24;
22

3+
34
contract Mock {
45
event FunctionCalled(string functionName, address caller);
56
event FunctionArguments(uint256[] uintVals, int256[] intVals);

contracts/mocks/MockMarketOracle.sol

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,11 @@ pragma solidity 0.4.24;
22

33
import "./Mock.sol";
44

5+
56
contract MockMarketOracle is Mock {
67
uint128 private exchangeRate;
78
uint128 private volume;
89

9-
// Methods to mock data on the chain
10-
function storeRate(uint128 _exchangeRate) public {
11-
exchangeRate = _exchangeRate;
12-
}
13-
14-
function storeVolume(uint128 _volume) public {
15-
volume = _volume;
16-
}
17-
1810
// Mock methods
1911
function getPriceAndVolume() external returns (uint128, uint128) {
2012
emit FunctionCalled("MarketOracle:getPriceAndVolume", msg.sender);
@@ -23,4 +15,13 @@ contract MockMarketOracle is Mock {
2315
emit FunctionArguments(uintVals, intVals);
2416
return (exchangeRate, volume);
2517
}
18+
19+
// Methods to mock data on the chain
20+
function storeRate(uint128 _exchangeRate) public {
21+
exchangeRate = _exchangeRate;
22+
}
23+
24+
function storeVolume(uint128 _volume) public {
25+
volume = _volume;
26+
}
2627
}

contracts/mocks/MockUFragments.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ pragma solidity 0.4.24;
22

33
import "./Mock.sol";
44

5+
56
contract MockUFragments is Mock {
67
uint256 private supply;
78

contracts/mocks/SafeMathIntMock.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ pragma solidity 0.4.24;
33
import "./Mock.sol";
44
import "../lib/SafeMathInt.sol";
55

6+
67
contract SafeMathIntMock is Mock {
78
function mul(int256 _a, int256 _b) external {
89
emit ReturnValueInt256(SafeMathInt.mul(_a, _b));
@@ -22,5 +23,5 @@ contract SafeMathIntMock is Mock {
2223

2324
function toUint256Safe(int256 _a) external returns (uint256) {
2425
return SafeMathInt.toUint256Safe(_a);
25-
}
26+
}
2627
}

scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ run-unit-tests(){
1313
npx truffle \
1414
--network $1 \
1515
test \
16-
$PROJECT_DIR/test/unit/**/*.js
16+
$PROJECT_DIR/test/unit/*.js
1717
}
1818

1919
run-simulation-tests(){

0 commit comments

Comments
 (0)