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
5238b8c8
Commit
5238b8c8
authored
Jan 17, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tests
parent
a8e00843
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
20 deletions
+21
-20
TxBrowser.js
src/ui/TxBrowser.js
+1
-2
VmDebugger.js
src/ui/VmDebugger.js
+2
-3
init.js
test-browser/init.js
+5
-1
vmdebugger.js
test-browser/vmdebugger.js
+13
-14
No files found.
src/ui/TxBrowser.js
View file @
5238b8c8
...
@@ -36,8 +36,7 @@ TxBrowser.prototype.setDefaultValues = function () {
...
@@ -36,8 +36,7 @@ TxBrowser.prototype.setDefaultValues = function () {
this
.
blockNumber
=
''
this
.
blockNumber
=
''
this
.
txNumber
=
''
this
.
txNumber
=
''
this
.
connectInfo
=
''
this
.
connectInfo
=
''
this
.
basicPanel
.
data
=
{}
this
.
basicPanel
.
update
({})
this
.
basicPanel
.
update
()
this
.
basicPanel
.
hide
()
this
.
basicPanel
.
hide
()
this
.
updateWeb3Url
(
util
.
web3
.
currentProvider
.
host
)
this
.
updateWeb3Url
(
util
.
web3
.
currentProvider
.
host
)
if
(
this
.
view
)
{
if
(
this
.
view
)
{
...
...
src/ui/VmDebugger.js
View file @
5238b8c8
...
@@ -30,11 +30,10 @@ function VmDebugger (_parent, _traceManager, _codeManager, _solidityProxy, _call
...
@@ -30,11 +30,10 @@ function VmDebugger (_parent, _traceManager, _codeManager, _solidityProxy, _call
var
self
=
this
var
self
=
this
_traceManager
.
getReturnValue
(
index
,
function
(
error
,
returnValue
)
{
_traceManager
.
getReturnValue
(
index
,
function
(
error
,
returnValue
)
{
if
(
error
)
{
if
(
error
)
{
self
.
data
=
[
error
]
self
.
update
([
error
])
}
else
if
(
_parent
.
currentStepIndex
===
index
)
{
}
else
if
(
_parent
.
currentStepIndex
===
index
)
{
self
.
data
=
[
returnValue
]
self
.
update
([
returnValue
])
}
}
self
.
update
()
})
})
})
})
/* Return values - */
/* Return values - */
...
...
test-browser/init.js
View file @
5238b8c8
...
@@ -32,7 +32,7 @@ function extendBrowser (browser) {
...
@@ -32,7 +32,7 @@ function extendBrowser (browser) {
}
}
browser
.
assertStepDetail
=
function
(
vmtracestepinfo
,
stepinfo
,
addmemoryinfo
,
gasinfo
,
remaininggasinfo
,
loadedaddressinfo
)
{
browser
.
assertStepDetail
=
function
(
vmtracestepinfo
,
stepinfo
,
addmemoryinfo
,
gasinfo
,
remaininggasinfo
,
loadedaddressinfo
)
{
assertPanel
(
'#stepdetail'
,
browser
,
[
'vmtracestep
'
+
vmtracestepinfo
,
'executionstep'
+
stepinfo
,
'addmemory'
+
addmemoryinfo
,
'gas'
+
gasinfo
,
'remaininggas'
+
remaininggasinfo
,
'loadedaddress
'
+
loadedaddressinfo
])
assertPanel
(
'#stepdetail'
,
browser
,
[
'vmtracestep
:'
+
vmtracestepinfo
,
'executionstep:'
+
stepinfo
,
'addmemory:'
+
addmemoryinfo
,
'gas:'
+
gasinfo
,
'remaininggas:'
+
remaininggasinfo
,
'loadedaddress:
'
+
loadedaddressinfo
])
return
browser
return
browser
}
}
...
@@ -141,8 +141,12 @@ function assertPanel (id, browser, value) {
...
@@ -141,8 +141,12 @@ function assertPanel (id, browser, value) {
return
ret
return
ret
},
[
id
,
selector
],
function
(
returnValues
)
{
},
[
id
,
selector
],
function
(
returnValues
)
{
value
.
map
(
function
(
item
,
index
)
{
value
.
map
(
function
(
item
,
index
)
{
if
(
returnValues
.
value
.
length
)
{
var
testValue
=
returnValues
.
value
[
index
].
replace
(
/
\r\n
/g
,
''
).
replace
(
/
\t
/g
,
''
).
replace
(
/
\s
/g
,
''
)
var
testValue
=
returnValues
.
value
[
index
].
replace
(
/
\r\n
/g
,
''
).
replace
(
/
\t
/g
,
''
).
replace
(
/
\s
/g
,
''
)
browser
.
assert
.
equal
(
testValue
,
value
[
index
])
browser
.
assert
.
equal
(
testValue
,
value
[
index
])
}
else
{
browser
.
assert
.
equal
(
item
,
''
)
}
})
})
})
})
return
browser
return
browser
...
...
test-browser/vmdebugger.js
View file @
5238b8c8
...
@@ -63,21 +63,20 @@ function panels (browser) {
...
@@ -63,21 +63,20 @@ function panels (browser) {
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
click
(
'#load'
)
.
click
(
'#load'
)
.
click
(
'#nextcall'
)
.
click
(
'#nextcall'
)
.
assertStack
([
'0x'
,
'0x60'
,
'0x65'
,
'0x38'
,
'0x55'
,
'0x60fe47b1'
])
.
assertStack
([
'0:0x'
,
'1:0x60'
,
'2:0x65'
,
'3:0x38'
,
'4:0x55'
,
'5:0x60fe47b1'
])
.
pause
(
5000
)
.
assertStorageChanges
([
'0x00:0x38'
])
.
assertStorageChanges
([
'0x000x38'
])
.
assertCallData
([
'0:0x60fe47b10000000000000000000000000000000000000000000000000000000000000038'
])
.
assertCallData
([
'0x60fe47b10000000000000000000000000000000000000000000000000000000000000038'
])
.
assertCallStack
([
'0:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
])
.
assertCallStack
([
'0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
])
.
assertStackValue
(
1
,
'1:0x60'
)
.
assertStackValue
(
1
,
'0x60'
)
.
assertMemoryValue
(
6
,
'0x60:60606040526040516020806045833981????R??Q????E?9?'
)
.
assertMemoryValue
(
6
,
'0x6060606040526040516020806045833981????R??Q????E?9?'
)
.
assertMemoryValue
(
7
,
'0x70:01604052808051906020019091905050???R??Q???????PP'
)
.
assertMemoryValue
(
7
,
'0x7001604052808051906020019091905050???R??Q???????PP'
)
.
assertMemoryValue
(
8
,
'0x80:5b806001016000600050819055505b50?????????P??UP?P'
)
.
assertMemoryValue
(
8
,
'0x805b806001016000600050819055505b50?????????P??UP?P'
)
.
click
(
'#intoforward'
)
// CREATE
.
click
(
'#intoforward'
)
// CREATE
.
assertStack
([
'
Empty
'
])
.
assertStack
([
''
])
.
assertStorageChanges
([
'
Empty
'
])
.
assertStorageChanges
([
''
])
.
assertMemory
([
'
Empty
'
])
.
assertMemory
([
''
])
.
assertCallData
([
'0x0000000000000000000000000000000000000000000000000000000000000000000000000000006060606040526040516020806045833981016040528080519060200190919050505b806001016000600050819055'
])
.
assertCallData
([
'0
:0
x0000000000000000000000000000000000000000000000000000000000000000000000000000006060606040526040516020806045833981016040528080519060200190919050505b806001016000600050819055'
])
.
assertCallStack
([
'0
x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
,
'
(ContractCreation-Step63)'
])
.
assertCallStack
([
'0
:0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5'
,
'1:
(ContractCreation-Step63)'
])
return
browser
return
browser
}
}
...
...
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