LCOV - code coverage report
Current view: top level - ccan/check_type/test - run.c (source / functions) Hit Total Coverage
Test: skiboot.info Lines: 5 5 100.0 %
Date: 2024-01-02 21:04:04 Functions: 1 1 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #include <ccan/check_type/check_type.h>
       2                 :            : #include <ccan/tap/tap.h>
       3                 :            : 
       4                 :          2 : int main(int argc, char *argv[])
       5                 :            : {
       6                 :          2 :         int x = 0, y = 0;
       7                 :            : 
       8                 :            :         (void)argv;
       9                 :            :         plan_tests(9);
      10                 :            : 
      11                 :            :         ok1(check_type(argc, int) == 0);
      12                 :            :         ok1(check_type(&argc, int *) == 0);
      13                 :            :         ok1(check_types_match(argc, argc) == 0);
      14                 :            :         ok1(check_types_match(argc, x) == 0);
      15                 :            :         ok1(check_types_match(&argc, &x) == 0);
      16                 :            : 
      17                 :            :         ok1(check_type(x++, int) == 0);
      18                 :          2 :         ok(x == 0, "check_type does not evaluate expression");
      19                 :            :         ok1(check_types_match(x++, y++) == 0);
      20                 :          2 :         ok(x == 0 && y == 0, "check_types_match does not evaluate expressions");
      21                 :            : 
      22                 :          2 :         return exit_status();
      23                 :            : }

Generated by: LCOV version 1.14