arduino_ci icon indicating copy to clipboard operation
arduino_ci copied to clipboard

Establish best practices for an arduino library's repository using arduino_ci

Open ianfixes opened this issue 5 years ago • 2 comments

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 pixel to provide a mock class (or other testing aid) that font can 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 pixel mocks from pixel CI
  • How to structure test fixtures for discoverability
  • etc

ianfixes avatar Sep 28 '20 15:09 ianfixes

Relates to #169 -- whether a test/ directory can be an official part of a library

ianfixes avatar Oct 04 '20 00:10 ianfixes

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.

jgfoster avatar Nov 06 '20 03:11 jgfoster