C and C++ project demonstrating active object and state machine unit testing, using CppUTest.
This project was created to provide an example code base supporting the following post:
https://covemountainsoftware.com/2020/04/17/unit-testing-active-objects-and-state-machines/
This project and associated code were developed and tested in Ubuntu 16.04 using CLion 2020.1. Recently confirmed in OSX 10.14.6, again using CLion 2020.1.
The project requires an installation of CppUTest version 3.8.
The primary focus should be the "HwLockCtrlServiceTests" build target and associated code. See the folder "services/hwLockCtrlService" and associated code and tests.
Secondary focus may be given to this target and associated code. These classes create the foundation needed for the primary code/focus.
Secondary focus may be given to this target and associated code. This trivial flat state machine class create the foundation for this project's demonstration active object class.
This target is a trivial terminal demo app showing the target service in action "for real."
- [1] Sutter, Herb. Prefer Using Active Objects Instead of Naked Threads. Dr. Dobbs, June 2010. https://www.drdobbs.com/parallel/prefer-using-active-objects-instead-of-n/225700095
- [2] Grenning, James. Test Driven Development for Embedded C. https://amzn.to/2YbANIG
- [3] Samek, Miro. Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems. https://amzn.to/3eXdhoz
- [4] Just Software Solutions Ltd blog: Implementing a Thread-Safe Queue using Condition Variables. https://www.justsoftwaresolutions.co.uk/threading/implementing-a-thread-safe-queue-using-condition-variables.html
- [5] Jason Turner's C++ starter kit: https://github.com/lefticus/cpp_starter_project
- [6] Lars Melchior's C++ starter kit: https://github.com/TheLartians/ModernCppStarter
- [7] Guy Morand (r4nd0m6uy) blog on cmake and cpputest: https://r4nd0m6uy.ch/cmake-and-cpputest.html
- [8] Davis Ford's github repo on cmake and cpputest: https://github.com/davisford/cmake-cpputest
Contact information is available here: https://covemountainsoftware.com/services/consulting/