Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add freertos_command_pool.c unit tests #89

Merged

Commits on Sep 19, 2024

  1. coremqtt-agent: Add FreeRTOS Command Pool tests

    This commit adds 7 new unit tests for the file freertos_command_pool.c.
    
    Signed-off-by: Reuben Cartwright <Reuben.Cartwright@arm.com>
    RC-Repositories committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    ae5f79e View commit details
    Browse the repository at this point in the history
  2. fix-mocks: Fix FreeRTOSConfig.h mock

    FreeRTOSConfig.h has been corrected to #include "fff.h".
    Additionally defines configASSERT within FreeRTOS.h.
    
    Signed-off-by: Reuben Cartwright <Reuben.Cartwright@arm.com>
    RC-Repositories committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    29f1940 View commit details
    Browse the repository at this point in the history
  3. aws-iot-fix: Remove unneeded .h include

    `mqtt_agent_task.h` included `transport_interface_api.h` unnecessarily
    for unit testing. This has been extracted into the test file
    `test_mqtt_agent_task.cpp` instead.
    
    Signed-off-by: Reuben Cartwright <Reuben.Cartwright@arm.com>
    RC-Repositories committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    8b31831 View commit details
    Browse the repository at this point in the history
  4. unit-testing: Refactor mocks

    Makes CMakeLists.txt use `BUILD_TESTING` as well as
    `CMAKE_CROSSCOMPILING`.
    
    Signed-off-by: Reuben Cartwright <Reuben.Cartwright@arm.com>
    RC-Repositories committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    63e9174 View commit details
    Browse the repository at this point in the history
  5. docs: Document unit testing with configASSERT

    This commit adds an explanation in `unit_testing.md` on how
    configASSERT is handled in `freertos_command_pool.c` tests and other
    test files.
    The intended behaviour is that an assertion failure causes the rest of
    the code to stop running, but can be handled by a test and does not
    stop the rest of the test's checks running.
    
    Signed-off-by: Reuben Cartwright <Reuben.Cartwright@arm.com>
    RC-Repositories committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    520744e View commit details
    Browse the repository at this point in the history