LCOV - code coverage report
Current view: directory - src/trusted/service_runtime - nacl_check_test.c (source / functions) Found Hit Coverage
Test: coverage.lcov Lines: 14 13 92.9 %
Date: 2012-02-16 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               3 : void MyAbort(void) {
      16               3 :   exit(17);
      17                 : }
      18                 : 
      19                 : int main(int ac,
      20               6 :          char **av) {
      21                 :   int opt;
      22                 : 
      23                 : 
      24               6 :   NaClLogModuleInit();
      25               6 :   gNaClLogAbortBehavior = MyAbort;
      26                 : 
      27              18 :   while (-1 != (opt = getopt(ac, av, "cds:CD"))) {
      28               9 :     switch (opt) {
      29                 :       case 'c':
      30               2 :         CHECK(0);
      31               0 :         break;
      32                 :       case 'd':
      33               3 :         DCHECK(0);
      34               2 :         break;
      35                 :       case 's':
      36               3 :         NaClCheckSetDebugMode(strtol(optarg, (char **) 0, 0));
      37                 :         break;
      38                 :       case 'C':
      39                 :         CHECK(1);
      40                 :         break;
      41                 :       case 'D':
      42                 :         DCHECK(1);
      43                 :         break;
      44                 :     }
      45                 :   }
      46               3 :   NaClLogModuleFini();
      47               3 :   return 0;
      48                 : }

Generated by: LCOV version 1.7