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