Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
422c40f7
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
422c40f7
编写于
7月 06, 2017
作者:
N
Nathan Hourt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix *all* the tests
上级
477afee4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
6 deletion
+9
-6
tests/common/macro_support.hpp
tests/common/macro_support.hpp
+2
-2
tests/slow_tests/slow_tests.cpp
tests/slow_tests/slow_tests.cpp
+5
-3
tests/tests/native_contract_tests.cpp
tests/tests/native_contract_tests.cpp
+2
-1
未找到文件。
tests/common/macro_support.hpp
浏览文件 @
422c40f7
...
...
@@ -142,12 +142,12 @@
#define UPPDCR4(chain, owner, key, cfg) \
{ \
eos::chain::SignedTransaction trx; \
trx.emplaceMessage(config::StakedBalanceContractName, vector<AccountName>{
#
owner}, \
trx.emplaceMessage(config::StakedBalanceContractName, vector<AccountName>{owner}, \
vector<types::AccountPermission>{}, \
"setproducer", types::setproducer{owner, key, cfg}); \
trx.expiration = chain.head_block_time() + 100; \
trx.set_reference_block(chain.head_block_id()); \
chain.push_transaction(trx); \
BOOST_TEST_CHECKPOINT("Update producer " <<
#
owner); \
BOOST_TEST_CHECKPOINT("Update producer " << owner); \
}
#define UPPDCR3(chain, owner, key) UPPDCR4(chain, owner, key, chain.get_producer(owner).configuration)
tests/slow_tests/slow_tests.cpp
浏览文件 @
422c40f7
...
...
@@ -177,7 +177,8 @@ BOOST_FIXTURE_TEST_CASE(create_script, testing_fixture)
{
eos
::
chain
::
SignedTransaction
trx
;
trx
.
messages
.
resize
(
1
);
trx
.
messages
[
0
].
recipients
=
{
"simplecoin"
,
config
::
SystemContractName
};
trx
.
messages
[
0
].
code
=
config
::
SystemContractName
;
trx
.
messages
[
0
].
recipients
=
{
"simplecoin"
};
trx
.
setMessage
(
0
,
"setcode"
,
handler
);
trx
.
expiration
=
chain
.
head_block_time
()
+
100
;
trx
.
set_reference_block
(
chain
.
head_block_id
());
...
...
@@ -190,7 +191,7 @@ BOOST_FIXTURE_TEST_CASE(create_script, testing_fixture)
for
(
uint32_t
i
=
0
;
i
<
100000
;
++
i
)
{
eos
::
chain
::
SignedTransaction
trx
;
trx
.
emplaceMessage
(
"simplecoin"
,
vector
<
AccountName
>
{
"
simplecoin"
,
"
inita"
},
trx
.
emplaceMessage
(
"simplecoin"
,
vector
<
AccountName
>
{
"inita"
},
vector
<
types
::
AccountPermission
>
{},
"transfer"
,
types
::
transfer
{
"simplecoin"
,
"inita"
,
1
+
i
,
"hello"
});
trx
.
expiration
=
chain
.
head_block_time
()
+
100
;
...
...
@@ -971,7 +972,8 @@ R"(
eos
::
chain
::
SignedTransaction
trx
;
trx
.
messages
.
resize
(
1
);
trx
.
messages
[
0
].
recipients
=
{
"simplecoin"
,
config
::
SystemContractName
};
trx
.
messages
[
0
].
code
=
config
::
SystemContractName
;
trx
.
messages
[
0
].
recipients
=
{
"simplecoin"
};
trx
.
setMessage
(
0
,
"setcode"
,
handler
);
trx
.
expiration
=
chain
.
head_block_time
()
+
100
;
trx
.
set_reference_block
(
chain
.
head_block_id
());
...
...
tests/tests/native_contract_tests.cpp
浏览文件 @
422c40f7
...
...
@@ -99,6 +99,7 @@ BOOST_FIXTURE_TEST_CASE(transfer, testing_fixture)
auto
unpacked
=
fc
::
raw
::
unpack
<
UInt64
>
(
packed
);
BOOST_CHECK_EQUAL
(
value
,
unpacked
);
trx
.
messages
[
0
].
type
=
"transfer"
;
trx
.
messages
[
0
].
code
=
config
::
EosContractName
;
trx
.
setMessage
(
0
,
"transfer"
,
trans
);
auto
unpack_trans
=
trx
.
messageAs
<
types
::
transfer
>
(
0
);
...
...
@@ -140,7 +141,7 @@ BOOST_FIXTURE_TEST_CASE(producer_creation, testing_fixture)
}
Make_Key
(
signing
);
Update_Producer
(
chain
,
producer
,
signing_public_key
);
Update_Producer
(
chain
,
"producer"
,
signing_public_key
);
auto
&
producer
=
chain
.
get_producer
(
"producer"
);
BOOST_CHECK_EQUAL
(
producer
.
signing_key
,
signing_public_key
);
}
FC_LOG_AND_RETHROW
()
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录