MOS Source Code
Loading...
Searching...
No Matches
enum_to_string.cxx
Go to the documentation of this file.
1#include <stdio.h>
2#include "unittests.h"
3#include "enum.pb.h"
4
5extern "C" 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((MyShortNameEnum)100), "unknown") == 0);
13
14 if (status != 0)
15 fprintf(stdout, "\n\nSome tests FAILED!\n");
16
17 return status;
18}
19
int main()
MOSAPI s32 strcmp(const char *str1, const char *str2)
Definition mos_string.c:24
#define stdout
Definition mos_stdio.h:31
#define TEST(x)
Definition test.h:3