mirror of
https://github.com/openharmony/developtools_syscap_codec.git
synced 2026-08-27 10:21:25 -04:00
0f09b335f6
Signed-off-by: yudechen <chenyude@huawei.com> Change-Id: I26d83d022570cedfd53fcfb9b9e83ac68fe3ac86
22 lines
492 B
C
22 lines
492 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);
|
|
size_t flag = 0;
|
|
|
|
for (size_t i = 0; i < size; i++) {
|
|
if (g_arraySyscap[i].num != i) {
|
|
printf("[Error]: %s -> num(%u) should be %lu.\n", g_arraySyscap[i].str, g_arraySyscap[i].num, i);
|
|
flag++;
|
|
}
|
|
}
|
|
if (flag == 0) {
|
|
return 0;
|
|
} else {
|
|
return -1;
|
|
}
|
|
} |