mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 20:29:57 -04:00
add syscap define check.
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: I64f6a9d25913672393fd7c059478a5b52ebbcc15
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user