mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 02:11:19 -04:00
787901d674
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: I64f6a9d25913672393fd7c059478a5b52ebbcc15
21 lines
511 B
C
21 lines
511 B
C
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "syscap_define.h"
|
|
|
|
int main()
|
|
{
|
|
size_t size = sizeof(g_arraySyscap) / sizeof(SyscapWithNum);
|
|
// printf("size = %lu\n", size);
|
|
int flag = 0;
|
|
|
|
for (int i = 0; i < size; i++) {
|
|
if (g_arraySyscap[i].num != i) {
|
|
printf("[Error]: %s -> num(%u) should be %d.\n", g_arraySyscap[i].str, g_arraySyscap[i].num, i);
|
|
flag++;
|
|
}
|
|
}
|
|
// if (flag == 0) return 0;
|
|
// else exit(1);
|
|
exit(1);
|
|
} |