MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / Test

Method Test

tests/runtime/resource_borrow_in_record/test.cpp:5–12  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3namespace test_exports = ::exports::test::resource_borrow_in_record::to_test;
4
5wit::vector<test_exports::Thing::Owned> test_exports::Test(wit::vector<test_exports::Foo> list) {
6 auto result = wit::vector<test_exports::Thing::Owned>::allocate(list.size());
7 for (size_t i = 0; i < list.size(); ++i) {
8 auto str = wit::string::from_view(std::string_view(list[i].thing.get().get_internal() + " test"));
9 result.initialize(i, test_exports::Thing::new_internal(std::move(str)));
10 }
11 return result;
12}

Callers 1

RunMethod · 0.45

Calls 3

sizeMethod · 0.45
getMethod · 0.45
initializeMethod · 0.45

Tested by

no test coverage detected