1 #include <wasmtime/types/func.hh>
2 
3 #include <gtest/gtest.h>
4 
5 using namespace wasmtime;
6 
TEST(FuncType,Smoke)7 TEST(FuncType, Smoke) {
8   FuncType t({}, {});
9   EXPECT_EQ(t->params().size(), 0);
10   EXPECT_EQ(t->results().size(), 0);
11 
12   auto other = t;
13   other = t;
14 
15   FuncType t2({ValKind::I32}, {ValKind::I64});
16   EXPECT_EQ(t2->params().size(), 1);
17   for (auto ty : t2->params()) {
18     EXPECT_EQ(ty.kind(), ValKind::I32);
19   }
20   EXPECT_EQ(t2->results().size(), 1);
21   for (auto ty : t2->results()) {
22     EXPECT_EQ(ty.kind(), ValKind::I64);
23   }
24 }
25