LCOV - code coverage report
Current view: top level - options - options.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 12 12 100.0 %
Date: 2023-02-14 20:10:26 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include <stdlib.h>
       2             : #include <stdio.h>
       3             : #include "options.pb.h"
       4             : #include "unittests.h"
       5             : 
       6           1 : int main()
       7             : {
       8           1 :     int status = 0;
       9             : 
      10             :     {
      11           1 :         HasFieldMessage msg1 = HasFieldMessage_init_default;
      12           1 :         HasFieldMessage msg2 = HasFieldMessage_init_zero;
      13             : 
      14           1 :         COMMENT("Test default_has option");
      15             : 
      16             :         /* Default initializer should obey has_default setting */
      17           1 :         TEST(msg1.has_present == true);
      18           1 :         TEST(msg1.has_missing == false);
      19           1 :         TEST(msg1.has_normal == false);
      20             : 
      21             :         /* Zero initializer should always have false */
      22           1 :         TEST(msg2.has_present == false);
      23           1 :         TEST(msg2.has_missing == false);
      24           1 :         TEST(msg2.has_normal == false);
      25             :     }
      26             : 
      27           1 :     return status;
      28             : }

Generated by: LCOV version 1.14