test/logging_tests.c

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

mercurial