summaryrefslogtreecommitdiff
path: root/modules/tools/tests/c_iface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tools/tests/c_iface.cpp')
-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 79d2344..61668de 100644
--- a/modules/tools/tests/c_iface.cpp
+++ b/modules/tools/tests/c_iface.cpp
@@ -33,7 +33,14 @@ using TestStructFunctionInterface = Interface<
>;
using TestArrayFunctionInterface = Interface<
- Member<Function<TestStructArray, Int32>, "three">
+ Member<Function<TestArray, Int32>, "three">
+>;
+
+using TestMultiFunctionInterface = Interface<
+ Member<Function<TestArray, Float32>, "foo">,
+ Member<Function<Float64, Int8>, "bar">,
+ Member<Function<UInt32, TestArray>, "baz">,
+ Member<Function<UInt32, Float64>, "banana">
>;
}
@@ -44,7 +51,7 @@ void test_generate(std::string& res){
ring_buffer r_buff{4u * 1024u * 1024u};
{
- auto eov = language_binding<Schema, binding::C>::generate(r_buff, {"kel"});
+ auto eov = language_binding<Schema, binding::C>::generate(r_buff, {"prefix"});
SAW_EXPECT(eov.is_value(), std::string{"Couldn't generate interface info: "} + std::string{eov.get_error().get_message()});
}
@@ -67,12 +74,12 @@ SAW_TEST("CIface One Function Interface"){
test_generate<schema::TestOneFunctionInterface>(res);
std::cout<<"\n"<<res<<"\n"<<std::endl;
}
-/*
-SAW_TEST("CIface Struct Function Interface"){
+
+SAW_TEST("CIface Multi Function Interface"){
using namespace saw;
std::string res;
- test_generate<schema::TestStructFunctionInterface>(res);
+ test_generate<schema::TestMultiFunctionInterface>(res);
std::cout<<"\n"<<res<<"\n"<<std::endl;
}
@@ -83,5 +90,4 @@ SAW_TEST("CIface Array Function Interface"){
test_generate<schema::TestArrayFunctionInterface>(res);
std::cout<<"\n"<<res<<"\n"<<std::endl;
}
-*/
}