arduino_ci
arduino_ci copied to clipboard
Establish best practices for an arduino library's repository using arduino_ci
Summary
continuing #150
When writing a library that might be consumed by other libraries, how can we best provide mocks for those downstream project? In other words, given a library called font which depends on one called pixel, what should pixel look like? Initial considerations are the following:
- Some ability for
pixelto provide a mock class (or other testing aid) thatfontcan have access to - Some ability to easily switch between mocks and real classes (support dependency injection?)
- Assurance that there is no cost (in compiled bytes on real hardware) for providing test classes. (Compiler flags?)
- Ability to test
pixelmocks frompixelCI - How to structure test fixtures for discoverability
- etc
Relates to #169 -- whether a test/ directory can be an official part of a library
The other projects in this organization (such as LiquidCrystal) provide examples of how this can be approached. As we gain experience with those we may have better advice to contribute here.