LCOV - code coverage report
Current view: directory - src/trusted/service_runtime - nacl_check_test.c (source / functions) Found Hit Coverage
Test: coverage.lcov Lines: 22 17 77.3 %
Date: 2014-06-18 Functions: 0 0 -

       1                 : /*
       2                 :  * Copyright 2009 The Native Client Authors. All rights reserved.
       3                 :  * Use of this source code is governed by a BSD-style license that can
       4                 :  * be found in the LICENSE file.
       5                 :  */
       6                 : 
       7                 : #include <stdio.h>
       8                 : 
       9                 : #include "native_client/src/include/portability.h"
      10                 : 
      11                 : #include "native_client/src/shared/platform/nacl_check.h"
      12                 : #include "native_client/src/shared/platform/nacl_log.h"
      13                 : #include "native_client/src/shared/platform/nacl_log_intern.h"
      14                 : 
      15                 : void MyAbort(void) {
      16               0 :   exit(17);
      17               0 : }
      18                 : 
      19               7 : int main(int ac,
      20               7 :          char **av) {
      21               7 :   int opt;
      22                 : 
      23                 : 
      24               7 :   NaClLogModuleInit();
      25               7 :   gNaClLogAbortBehavior = MyAbort;
      26                 : 
      27              21 :   while (-1 != (opt = getopt(ac, av, "cds:CD"))) {
      28              18 :     switch (opt) {
      29                 :       case 'c':
      30               4 :         CHECK(0);
      31               0 :         break;
      32                 :       case 'd':
      33               9 :         DCHECK(0);
      34               1 :         break;
      35                 :       case 's':
      36               4 :         NaClCheckSetDebugMode(strtol(optarg, (char **) 0, 0));
      37               4 :         break;
      38                 :       case 'C':
      39               4 :         CHECK(1);
      40               2 :         break;
      41                 :       case 'D':
      42               0 :         DCHECK(1);
      43               0 :         break;
      44                 :     }
      45               7 :   }
      46               3 :   NaClLogModuleFini();
      47               3 :   return 0;
      48                 : }

Generated by: LCOV version 1.7