/** * @file test_all.c * @brief 整合所有单元测试 */ #include #include /* 外部测试函数声明 */ extern int run_crc_tests(void); extern int run_aes_tests(void); extern int run_boot_jump_tests(void); extern int run_protocol_tests(void); int main(void) { printf("\n"); printf("=================================================\n"); printf(" STM32 Bootloader - All Unit Tests\n"); printf("=================================================\n"); printf("\n"); int total_failures = 0; printf("Running CRC32 tests...\n"); total_failures += run_crc_tests(); printf("\nRunning AES-256 tests...\n"); total_failures += run_aes_tests(); printf("\nRunning Boot Jump tests...\n"); total_failures += run_boot_jump_tests(); printf("\nRunning Protocol tests...\n"); total_failures += run_protocol_tests(); printf("\n=================================================\n"); if (total_failures == 0) { printf("All tests PASSED!\n"); } else { printf("Total FAILURES: %d\n", total_failures); } printf("=================================================\n"); return (total_failures == 0) ? 0 : 1; }