summaryrefslogtreecommitdiff
path: root/modules/tools/tests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tools/tests')
-rw-r--r--modules/tools/tests/c_iface.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/tools/tests/c_iface.cpp b/modules/tools/tests/c_iface.cpp
index 61668de..29cc7f9 100644
--- a/modules/tools/tests/c_iface.cpp
+++ b/modules/tools/tests/c_iface.cpp
@@ -45,24 +45,27 @@ using TestMultiFunctionInterface = Interface<
}
template<typename Schema>
-void test_generate(std::string& res){
+void test_generate(std::string& res, std::string& src){
using namespace saw;
ring_buffer r_buff{4u * 1024u * 1024u};
+ ring_buffer r_src_buff{4u * 1024u * 1024u};
{
- auto eov = language_binding<Schema, binding::C>::generate(r_buff, {"prefix"});
+ auto eov = language_binding<Schema, binding::C>::generate(r_buff, r_src_buff, {"prefix"});
SAW_EXPECT(eov.is_value(), std::string{"Couldn't generate interface info: "} + std::string{eov.get_error().get_message()});
}
res = convert_to_string(r_buff);
+ src = convert_to_string(r_src_buff);
}
SAW_TEST("CIface Empty Interface"){
using namespace saw;
std::string res;
- test_generate<schema::TestEmptyInterface>(res);
+ std::string src;
+ test_generate<schema::TestEmptyInterface>(res,src);
std::cout<<"\n"<<res<<"\n"<<std::endl;
}
@@ -71,7 +74,8 @@ SAW_TEST("CIface One Function Interface"){
using namespace saw;
std::string res;
- test_generate<schema::TestOneFunctionInterface>(res);
+ std::string src;
+ test_generate<schema::TestOneFunctionInterface>(res, src);
std::cout<<"\n"<<res<<"\n"<<std::endl;
}
@@ -79,7 +83,8 @@ SAW_TEST("CIface Multi Function Interface"){
using namespace saw;
std::string res;
- test_generate<schema::TestMultiFunctionInterface>(res);
+ std::string src;
+ test_generate<schema::TestMultiFunctionInterface>(res, src);
std::cout<<"\n"<<res<<"\n"<<std::endl;
}
@@ -87,7 +92,8 @@ SAW_TEST("CIface Array Function Interface"){
using namespace saw;
std::string res;
- test_generate<schema::TestArrayFunctionInterface>(res);
+ std::string src;
+ test_generate<schema::TestArrayFunctionInterface>(res, src);
std::cout<<"\n"<<res<<"\n"<<std::endl;
}
}