| 16 | } |
| 17 | |
| 18 | auto get_export_func(const wasm::ownvec<wasm::Extern>& exports, size_t i) -> const wasm::Func* { |
| 19 | if (exports.size() <= i || !exports[i]->func()) { |
| 20 | std::cout << "> Error accessing function export " << i << "!" << std::endl; |
| 21 | exit(1); |
| 22 | } |
| 23 | return exports[i]->func(); |
| 24 | } |
| 25 | |
| 26 | template<class T, class U> |
| 27 | void check(T actual, U expected) { |