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

Function assert_str

tests/runtime/strings/runner.cpp:7–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <runner_cpp.h>
6
7void assert_str(wit::string const& str, const char* expected) {
8 size_t expected_len = strlen(expected);
9 assert(str.size() == expected_len);
10 assert(memcmp(str.data(), expected, expected_len) == 0);
11}
12
13void exports::runner::Run() {
14 test::strings::to_test::TakeBasic("latin utf16");

Callers 1

RunMethod · 0.70

Calls 3

assertFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected