Shift to Unity testing framework
Feature Description
This merge request transitions MicroCART from using a lightweight testing framework made by last year's team to the Unity testing suite, addressing (part of) Issue #20 (closed)
Implementation Details
- Unity was added to the top level of the repo
- Each of the three existing tests that referenced the existing testing framework
were updated to use Unity
test_queue.c
test_quad_app.c
test_computation_graph.c
- Makefiles were modified to use Unity and define
UNITY_INCLUDE_CONFIG_H
so the Unity config header is referenced
Impacted Areas
- Quad Software
- Testing
Merge request reports
Activity
- Resolved by Austin Rohlfing
- Resolved by Austin Rohlfing
- Resolved by Austin Rohlfing
- Resolved by Austin Rohlfing
- Resolved by Austin Rohlfing
- Resolved by Austin Rohlfing
@rohlfing I did not write that README, as it is provided as part of the Unity package, so I will not be addressing these comments.
- Resolved by Peter Thedens
- Resolved by Peter Thedens
- Resolved by Peter Thedens
@jhladik The tests pass even if there are no asserts. I do not actually know what happens if the infinite loop occurs. I will look into the behavior (whether the test will terminate after some time or get stuck itself) and at other ways of testing these cases.
@jhladik After reviewing the code and doing a few tests, I think what is written here works. There is an if statement in the code under test that checks for the depth of the current graph and exits if it gets too big. If that check is removed, the code fails from a segmentation fault if circular graphs are traversed infinitely. As far as the tests passing, the code passes the Unity testing framework as it is, so I see no need to add more asserts; I am explicitly calling
RUN_TEST
on each of the tests, so it should run all the tests regardless of whether they contain an assert.mentioned in commit 56912513