MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / test_vswprintf

Function test_vswprintf

test/core/test_vswprintf_utf8.c:15–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include <assert.h>
14
15void test_vswprintf(const wchar_t *format, ...) {
16 wchar_t buffer[256];
17 va_list args;
18 va_start(args, format);
19 int n = vswprintf(buffer, 256, format, args);
20 fputws(buffer, stdout);
21 va_end(args);
22 wprintf(L"number of characters in above string: %d. errno: %d\n", n, errno);
23 assert(n == 24);
24 assert(errno == 0);
25}
26
27int main() {
28 setlocale(LC_ALL, "");

Callers 1

mainFunction · 0.85

Calls 4

vswprintfFunction · 0.85
fputwsFunction · 0.85
wprintfFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected