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
2413f835
Commit
2413f835
authored
Nov 10, 2017
by
Alejandro Santander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include 'revert' in expectThrow() helper
parent
8e01dd14
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
package-lock.json
package-lock.json
+10
-10
expectThrow.js
test/helpers/expectThrow.js
+2
-1
No files found.
package-lock.json
View file @
2413f835
{
{
"name"
:
"zeppelin-solidity"
,
"name"
:
"zeppelin-solidity"
,
"version"
:
"1.
2
.0"
,
"version"
:
"1.
3
.0"
,
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
...
@@ -5084,15 +5084,6 @@
...
@@ -5084,15 +5084,6 @@
"xtend"
:
"4.0.1"
"xtend"
:
"4.0.1"
}
}
},
},
"string_decoder"
:
{
"version"
:
"1.0.3"
,
"resolved"
:
"https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz"
,
"integrity"
:
"sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ=="
,
"dev"
:
true
,
"requires"
:
{
"safe-buffer"
:
"5.1.1"
}
},
"string-width"
:
{
"string-width"
:
{
"version"
:
"1.0.2"
,
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz"
,
"resolved"
:
"https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz"
,
...
@@ -5115,6 +5106,15 @@
...
@@ -5115,6 +5106,15 @@
"function-bind"
:
"1.1.0"
"function-bind"
:
"1.1.0"
}
}
},
},
"string_decoder"
:
{
"version"
:
"1.0.3"
,
"resolved"
:
"https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz"
,
"integrity"
:
"sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ=="
,
"dev"
:
true
,
"requires"
:
{
"safe-buffer"
:
"5.1.1"
}
},
"stringstream"
:
{
"stringstream"
:
{
"version"
:
"0.0.5"
,
"version"
:
"0.0.5"
,
"resolved"
:
"https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz"
,
"resolved"
:
"https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz"
,
...
...
test/helpers/expectThrow.js
View file @
2413f835
...
@@ -10,8 +10,9 @@ export default async promise => {
...
@@ -10,8 +10,9 @@ export default async promise => {
// we distinguish this from an actual out of gas event? (The
// we distinguish this from an actual out of gas event? (The
// testrpc log actually show an 'invalid jump' event.)
// testrpc log actually show an 'invalid jump' event.)
const
outOfGas
=
error
.
message
.
search
(
'out of gas'
)
>=
0
;
const
outOfGas
=
error
.
message
.
search
(
'out of gas'
)
>=
0
;
const
revert
=
error
.
message
.
search
(
'revert'
)
>=
0
;
assert
(
assert
(
invalidOpcode
||
outOfGas
,
invalidOpcode
||
outOfGas
||
revert
,
"Expected throw, got '"
+
error
+
"' instead"
,
"Expected throw, got '"
+
error
+
"' instead"
,
);
);
return
;
return
;
...
...
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