test_app_main.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: CC0-1.0
  5. */
  6. #include "unity.h"
  7. #include "unity_test_runner.h"
  8. #include "unity_test_utils_memory.h"
  9. #include "freertos/FreeRTOS.h"
  10. #include "freertos/task.h"
  11. #include "test_hcd_common.h"
  12. void setUp(void)
  13. {
  14. unity_utils_record_free_mem();
  15. port_hdl = test_hcd_setup();
  16. }
  17. void tearDown(void)
  18. {
  19. //Short delay to allow task to be cleaned up
  20. vTaskDelay(10);
  21. test_hcd_teardown(port_hdl);
  22. port_hdl = NULL;
  23. unity_utils_evaluate_leaks();
  24. }
  25. void app_main(void)
  26. {
  27. // ____ ___ ___________________ __ __
  28. // | | \/ _____/\______ \ _/ |_ ____ _______/ |_
  29. // | | /\_____ \ | | _/ \ __\/ __ \ / ___/\ __\.
  30. // | | / / \ | | \ | | \ ___/ \___ \ | |
  31. // |______/ /_______ / |______ / |__| \___ >____ > |__|
  32. // \/ \/ \/ \/
  33. printf(" ____ ___ ___________________ __ __ \r\n");
  34. printf("| | \\/ _____/\\______ \\ _/ |_ ____ _______/ |_ \r\n");
  35. printf("| | /\\_____ \\ | | _/ \\ __\\/ __ \\ / ___/\\ __\\\r\n");
  36. printf("| | / / \\ | | \\ | | \\ ___/ \\___ \\ | | \r\n");
  37. printf("|______/ /_______ / |______ / |__| \\___ >____ > |__| \r\n");
  38. printf(" \\/ \\/ \\/ \\/ \r\n");
  39. unity_utils_setup_heap_record(80);
  40. unity_utils_set_leak_level(128);
  41. unity_run_menu();
  42. }