Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize test files following contracts folders structure #661

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ether from './helpers/ether';
import { advanceBlock } from './helpers/advanceToBlock';
import { increaseTimeTo, duration } from './helpers/increaseTime';
import latestTime from './helpers/latestTime';
import EVMRevert from './helpers/EVMRevert';
import ether from '../helpers/ether';
import { advanceBlock } from '../helpers/advanceToBlock';
import { increaseTimeTo, duration } from '../helpers/increaseTime';
import latestTime from '../helpers/latestTime';
import EVMRevert from '../helpers/EVMRevert';

const BigNumber = web3.BigNumber;

Expand Down
10 changes: 5 additions & 5 deletions test/Crowdsale.test.js → test/crowdsale/Crowdsale.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ether from './helpers/ether';
import { advanceBlock } from './helpers/advanceToBlock';
import { increaseTimeTo, duration } from './helpers/increaseTime';
import latestTime from './helpers/latestTime';
import EVMRevert from './helpers/EVMRevert';
import ether from '../helpers/ether';
import { advanceBlock } from '../helpers/advanceToBlock';
import { increaseTimeTo, duration } from '../helpers/increaseTime';
import latestTime from '../helpers/latestTime';
import EVMRevert from '../helpers/EVMRevert';

const BigNumber = web3.BigNumber;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { advanceBlock } from './helpers/advanceToBlock';
import { increaseTimeTo, duration } from './helpers/increaseTime';
import latestTime from './helpers/latestTime';
import EVMRevert from './helpers/EVMRevert';
import { advanceBlock } from '../helpers/advanceToBlock';
import { increaseTimeTo, duration } from '../helpers/increaseTime';
import latestTime from '../helpers/latestTime';
import EVMRevert from '../helpers/EVMRevert';

const BigNumber = web3.BigNumber;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ether from './helpers/ether';
import EVMRevert from './helpers/EVMRevert';
import ether from '../helpers/ether';
import EVMRevert from '../helpers/EVMRevert';

const BigNumber = web3.BigNumber;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ether from './helpers/ether';
import { advanceBlock } from './helpers/advanceToBlock';
import { increaseTimeTo, duration } from './helpers/increaseTime';
import latestTime from './helpers/latestTime';
import EVMRevert from './helpers/EVMRevert';
import ether from '../helpers/ether';
import { advanceBlock } from '../helpers/advanceToBlock';
import { increaseTimeTo, duration } from '../helpers/increaseTime';
import latestTime from '../helpers/latestTime';
import EVMRevert from '../helpers/EVMRevert';

const BigNumber = web3.BigNumber;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import ether from './helpers/ether';
import { advanceBlock } from './helpers/advanceToBlock';
import { increaseTimeTo, duration } from './helpers/increaseTime';
import latestTime from './helpers/latestTime';
import EVMRevert from './helpers/EVMRevert';
import ether from '../helpers/ether';
import { advanceBlock } from '../helpers/advanceToBlock';
import { increaseTimeTo, duration } from '../helpers/increaseTime';
import latestTime from '../helpers/latestTime';
import EVMRevert from '../helpers/EVMRevert';

const BigNumber = web3.BigNumber;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

var Destructible = artifacts.require('../contracts/lifecycle/Destructible.sol');
require('./helpers/transactionMined.js');
require('../helpers/transactionMined.js');

contract('Destructible', function (accounts) {
it('should send balance to owner after destruction', async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/Pausable.test.js → test/lifecycle/Pausable.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import assertRevert from './helpers/assertRevert';
import assertRevert from '../helpers/assertRevert';
const PausableMock = artifacts.require('mocks/PausableMock.sol');

contract('Pausable', function (accounts) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

var TokenDestructible = artifacts.require('../contracts/lifecycle/TokenDestructible.sol');
var StandardTokenMock = artifacts.require('mocks/StandardTokenMock.sol');
require('./helpers/transactionMined.js');
require('../helpers/transactionMined.js');

contract('TokenDestructible', function (accounts) {
let destructible;
Expand Down
4 changes: 2 additions & 2 deletions test/SafeMath.test.js → test/math/SafeMath.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import assertRevert from './helpers/assertRevert';
const assertJump = require('./helpers/assertJump');
import assertRevert from '../helpers/assertRevert';
const assertJump = require('../helpers/assertJump');
var SafeMathMock = artifacts.require('mocks/SafeMathMock.sol');

contract('SafeMath', function (accounts) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import expectThrow from './helpers/expectThrow';
import expectThrow from '../helpers/expectThrow';

const CanReclaimToken = artifacts.require('../contracts/ownership/CanReclaimToken.sol');
const BasicTokenMock = artifacts.require('mocks/BasicTokenMock.sol');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import assertRevert from './helpers/assertRevert';
import assertRevert from '../helpers/assertRevert';

var Claimable = artifacts.require('../contracts/ownership/Claimable.sol');

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import assertRevert from './helpers/assertRevert';
import assertRevert from '../helpers/assertRevert';

var DelayedClaimable = artifacts.require('../contracts/ownership/DelayedClaimable.sol');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import expectThrow from './helpers/expectThrow';
import expectThrow from '../helpers/expectThrow';

const Ownable = artifacts.require('../contracts/ownership/Ownable.sol');
const HasNoContracts = artifacts.require(
Expand Down
4 changes: 2 additions & 2 deletions test/HasNoEther.test.js → test/ownership/HasNoEther.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import expectThrow from './helpers/expectThrow';
import toPromise from './helpers/toPromise';
import expectThrow from '../helpers/expectThrow';
import toPromise from '../helpers/toPromise';
const HasNoEtherTest = artifacts.require('../mocks/HasNoEtherTest.sol');
const ForceEther = artifacts.require('../mocks/ForceEther.sol');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import expectThrow from './helpers/expectThrow';
import expectThrow from '../helpers/expectThrow';

const HasNoTokens = artifacts.require('../contracts/lifecycle/HasNoTokens.sol');
const ERC23TokenMock = artifacts.require('mocks/ERC23TokenMock.sol');
Expand Down
2 changes: 1 addition & 1 deletion test/Ownable.test.js → test/ownership/Ownable.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import assertRevert from './helpers/assertRevert';
import assertRevert from '../helpers/assertRevert';

var Ownable = artifacts.require('../contracts/ownership/Ownable.sol');

Expand Down
4 changes: 2 additions & 2 deletions test/RBAC.test.js → test/ownership/rbac/RBAC.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import expectThrow from './helpers/expectThrow';
import expectEvent from './helpers/expectEvent';
import expectThrow from '../../helpers/expectThrow';
import expectEvent from '../../helpers/expectEvent';

const RBACMock = artifacts.require('mocks/RBACMock.sol');

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require('chai')
.use(require('chai-bignumber')(BigNumber))
.should();

const EVMThrow = require('./helpers/EVMThrow.js');
const EVMThrow = require('../helpers/EVMThrow.js');
const SplitPayment = artifacts.require('../contracts/payment/SplitPayment.sol');

contract('SplitPayment', function ([owner, payee1, payee2, payee3, nonpayee1, payer1]) {
Expand Down
2 changes: 1 addition & 1 deletion test/BasicToken.test.js → test/token/BasicToken.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assertRevert from './helpers/assertRevert';
import assertRevert from '../helpers/assertRevert';

var BasicTokenMock = artifacts.require('mocks/BasicTokenMock.sol');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

const EVMRevert = require('./helpers/EVMRevert.js');
const EVMRevert = require('../helpers/EVMRevert.js');
const BurnableTokenMock = artifacts.require('mocks/BurnableTokenMock.sol');
const BigNumber = web3.BigNumber;

Expand Down
4 changes: 2 additions & 2 deletions test/CappedToken.test.js → test/token/CappedToken.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import expectThrow from './helpers/expectThrow';
import ether from './helpers/ether';
import expectThrow from '../helpers/expectThrow';
import ether from '../helpers/ether';

var CappedToken = artifacts.require('../contracts/Tokens/CappedToken.sol');

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import expectThrow from './helpers/expectThrow';
import expectThrow from '../helpers/expectThrow';
var MintableToken = artifacts.require('../contracts/Tokens/MintableToken.sol');

contract('Mintable', function (accounts) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'user strict';

import assertRevert from './helpers/assertRevert';
import assertRevert from '../helpers/assertRevert';
var PausableTokenMock = artifacts.require('./mocks/PausableTokenMock.sol');

contract('PausableToken', function (accounts) {
Expand Down
2 changes: 1 addition & 1 deletion test/SafeERC20.test.js → test/token/SafeERC20.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import EVMThrow from './helpers/EVMThrow';
import EVMThrow from '../helpers/EVMThrow';

require('chai')
.use(require('chai-as-promised'))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import assertRevert from './helpers/assertRevert';
import assertRevert from '../helpers/assertRevert';

var StandardTokenMock = artifacts.require('mocks/StandardTokenMock.sol');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import latestTime from './helpers/latestTime';
import { increaseTimeTo, duration } from './helpers/increaseTime';
import latestTime from '../helpers/latestTime';
import { increaseTimeTo, duration } from '../helpers/increaseTime';

const BigNumber = web3.BigNumber;

Expand Down
6 changes: 3 additions & 3 deletions test/TokenVesting.test.js → test/token/TokenVesting.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import EVMRevert from './helpers/EVMRevert';
import latestTime from './helpers/latestTime';
import { increaseTimeTo, duration } from './helpers/increaseTime';
import EVMRevert from '../helpers/EVMRevert';
import latestTime from '../helpers/latestTime';
import { increaseTimeTo, duration } from '../helpers/increaseTime';

const BigNumber = web3.BigNumber;

Expand Down