Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
b925b2da
Commit
b925b2da
authored
Jan 09, 2018
by
Facundo Spagnuolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Organize test files following contracts folders structure
parent
7532dab1
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
55 additions
and
56 deletions
+55
-56
CappedCrowdsale.test.js
test/crowdsale/CappedCrowdsale.test.js
+5
-5
Crowdsale.test.js
test/crowdsale/Crowdsale.test.js
+5
-5
FinalizableCrowdsale.test.js
test/crowdsale/FinalizableCrowdsale.test.js
+4
-4
RefundVault.test.js
test/crowdsale/RefundVault.test.js
+2
-2
RefundableCrowdsale.test.js
test/crowdsale/RefundableCrowdsale.test.js
+5
-5
SampleCrowdsale.test.js
test/examples/SampleCrowdsale.test.js
+5
-5
Destructible.test.js
test/lifecycle/Destructible.test.js
+1
-1
Pausable.test.js
test/lifecycle/Pausable.test.js
+1
-1
TokenDestructible.test.js
test/lifecycle/TokenDestructible.test.js
+1
-1
SafeMath.test.js
test/math/SafeMath.test.js
+2
-2
CanReclaimToken.test.js
test/ownership/CanReclaimToken.test.js
+1
-1
Claimable.test.js
test/ownership/Claimable.test.js
+1
-1
Contactable.test.js
test/ownership/Contactable.test.js
+0
-0
DelayedClaimble.test.js
test/ownership/DelayedClaimble.test.js
+1
-2
HasNoContracts.test.js
test/ownership/HasNoContracts.test.js
+1
-1
HasNoEther.test.js
test/ownership/HasNoEther.test.js
+2
-2
HasNoTokens.test.js
test/ownership/HasNoTokens.test.js
+1
-1
Ownable.test.js
test/ownership/Ownable.test.js
+1
-1
RBAC.test.js
test/ownership/rbac/RBAC.test.js
+2
-2
PullPayment.test.js
test/payment/PullPayment.test.js
+0
-0
SplitPayment.test.js
test/payment/SplitPayment.test.js
+1
-1
BasicToken.test.js
test/token/BasicToken.test.js
+1
-1
BurnableToken.test.js
test/token/BurnableToken.test.js
+1
-1
CappedToken.test.js
test/token/CappedToken.test.js
+2
-2
DetailedERC20.test.js
test/token/DetailedERC20.test.js
+0
-0
MintableToken.test.js
test/token/MintableToken.test.js
+1
-1
PausableToken.test.js
test/token/PausableToken.test.js
+1
-1
SafeERC20.test.js
test/token/SafeERC20.test.js
+1
-1
StandardToken.test.js
test/token/StandardToken.test.js
+1
-1
TokenTimelock.test.js
test/token/TokenTimelock.test.js
+2
-2
TokenVesting.test.js
test/token/TokenVesting.test.js
+3
-3
No files found.
test/CappedCrowdsale.test.js
→
test/
crowdsale/
CappedCrowdsale.test.js
View file @
b925b2da
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
;
...
...
test/Crowdsale.test.js
→
test/
crowdsale/
Crowdsale.test.js
View file @
b925b2da
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
;
...
...
test/FinalizableCrowdsale.test.js
→
test/
crowdsale/
FinalizableCrowdsale.test.js
View file @
b925b2da
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
;
...
...
test/RefundVault.test.js
→
test/
crowdsale/
RefundVault.test.js
View file @
b925b2da
import
ether
from
'./helpers/ether'
;
import
EVMRevert
from
'./helpers/EVMRevert'
;
import
ether
from
'.
.
/helpers/ether'
;
import
EVMRevert
from
'.
.
/helpers/EVMRevert'
;
const
BigNumber
=
web3
.
BigNumber
;
...
...
test/RefundableCrowdsale.test.js
→
test/
crowdsale/
RefundableCrowdsale.test.js
View file @
b925b2da
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
;
...
...
test/SampleCrowdsale.test.js
→
test/
examples/
SampleCrowdsale.test.js
View file @
b925b2da
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
;
...
...
test/Destructible.test.js
→
test/
lifecycle/
Destructible.test.js
View file @
b925b2da
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
()
{
...
...
test/Pausable.test.js
→
test/
lifecycle/
Pausable.test.js
View file @
b925b2da
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'.
.
/helpers/assertRevert'
;
const
PausableMock
=
artifacts
.
require
(
'mocks/PausableMock.sol'
);
contract
(
'Pausable'
,
function
(
accounts
)
{
...
...
test/TokenDestructible.test.js
→
test/
lifecycle/
TokenDestructible.test.js
View file @
b925b2da
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
;
...
...
test/SafeMath.test.js
→
test/
math/
SafeMath.test.js
View file @
b925b2da
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
)
{
...
...
test/CanReclaimToken.test.js
→
test/
ownership/
CanReclaimToken.test.js
View file @
b925b2da
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'
);
...
...
test/Claimable.test.js
→
test/
ownership/
Claimable.test.js
View file @
b925b2da
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'.
.
/helpers/assertRevert'
;
var
Claimable
=
artifacts
.
require
(
'../contracts/ownership/Claimable.sol'
);
...
...
test/Contactable.test.js
→
test/
ownership/
Contactable.test.js
View file @
b925b2da
File moved
test/DelayedClaimble.test.js
→
test/
ownership/
DelayedClaimble.test.js
View file @
b925b2da
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'../helpers/assertRevert'
;
var
DelayedClaimable
=
artifacts
.
require
(
'../contracts/ownership/DelayedClaimable.sol'
);
...
...
test/HasNoContracts.test.js
→
test/
ownership/
HasNoContracts.test.js
View file @
b925b2da
import
expectThrow
from
'./helpers/expectThrow'
;
import
expectThrow
from
'.
.
/helpers/expectThrow'
;
const
Ownable
=
artifacts
.
require
(
'../contracts/ownership/Ownable.sol'
);
const
HasNoContracts
=
artifacts
.
require
(
...
...
test/HasNoEther.test.js
→
test/
ownership/
HasNoEther.test.js
View file @
b925b2da
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'
);
...
...
test/HasNoTokens.test.js
→
test/
ownership/
HasNoTokens.test.js
View file @
b925b2da
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'
);
...
...
test/Ownable.test.js
→
test/
ownership/
Ownable.test.js
View file @
b925b2da
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'.
.
/helpers/assertRevert'
;
var
Ownable
=
artifacts
.
require
(
'../contracts/ownership/Ownable.sol'
);
...
...
test/RBAC.test.js
→
test/
ownership/rbac/
RBAC.test.js
View file @
b925b2da
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'
);
...
...
test/PullPayment.test.js
→
test/
payment/
PullPayment.test.js
View file @
b925b2da
File moved
test/SplitPayment.test.js
→
test/
payment/
SplitPayment.test.js
View file @
b925b2da
...
...
@@ -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
])
{
...
...
test/BasicToken.test.js
→
test/
token/
BasicToken.test.js
View file @
b925b2da
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'.
.
/helpers/assertRevert'
;
var
BasicTokenMock
=
artifacts
.
require
(
'mocks/BasicTokenMock.sol'
);
...
...
test/BurnableToken.test.js
→
test/
token/
BurnableToken.test.js
View file @
b925b2da
const
EVMRevert
=
require
(
'./helpers/EVMRevert.js'
);
const
EVMRevert
=
require
(
'.
.
/helpers/EVMRevert.js'
);
const
BurnableTokenMock
=
artifacts
.
require
(
'mocks/BurnableTokenMock.sol'
);
const
BigNumber
=
web3
.
BigNumber
;
...
...
test/CappedToken.test.js
→
test/
token/
CappedToken.test.js
View file @
b925b2da
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'
);
...
...
test/DetailedERC20.test.js
→
test/
token/
DetailedERC20.test.js
View file @
b925b2da
File moved
test/MintableToken.test.js
→
test/
token/
MintableToken.test.js
View file @
b925b2da
import
expectThrow
from
'./helpers/expectThrow'
;
import
expectThrow
from
'.
.
/helpers/expectThrow'
;
var
MintableToken
=
artifacts
.
require
(
'../contracts/Tokens/MintableToken.sol'
);
contract
(
'Mintable'
,
function
(
accounts
)
{
...
...
test/PausableToken.test.js
→
test/
token/
PausableToken.test.js
View file @
b925b2da
'user strict'
;
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'.
.
/helpers/assertRevert'
;
var
PausableTokenMock
=
artifacts
.
require
(
'./mocks/PausableTokenMock.sol'
);
contract
(
'PausableToken'
,
function
(
accounts
)
{
...
...
test/SafeERC20.test.js
→
test/
token/
SafeERC20.test.js
View file @
b925b2da
import
EVMThrow
from
'./helpers/EVMThrow'
;
import
EVMThrow
from
'.
.
/helpers/EVMThrow'
;
require
(
'chai'
)
.
use
(
require
(
'chai-as-promised'
))
...
...
test/StandardToken.test.js
→
test/
token/
StandardToken.test.js
View file @
b925b2da
import
assertRevert
from
'./helpers/assertRevert'
;
import
assertRevert
from
'.
.
/helpers/assertRevert'
;
var
StandardTokenMock
=
artifacts
.
require
(
'mocks/StandardTokenMock.sol'
);
...
...
test/TokenTimelock.test.js
→
test/
token/
TokenTimelock.test.js
View file @
b925b2da
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
;
...
...
test/TokenVesting.test.js
→
test/
token/
TokenVesting.test.js
View file @
b925b2da
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment