test/logging_tests.c

changeset 75
990734f548ef
parent 55
180bc6b18fec
child 80
0125e4089f88
--- a/test/logging_tests.c	Fri Oct 12 12:46:54 2012 +0200
+++ b/test/logging_tests.c	Sun Nov 04 20:50:12 2012 +0100
@@ -15,9 +15,9 @@
     ucx_logger_trace(logger, ST("[TRACE:] dont log this!\n"));
     ucx_logger_error(logger, ST("[ERROR:] error!\n"));
     fseek(stream, 0, SEEK_SET);
-    fread(buffer, 1, 100, stream);
+    int r = fread(buffer, 1, 100, stream);
 
-    UCX_TEST_ASSERT(strncmp(buffer,
+    UCX_TEST_ASSERT(r == 33 && strncmp(buffer,
             "[INFO:] allright\n[ERROR:] error!\n", 33) == 0, "incorrect logs");
 
     UCX_TEST_END

mercurial