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
e1dcab29
Commit
e1dcab29
authored
Nov 14, 2016
by
Manuel Aráoz
Committed by
GitHub
Nov 14, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69 from federicobond/tokenmock-totalsupply
Fill totalSupply in StandardTokenMock
parents
d7b38038
2b62f349
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
StandardTokenMock.sol
contracts/test-helpers/StandardTokenMock.sol
+1
-0
StandardToken.js
test/StandardToken.js
+11
-0
No files found.
contracts/test-helpers/StandardTokenMock.sol
View file @
e1dcab29
...
@@ -6,6 +6,7 @@ contract StandardTokenMock is StandardToken {
...
@@ -6,6 +6,7 @@ contract StandardTokenMock is StandardToken {
function StandardTokenMock(address initialAccount, uint initialBalance) {
function StandardTokenMock(address initialAccount, uint initialBalance) {
balances[initialAccount] = initialBalance;
balances[initialAccount] = initialBalance;
totalSupply = initialBalance;
}
}
}
}
test/StandardToken.js
View file @
e1dcab29
contract
(
'StandardToken'
,
function
(
accounts
)
{
contract
(
'StandardToken'
,
function
(
accounts
)
{
it
(
"should return the correct totalSupply after construction"
,
function
(
done
)
{
return
StandardTokenMock
.
new
(
accounts
[
0
],
100
)
.
then
(
function
(
token
)
{
return
token
.
totalSupply
();
})
.
then
(
function
(
totalSupply
)
{
assert
.
equal
(
totalSupply
,
100
);
})
.
then
(
done
);
})
it
(
"should return the correct allowance amount after approval"
,
function
(
done
)
{
it
(
"should return the correct allowance amount after approval"
,
function
(
done
)
{
var
token
;
var
token
;
return
StandardTokenMock
.
new
()
return
StandardTokenMock
.
new
()
...
...
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