MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / assert_contains

Method assert_contains

tests/all/main.rs:144–150  ·  view source on GitHub ↗
(&self, msg: &str)

Source from the content-addressed store, hash-verified

142
143impl ErrorExt for wasmtime::Error {
144 fn assert_contains(&self, msg: &str) {
145 if self.chain().any(|e| e.to_string().contains(msg)) {
146 return;
147 }
148
149 panic!("failed to find:\n{msg}\n\nwithin error message:\n{self:?}")
150 }
151}

Callers 15

test_trap_returnFunction · 0.80
test_trap_trace_cbFunction · 0.80
trap_display_prettyFunction · 0.80
mismatched_argumentsFunction · 0.80
call_signature_mismatchFunction · 0.80
start_trap_prettyFunction · 0.80
hint_with_dwarf_infoFunction · 0.80

Calls 4

anyMethod · 0.80
chainMethod · 0.80
containsMethod · 0.45
to_stringMethod · 0.45

Tested by 15

test_trap_returnFunction · 0.64
test_trap_trace_cbFunction · 0.64
trap_display_prettyFunction · 0.64
mismatched_argumentsFunction · 0.64
call_signature_mismatchFunction · 0.64
start_trap_prettyFunction · 0.64
hint_with_dwarf_infoFunction · 0.64