Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
38c74a2b
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,发现更多精彩内容 >>
提交
38c74a2b
编写于
11月 21, 2017
作者:
B
Bart Wyatt
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/abi_hpp_cleanup' into eos-noon
上级
53d20fc3
7a9c8263
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
51 deletion
+5
-51
CMakeModules/wasm.cmake
CMakeModules/wasm.cmake
+1
-14
contracts/asserter/CMakeLists.txt
contracts/asserter/CMakeLists.txt
+1
-1
tests/api_tests/table_abi_test/CMakeLists.txt
tests/api_tests/table_abi_test/CMakeLists.txt
+2
-1
tests/wasm_tests/wasm_tests.cpp
tests/wasm_tests/wasm_tests.cpp
+1
-35
未找到文件。
CMakeModules/wasm.cmake
浏览文件 @
38c74a2b
...
...
@@ -149,6 +149,7 @@ macro(add_wast_target target INCLUDE_FOLDERS DESTINATION_FOLDER)
VERBATIM
)
set_property
(
DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${
target
}
.abi.hpp
)
set
(
extra_target_dependency
${
DESTINATION_FOLDER
}
/
${
target
}
.abi.hpp
)
else
()
endif
()
...
...
@@ -160,17 +161,3 @@ macro(add_wast_target target INCLUDE_FOLDERS DESTINATION_FOLDER)
set
(
extra_target_dependency
)
endmacro
(
add_wast_target
)
function
(
add_wast_abi_target target INCLUDE_FOLDERS SOURCE_FOLDER DESTINATION_FOLDER
)
add_custom_command
(
OUTPUT
${
DESTINATION_FOLDER
}
/
${
target
}
.abi.hpp
DEPENDS
${
SOURCE_FOLDER
}
/
${
target
}
.abi
COMMAND echo
"const char*
${
target
}
_abi = R
\"
=====("
>
${
DESTINATION_FOLDER
}
/
${
target
}
.abi.hpp
COMMAND cat
${
SOURCE_FOLDER
}
/
${
target
}
.abi >>
${
DESTINATION_FOLDER
}
/
${
target
}
.abi.hpp
COMMAND echo
")=====
\"
;"
>>
${
DESTINATION_FOLDER
}
/
${
target
}
.abi.hpp
COMMENT
"Generating
${
target
}
.abi.hpp"
VERBATIM
)
set_property
(
DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
${
target
}
.abi.hpp
)
set
(
extra_target_dependency
${
DESTINATION_FOLDER
}
/
${
target
}
.abi.hpp
)
add_wast_target
(
${
target
}
"
${
INCLUDE_FOLDERS
}
"
${
CMAKE_CURRENT_BINARY_DIR
}
)
endfunction
(
add_wast_abi_target
)
contracts/asserter/CMakeLists.txt
浏览文件 @
38c74a2b
file
(
GLOB ABI_FILES
"*.abi"
)
configure_file
(
"
${
ABI_FILES
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
COPYONLY
)
add_wast_target
(
asserter
"
${
CMAKE_SOURCE_DIR
}
/contracts"
${
CMAKE_CURRENT_BINARY_DIR
}
)
configure_file
(
"
${
ABI_FILES
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
COPYONLY
)
\ No newline at end of file
tests/api_tests/table_abi_test/CMakeLists.txt
浏览文件 @
38c74a2b
file
(
GLOB SOURCE_FILES
"*.cpp"
)
add_wast_abi_target
(
table_abi_test
"
${
CMAKE_SOURCE_DIR
}
/contracts"
${
CMAKE_CURRENT_SOURCE_DIR
}
${
CMAKE_CURRENT_BINARY_DIR
}
)
configure_file
(
"
${
ABI_FILES
}
"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
COPYONLY
)
add_wast_target
(
table_abi_test
"
${
CMAKE_SOURCE_DIR
}
/contracts"
${
CMAKE_CURRENT_BINARY_DIR
}
)
tests/wasm_tests/wasm_tests.cpp
浏览文件 @
38c74a2b
...
...
@@ -2,6 +2,7 @@
#include <eosio/testing/tester.hpp>
#include <eosio/chain/contracts/abi_serializer.hpp>
#include <asserter/asserter.wast.hpp>
#include <asserter/asserter.abi.hpp>
#include <fc/variant_object.hpp>
...
...
@@ -38,41 +39,6 @@ struct provereset {
FC_REFLECT_EMPTY
(
provereset
);
const
char
*
const
asserter_abi
=
R"EOF(
{
"types": [],
"structs": [
{
"name": "assertdef",
"base": "",
"fields": [
{
"name": "condition",
"type": "int8"
},{
"name": "message",
"type": "string"
}
]
}, {
"name": "nothing",
"base": "",
"fields": []
}
],
"actions": [
{
"name": "procassert",
"type": "assertdef"
}, {
"name": "provereset",
"type": "nothing"
}
],
"tables": []
}
)EOF"
;
BOOST_AUTO_TEST_SUITE
(
wasm_tests
)
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录