Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
ec08f732
Commit
ec08f732
authored
Jan 19, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test
parent
16757501
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
decodeInfo.js
test/solidity/decodeInfo.js
+12
-12
No files found.
test/solidity/decodeInfo.js
View file @
ec08f732
...
...
@@ -13,11 +13,11 @@ tape('solidity', function (t) {
var
states
=
index
.
solidity
.
astHelper
.
extractStatesDefinitions
(
output
.
sources
)
var
stateDef
=
state
.
stateDefinitions
var
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
0
].
attributes
.
type
,
states
,
'contractUint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
1
,
'uint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
1
,
'uint
8
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
2
].
attributes
.
type
,
states
,
'contractUint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint
256
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
3
].
attributes
.
type
,
states
,
'contractUint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint
256
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
4
].
attributes
.
type
,
states
,
'contractUint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
16
,
'bytes16'
)
...
...
@@ -33,11 +33,11 @@ tape('solidity', function (t) {
state
=
index
.
solidity
.
astHelper
.
extractStateDefinitions
(
'contractArray'
,
output
.
sources
)
stateDef
=
state
.
stateDefinitions
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
0
].
attributes
.
type
,
states
,
'contractArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint[5]'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint
32
[5]'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
1
].
attributes
.
type
,
states
,
'contractArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'int
[dynamic
]'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'int
8[
]'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
2
].
attributes
.
type
,
states
,
'contractArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
4
,
32
,
'int
[dynamic][3][dynamic
][4]'
)
checkDecodeInfo
(
st
,
decodeInfo
,
4
,
32
,
'int
16[][3][
][4]'
)
state
=
index
.
solidity
.
astHelper
.
extractStateDefinitions
(
'contractEnum'
,
output
.
sources
)
stateDef
=
state
.
stateDefinitions
...
...
@@ -47,17 +47,17 @@ tape('solidity', function (t) {
state
=
index
.
solidity
.
astHelper
.
extractStateDefinitions
(
'contractSmallVariable'
,
output
.
sources
)
stateDef
=
state
.
stateDefinitions
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
0
].
attributes
.
type
,
states
,
'contractSmallVariable'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
1
,
'int'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
1
,
'int
8
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
1
].
attributes
.
type
,
states
,
'contractSmallVariable'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
1
,
'uint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
1
,
'uint
8
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
2
].
attributes
.
type
,
states
,
'contractSmallVariable'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
2
,
'uint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
2
,
'uint
16
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
3
].
attributes
.
type
,
states
,
'contractSmallVariable'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
4
,
'int'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
4
,
'int
32
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
4
].
attributes
.
type
,
states
,
'contractSmallVariable'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint
256
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
5
].
attributes
.
type
,
states
,
'contractSmallVariable'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
2
,
'int'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
2
,
'int
16
'
)
output
=
compiler
.
compile
(
simplecontracts
,
0
)
...
...
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