Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178237996
D62321.1796310659.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
675 B
Referenced Files
None
Subscribers
None
D62321.1796310659.diff
View Options
diff --git a/lib/libc/tests/stdio/open_memstream2_test.c b/lib/libc/tests/stdio/open_memstream2_test.c
--- a/lib/libc/tests/stdio/open_memstream2_test.c
+++ b/lib/libc/tests/stdio/open_memstream2_test.c
@@ -42,10 +42,9 @@
static void
assert_stream(const char *contents)
{
- if (strlen(contents) != len)
- printf("bad length %zd for \"%s\"\n", len, contents);
- else if (strncmp(buf, contents, strlen(contents)) != 0)
- printf("bad buffer \"%s\" for \"%s\"\n", buf, contents);
+ ATF_REQUIRE_EQ(len, strlen(contents));
+ ATF_REQUIRE_MSG(strncmp(buf, contents, len) == 0,
+ "bad buffer \"%s\" for \"%s\"\n", buf, contents);
}
ATF_TC_WITHOUT_HEAD(open_group_test);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 3, 3:10 PM (19 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42183664
Default Alt Text
D62321.1796310659.diff (675 B)
Attached To
Mode
D62321: libc: memstream tests: convert asset_stream() to actual assertions
Attached
Detach File
Event Timeline