Skip to content
Snippets Groups Projects

Shift to Unity testing framework

Merged Peter Thedens requested to merge TESTING_unit_testing_upgrade into master
All threads resolved!

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
Edited by Peter Thedens

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Austin Rohlfing
  • Austin Rohlfing
  • Austin Rohlfing
  • Austin Rohlfing
  • Austin Rohlfing
  • Author Contributor

    @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.

  • Understood. I'll mark these as resolved

  • Austin Rohlfing resolved all discussions

    resolved all discussions

  • Austin Rohlfing approved this merge request

    approved this merge request

  • jhladik
  • jhladik
  • jhladik
  • Author Contributor

    @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.

  • mkelly2 approved this merge request

    approved this merge request

  • Peter Thedens added 1 commit

    added 1 commit

    Compare with previous version

  • Peter Thedens added 1 commit

    added 1 commit

    Compare with previous version

  • Peter Thedens added 1 commit

    added 1 commit

    Compare with previous version

  • Peter Thedens added 1 commit

    added 1 commit

    Compare with previous version

  • Author Contributor

    @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.

  • Peter Thedens resolved all discussions

    resolved all discussions

  • Austin Rohlfing approved this merge request

    approved this merge request

  • mkelly2 approved this merge request

    approved this merge request

  • ktrost approved this merge request

    approved this merge request

  • jhladik approved this merge request

    approved this merge request

  • merged

  • Peter Thedens mentioned in commit 56912513

    mentioned in commit 56912513

  • Please register or sign in to reply
    Loading