Skip to content

Commit 380a4a9

Browse files
committed
Testing windows ci with wasm tests.
1 parent d3582b5 commit 380a4a9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

source/tests/metacall_wasm_test/source/metacall_wasm_test.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,28 +132,46 @@ TEST_F(metacall_wasm_test, CallFunctions)
132132
{
133133
const char *functions_module_filename = "functions.wat";
134134

135+
std::cout << "DEBUG: functions.wat" << std::endl;
136+
std::cout.flush();
137+
135138
ASSERT_EQ((int)0, (int)metacall_load_from_file("wasm", &functions_module_filename, 1, NULL));
136139

140+
std::cout << "DEBUG: none_ret_none" << std::endl;
141+
std::cout.flush();
142+
137143
void *ret = metacall("none_ret_none");
138144
ASSERT_NE((void *)NULL, (void *)ret);
139145
ASSERT_EQ((enum metacall_value_id)METACALL_NULL, (enum metacall_value_id)metacall_value_id(ret));
140146
metacall_value_destroy(ret);
141147

148+
std::cout << "DEBUG: i64_ret_none" << std::endl;
149+
std::cout.flush();
150+
142151
ret = metacall("i64_ret_none", 0L);
143152
ASSERT_NE((void *)NULL, (void *)ret);
144153
ASSERT_EQ((enum metacall_value_id)METACALL_NULL, (enum metacall_value_id)metacall_value_id(ret));
145154
metacall_value_destroy(ret);
146155

156+
std::cout << "DEBUG: i32_f32_i64_f64_ret_none" << std::endl;
157+
std::cout.flush();
158+
147159
ret = metacall("i32_f32_i64_f64_ret_none", 0, 0.0f, 0L, 0.0);
148160
ASSERT_NE((void *)NULL, (void *)ret);
149161
ASSERT_EQ((enum metacall_value_id)METACALL_NULL, (enum metacall_value_id)metacall_value_id(ret));
150162
metacall_value_destroy(ret);
151163

164+
std::cout << "DEBUG: none_ret_i32" << std::endl;
165+
std::cout.flush();
166+
152167
ret = metacall("none_ret_i32");
153168
ASSERT_EQ((enum metacall_value_id)METACALL_INT, (enum metacall_value_id)metacall_value_id(ret));
154169
ASSERT_EQ((int)1, (int)metacall_value_to_int(ret));
155170
metacall_value_destroy(ret);
156171

172+
std::cout << "DEBUG: none_ret_i32_f32_i64_f64" << std::endl;
173+
std::cout.flush();
174+
157175
ret = metacall("none_ret_i32_f32_i64_f64");
158176
ASSERT_EQ((enum metacall_value_id)METACALL_ARRAY, (enum metacall_value_id)metacall_value_id(ret));
159177

@@ -168,6 +186,9 @@ TEST_F(metacall_wasm_test, CallFunctions)
168186
ASSERT_EQ((double)4.0, (double)metacall_value_to_double(values[3]));
169187
metacall_value_destroy(ret);
170188

189+
std::cout << "DEBUG: i32_f32_i64_f64_ret_i32_f32_i64_f64" << std::endl;
190+
std::cout.flush();
191+
171192
ret = metacall("i32_f32_i64_f64_ret_i32_f32_i64_f64", 0, 0, 0, 0);
172193
ASSERT_EQ((enum metacall_value_id)METACALL_ARRAY, (enum metacall_value_id)metacall_value_id(ret));
173194

@@ -182,11 +203,17 @@ TEST_F(metacall_wasm_test, CallFunctions)
182203
ASSERT_EQ((double)4.0, (double)metacall_value_to_double(values[3]));
183204
metacall_value_destroy(ret);
184205

206+
std::cout << "DEBUG: trap" << std::endl;
207+
std::cout.flush();
208+
185209
// It should exit with illegal instruction
186210
#if defined(unix) || defined(__unix__) || defined(__unix) || \
187211
defined(linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux)
188212
ASSERT_EXIT((metacall("trap"), exit(0)), ::testing::KilledBySignal(SIGILL), ".*");
189213
#endif
214+
215+
std::cout << "DEBUG: end" << std::endl;
216+
std::cout.flush();
190217
}
191218

192219
TEST_F(metacall_wasm_test, LinkModules)

0 commit comments

Comments
 (0)