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

Method StringError

tests/runtime/results/leaf.cpp:11–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace test_exports = ::exports::test::results::test;
10
11std::expected<float, wit::string> test_exports::StringError(float a) {
12 if (a==0.0) {
13 return std::unexpected(wit::string::from_view("zero"));
14 }
15 else {
16 return a;
17 }
18}
19
20std::expected<float, test_exports::E> test_exports::EnumError(float a) {
21 if (a==0.0) {

Callers 2

StringErrorFunction · 0.45
RunFunction · 0.45

Calls 1

unexpectedClass · 0.85

Tested by

no test coverage detected