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

Method Run

tests/runtime/options/runner.cs:8–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6public class RunnerWorldExportsImpl : IRunnerWorldExports
7{
8 public static void Run()
9 {
10 IToTestImports.OptionNoneParam(null);
11 IToTestImports.OptionSomeParam("foo");
12 Debug.Assert(IToTestImports.OptionNoneResult() == null);
13 Debug.Assert(IToTestImports.OptionSomeResult() == "foo");
14 Debug.Assert(IToTestImports.OptionRoundtrip("foo") == "foo");
15 Debug.Assert(IToTestImports.DoubleOptionRoundtrip(new Option<uint?>(42)).Value == 42);
16 Debug.Assert(IToTestImports.DoubleOptionRoundtrip(new Option<uint?>(null)).Value == null);
17 Debug.Assert(!IToTestImports.DoubleOptionRoundtrip(Option<uint?>.None).HasValue);
18 }
19}

Callers

nothing calls this directly

Calls 6

OptionNoneParamMethod · 0.45
OptionSomeParamMethod · 0.45
OptionNoneResultMethod · 0.45
OptionSomeResultMethod · 0.45
OptionRoundtripMethod · 0.45
DoubleOptionRoundtripMethod · 0.45

Tested by

no test coverage detected