MOS Source Code
Loading...
Searching...
No Matches
enum_validate.c
Go to the documentation of this file.
1#include <stdio.h>
2#include "unittests.h"
3#include "enum.pb.h"
4
5int main()
6{
7 int status = 0;
8 TEST(MyEnum_valid(MyEnum_VALUE1) == true);
9 TEST(MyEnum_valid(MyEnum_VALUE2) == true);
10 TEST(MyEnum_valid(MyEnum_VALUE15) == true);
11 TEST(MyShortNameEnum_valid(MSNE_VALUE256) == true);
12 TEST(MyShortNameEnum_valid(9999) == false);
13
14 if (status != 0)
15 fprintf(stdout, "\n\nSome tests FAILED!\n");
16
17 return status;
18}
19
int main()
#define stdout
Definition mos_stdio.h:31
#define TEST(x)
Definition test.h:3