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
0e76ee5d
Commit
0e76ee5d
authored
Jan 19, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests
parent
abc2b356
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
decodeInfo.js
test/solidity/decodeInfo.js
+11
-11
No files found.
test/solidity/decodeInfo.js
View file @
0e76ee5d
...
...
@@ -19,25 +19,25 @@ tape('solidity', function (t) {
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
3
].
attributes
.
type
,
states
,
'contractUint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'uint'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
4
].
attributes
.
type
,
states
,
'contractUint'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
16
,
'bytes
X
'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
16
,
'bytes
16
'
)
state
=
index
.
solidity
.
astHelper
.
extractStateDefinitions
(
'contractStructAndArray'
,
output
.
sources
)
stateDef
=
state
.
stateDefinitions
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
1
].
attributes
.
type
,
states
,
'contractStructAndArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
2
,
32
,
'struct'
)
checkDecodeInfo
(
st
,
decodeInfo
,
2
,
32
,
'struct
contractStructAndArray.structDef
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
2
].
attributes
.
type
,
states
,
'contractStructAndArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
6
,
32
,
'
array
'
)
checkDecodeInfo
(
st
,
decodeInfo
,
6
,
32
,
'
struct contractStructAndArray.structDef[3]
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
3
].
attributes
.
type
,
states
,
'contractStructAndArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
2
,
32
,
'
array
'
)
checkDecodeInfo
(
st
,
decodeInfo
,
2
,
32
,
'
bytes12[4]
'
)
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
,
'
array
'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'
uint[5]
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
1
].
attributes
.
type
,
states
,
'contractArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'
array
'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
32
,
'
int[dynamic]
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
2
].
attributes
.
type
,
states
,
'contractArray'
)
checkDecodeInfo
(
st
,
decodeInfo
,
4
,
32
,
'
array
'
)
checkDecodeInfo
(
st
,
decodeInfo
,
4
,
32
,
'
int[dynamic][3][dynamic][4]
'
)
state
=
index
.
solidity
.
astHelper
.
extractStateDefinitions
(
'contractEnum'
,
output
.
sources
)
stateDef
=
state
.
stateDefinitions
...
...
@@ -65,19 +65,19 @@ tape('solidity', function (t) {
states
=
index
.
solidity
.
astHelper
.
extractStatesDefinitions
(
output
.
sources
)
stateDef
=
state
.
stateDefinitions
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
2
].
attributes
.
type
,
states
,
'simpleContract'
)
checkDecodeInfo
(
st
,
decodeInfo
,
2
,
32
,
'struct'
)
checkDecodeInfo
(
st
,
decodeInfo
,
2
,
32
,
'struct
simpleContract.structDef
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
3
].
attributes
.
type
,
states
,
'simpleContract'
)
checkDecodeInfo
(
st
,
decodeInfo
,
6
,
32
,
'
array
'
)
checkDecodeInfo
(
st
,
decodeInfo
,
6
,
32
,
'
struct simpleContract.structDef[3]
'
)
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
4
].
attributes
.
type
,
states
,
'simpleContract'
)
checkDecodeInfo
(
st
,
decodeInfo
,
1
,
1
,
'enum'
)
state
=
index
.
solidity
.
astHelper
.
extractStateDefinitions
(
'test2'
,
output
.
sources
)
stateDef
=
state
.
stateDefinitions
decodeInfo
=
index
.
solidity
.
decodeInfo
.
parseType
(
stateDef
[
0
].
attributes
.
type
,
states
,
'test1'
)
checkDecodeInfo
(
st
,
decodeInfo
,
0
,
32
,
'struct'
)
checkDecodeInfo
(
st
,
decodeInfo
,
0
,
32
,
'struct
test1.str
'
)
state
=
index
.
solidity
.
stateDecoder
.
extractStateVariables
(
'test2'
,
output
.
sources
)
checkDecodeInfo
(
st
,
decodeInfo
,
0
,
32
,
'struct'
)
checkDecodeInfo
(
st
,
decodeInfo
,
0
,
32
,
'struct
test1.str
'
)
st
.
end
()
})
...
...
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