test_app_main.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "unity.h"
  7. #include "unity_test_utils.h"
  8. #include "esp_heap_caps.h"
  9. // Some resources are lazy allocated in the TWAI driver, the threshold is left for that case
  10. #define TEST_MEMORY_LEAK_THRESHOLD (200)
  11. void setUp(void)
  12. {
  13. unity_utils_record_free_mem();
  14. }
  15. void tearDown(void)
  16. {
  17. esp_reent_cleanup(); //clean up some of the newlib's lazy allocations
  18. unity_utils_evaluate_leaks_direct(TEST_MEMORY_LEAK_THRESHOLD);
  19. }
  20. void app_main(void)
  21. {
  22. // _______ ___ ___ _____ _
  23. // |_ _\ \ / / \ |_ _| |_ _|__ ___| |_
  24. // | | \ \ /\ / / _ \ | | | |/ _ \/ __| __|
  25. // | | \ V V / ___ \ | | | | __/\__ \ |_
  26. // |_| \_/\_/_/ \_\___| |_|\___||___/\__|
  27. printf(" _______ ___ ___ _____ _\n");
  28. printf("|_ _\\ \\ / / \\ |_ _| |_ _|__ ___| |_\n");
  29. printf(" | | \\ \\ /\\ / / _ \\ | | | |/ _ \\/ __| __|\n");
  30. printf(" | | \\ V V / ___ \\ | | | | __/\\__ \\ |_\n");
  31. printf(" |_| \\_/\\_/_/ \\_\\___| |_|\\___||___/\\__|\n");
  32. unity_run_menu();
  33. }