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

Method DoubleError

tests/runtime/results/leaf.cpp:68–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68std::expected<std::expected<void, wit::string>, wit::string> test_exports::DoubleError(uint32_t a) {
69 if (a==0) {
70 return std::expected<void, wit::string>();
71 }
72 else if (a==1) {
73 return std::expected<void, wit::string>(std::unexpected(wit::string::from_view("one")));
74 }
75 else {
76 return std::unexpected(wit::string::from_view("two"));
77 }
78}

Callers 2

DoubleErrorFunction · 0.45
RunFunction · 0.45

Calls 1

unexpectedClass · 0.85

Tested by

no test coverage detected