Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
16ddef44
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,发现更多精彩内容 >>
提交
16ddef44
编写于
10月 09, 2017
作者:
M
Matias Romeo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix db tests
上级
70d557ea
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
21 deletion
+6
-21
contracts/test_api/test_db.cpp
contracts/test_api/test_db.cpp
+5
-20
tests/api_tests/api_tests.cpp
tests/api_tests/api_tests.cpp
+1
-1
未找到文件。
contracts/test_api/test_db.cpp
浏览文件 @
16ddef44
...
...
@@ -4,31 +4,17 @@
#include <eoslib/db.hpp>
#include "test_api.hpp"
// TestModel3xi64 records[] = {
// {1, 1, 0, N()}, // 0 <---------------------------
// {1, 1, 1, N()}, // 1 |
// {1, 2, 2, N()}, // 2 <--------------- |
// {2, 1, 3, N()}, // 3 | |
// {2, 2, 2, N()}, // 4 same {secondary,tertiary} |
// {2, 2, 5, N()}, // 5 |
// {3, 1, 6, N()}, // 6 |
// {4, 0, 7, N()}, // 7 |
// {4, 5, 8, N()}, // 8 |
// {5, 1, 9, N()}, // 9 |
// {5, 2, 0, N()}, //10 same {tertiary}-------------
// };
int
primary
[
11
]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
};
int
secondary
[
11
]
=
{
7
,
0
,
1
,
3
,
6
,
9
,
10
,
2
,
4
,
5
,
8
};
int
tertiary
[
11
]
=
{
0
,
10
,
1
,
2
,
4
,
3
,
5
,
6
,
7
,
8
,
9
};
int
primary_lb
[
11
]
=
{
0
,
0
,
0
,
3
,
3
,
3
,
6
,
7
,
7
,
9
,
9
};
int
secondary_lb
[
11
]
=
{
0
,
0
,
2
,
0
,
2
,
2
,
0
,
7
,
8
,
0
,
2
};
int
tertiary_lb
[
11
]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
1
0
};
int
secondary_lb
[
11
]
=
{
0
,
0
,
10
,
0
,
10
,
10
,
0
,
7
,
8
,
0
,
10
};
int
tertiary_lb
[
11
]
=
{
0
,
1
,
2
,
3
,
2
,
5
,
6
,
7
,
8
,
9
,
0
};
int
primary_ub
[
11
]
=
{
3
,
3
,
3
,
6
,
6
,
6
,
7
,
9
,
9
,
-
1
,
-
1
};
int
secondary_ub
[
11
]
=
{
2
,
2
,
8
,
2
,
8
,
8
,
2
,
0
,
-
1
,
2
,
8
};
int
tertiary_ub
[
11
]
=
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
-
1
};
int
secondary_ub
[
11
]
=
{
10
,
10
,
8
,
10
,
8
,
8
,
10
,
0
,
-
1
,
10
,
8
};
int
tertiary_ub
[
11
]
=
{
1
,
2
,
3
,
5
,
3
,
6
,
7
,
8
,
9
,
-
1
,
1
};
#pragma pack(push, 1)
struct
TestModel
{
...
...
@@ -756,7 +742,7 @@ unsigned int test_db::key_i64i64i64_general() {
#define UPPER(I, O, T, V) CALL(upper_bound, O, I, T, V)
#define LOWER(I, O, T, V) CALL(lower_bound, O, I, T, V)
#define LOGME
1
#define LOGME
0
#define BS(X) ((X) ? "true" : "false")
#define TABLE1_ASSERT(I, V, msg) \
if(LOGME) {\
...
...
@@ -823,7 +809,6 @@ unsigned int test_db::key_i64i64i64_general() {
auto j = 0; \
do { \
eos::remove_reference<decltype(records[0])>::type tmp = records[I[j]]; \
eos::print("NEXT voy a busc con =>", " a:", tmp.a, " b:", tmp.b, " c:", tmp.c, "I[j]:", uint64_t(I[j]), "\n"); \
res = NEXT(I, i64i64i64, N(table1), tmp);\
if(j+1<n){ TABLE1_ASSERT(I[j+1], tmp, "i64x3 NEXT " #I " ok "); } \
else { WASM_ASSERT(res == -1, "i64x3 NEXT " #I " fail "); }\
...
...
tests/api_tests/api_tests.cpp
浏览文件 @
16ddef44
...
...
@@ -195,7 +195,7 @@ void send_set_code_message(testing_blockchain& chain, types::setcode& handler, A
BOOST_FIXTURE_TEST_CASE
(
test_all
,
testing_fixture
)
{
try
{
//auto wasm = assemble_wast( readFile2("/home/matu/Documents/Dev/eos/contracts/test_api/test_api.wast").c_str() );
//auto wasm = assemble_wast( readFile2("/home/matu/Documents/Dev/eos/
build/
contracts/test_api/test_api.wast").c_str() );
auto
wasm
=
assemble_wast
(
test_api_wast
);
Make_Blockchain
(
chain
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录