ACPI AML decompiler w/ CFG recovery and structured pseudocode
29

Configure Feed

Select the types of activity you want to include in your feed.

tobi / test / main.c
833 B 26 lines
1#include "t.h" 2 3int main(int argc, char **argv) { 4 struct ent { const char *name; int (*fn)(void); } tests[] = { 5 {"rd", t_rd}, {"nm", t_nm}, {"p", t_p}, {"ir", t_ir}, {"cf", t_cf}, 6 {"da", t_da}, {"dc", t_dc}, {"js", t_js}, {"bad", t_bad}, {"cli", t_cli}, 7 {"prod", t_prod}, 8 }; 9 if (argc == 2) { 10 for (size_t i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { 11 if (strcmp(argv[1], tests[i].name) == 0) { 12 return tests[i].fn(); 13 } 14 } 15 fprintf(stderr, "unknown test %s\n", argv[1]); 16 return 2; 17 } 18 for (size_t i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) { 19 int rc = tests[i].fn(); 20 if (rc != 0) { 21 fprintf(stderr, "%s failed\n", tests[i].name); 22 return rc; 23 } 24 } 25 return 0; 26}