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

          Line data    Source code
       1             : #include <stdio.h>
       2             : #include "unittests.h"
       3             : #include "enum.pb.h"
       4             : 
       5           1 : int main()
       6             : {
       7           1 :     int status = 0;
       8           1 :     TEST(strcmp(MyEnum_name(MyEnum_VALUE1), "VALUE1") == 0);
       9           1 :     TEST(strcmp(MyEnum_name(MyEnum_VALUE2), "VALUE2") == 0);
      10           1 :     TEST(strcmp(MyEnum_name(MyEnum_VALUE15), "VALUE15") == 0);
      11           1 :     TEST(strcmp(MyShortNameEnum_name(MSNE_VALUE256), "MSNE_VALUE256") == 0);
      12           1 :     TEST(strcmp(MyShortNameEnum_name(9999), "unknown") == 0);
      13             :     
      14           1 :     if (status != 0)
      15           0 :         fprintf(stdout, "\n\nSome tests FAILED!\n");
      16             : 
      17           1 :     return status;
      18             : }
      19             : 

Generated by: LCOV version 1.14