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
e969f57f
Commit
e969f57f
authored
Mar 28, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update test
parent
93c5606f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
txFormat.js
remix-lib/test/txFormat.js
+7
-9
No files found.
remix-lib/test/txFormat.js
View file @
e969f57f
...
@@ -10,8 +10,7 @@ tape('ContractParameters - (TxFormat.buildData) - format input parameters', func
...
@@ -10,8 +10,7 @@ tape('ContractParameters - (TxFormat.buildData) - format input parameters', func
var
output
=
compiler
.
compileStandardWrapper
(
compilerInput
(
uintContract
))
var
output
=
compiler
.
compileStandardWrapper
(
compilerInput
(
uintContract
))
output
=
JSON
.
parse
(
output
)
output
=
JSON
.
parse
(
output
)
var
contract
=
output
.
contracts
[
'test.sol'
][
'uintContractTest'
]
var
contract
=
output
.
contracts
[
'test.sol'
][
'uintContractTest'
]
var
udapp
=
{
runTx
:
()
=>
{}
}
// fake
context
=
{
output
,
contract
}
context
=
{
output
,
contract
,
udapp
}
var
bytecode
=
'6060604052341561000f57600080fd5b6101058061001e6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634b521953146044575b600080fd5b3415604e57600080fd5b608a600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050608c565b005b8260008190555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505600a165627a7a72305820d05e3789952dfb3ba575bcb79da62b6e259adbf498ea909031a42b647f7bceb30029'
var
bytecode
=
'6060604052341561000f57600080fd5b6101058061001e6000396000f300606060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634b521953146044575b600080fd5b3415604e57600080fd5b608a600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050608c565b005b8260008190555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505600a165627a7a72305820d05e3789952dfb3ba575bcb79da62b6e259adbf498ea909031a42b647f7bceb30029'
t
.
test
(
'(TxFormat.buildData)'
,
function
(
st
)
{
t
.
test
(
'(TxFormat.buildData)'
,
function
(
st
)
{
st
.
plan
(
3
)
st
.
plan
(
3
)
...
@@ -23,12 +22,11 @@ tape('ContractParameters - (TxFormat.buildData) - format input parameters', func
...
@@ -23,12 +22,11 @@ tape('ContractParameters - (TxFormat.buildData) - format input parameters', func
})
})
function
testWithInput
(
st
,
params
,
expected
)
{
function
testWithInput
(
st
,
params
,
expected
)
{
txFormat
.
buildData
(
'uintContractTest'
,
context
.
contract
,
context
.
output
.
contracts
,
true
,
context
.
contract
.
abi
[
0
],
params
,
context
.
udapp
txFormat
.
buildData
(
'uintContractTest'
,
context
.
contract
,
context
.
output
.
contracts
,
true
,
context
.
contract
.
abi
[
0
],
params
,
(
error
,
data
)
=>
{
,
(
error
,
data
)
=>
{
if
(
error
)
{
return
st
.
fails
(
error
)
}
if
(
error
)
{
return
st
.
fails
(
error
)
}
console
.
log
(
data
)
console
.
log
(
data
)
st
.
equal
(
data
.
dataHex
,
expected
)
st
.
equal
(
data
.
dataHex
,
expected
)
},
()
=>
{},
()
=>
{})
},
()
=>
{})
}
}
tape
(
'ContractParameters - (TxFormat.buildData) - link Libraries'
,
function
(
t
)
{
tape
(
'ContractParameters - (TxFormat.buildData) - link Libraries'
,
function
(
t
)
{
...
@@ -73,7 +71,7 @@ function testLinkLibrary (st, fakeDeployedContracts) {
...
@@ -73,7 +71,7 @@ function testLinkLibrary (st, fakeDeployedContracts) {
},
(
msg
)
=>
{
},
(
msg
)
=>
{
st
.
equal
(
msg
,
deployMsg
[
0
])
st
.
equal
(
msg
,
deployMsg
[
0
])
deployMsg
.
shift
()
deployMsg
.
shift
()
})
}
,
()
=>
{}
)
}
}
var
uintContract
=
`contract uintContractTest {
var
uintContract
=
`contract uintContractTest {
...
...
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