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

Function test_write

test/unistd/pipe.c:27–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25// all the data can be read/written in one call.
26
27void test_write(int fd1, unsigned char *ch, int size) {
28 memset(buf, 0, sizeof buf);
29 for (int i = 0; i < size; ++i) {
30 buf[i] = (*ch)++;
31 }
32 assert(write(fd1, buf, size) == size);
33}
34
35void test_read(int fd0, unsigned char *ch, int size) {
36 memset(buf, 0, sizeof buf);

Callers 1

test_mostFunction · 0.85

Calls 3

memsetFunction · 0.85
assertFunction · 0.50
writeFunction · 0.50

Tested by

no test coverage detected