LCOV - code coverage report
Current view: top level - opt/gitlab-ci-multi-runner/builds/00e3338d/0/taskrambler/taskrambler/tests/mock - mock_logger.c (source / functions) Hit Total Coverage
Test: taskrambler 0.1.9 Lines: 8 8 100.0 %
Date: 2016-04-13 23:18:54 Functions: 3 3 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #include <stdio.h>
       2                 :            : 
       3                 :            : #include "class.h"
       4                 :            : #include "logger.h"
       5                 :            : #include "mock/mock_logger.h"
       6                 :            : 
       7                 :            : static
       8                 :            : void
       9                 :          8 : logMock(void * _this, logger_level level, const char * const msg)
      10                 :            : {
      11                 :          8 :         MockLogger this = _this;
      12                 :            : 
      13                 :          8 :         snprintf(this->message,
      14                 :            :                         MOCK_MESSAGE_MAX - 1,
      15                 :            :                         "[%s] %s",
      16                 :            :                         logger_level_str[level],
      17                 :            :                         msg);
      18                 :          8 : }
      19                 :            : 
      20                 :            : void
      21                 :          1 : mockLoggerCleanMsg(MockLogger this)
      22                 :            : {
      23                 :          1 :         this->message[0] = 0;
      24                 :          1 : }
      25                 :            : 
      26                 :            : INIT_IFACE(Logger, logMock);
      27                 :          3 : CREATE_CLASS(MockLogger, Logger, IFACE(Logger));
      28                 :            : 
      29                 :            : // vim: set ts=4 sw=4:

Generated by: LCOV version 1.11