My team is responsible for the development of an API for a large system that we also write. We need to provide example code so that other developers using our API can learn
Simple solution: Make a small application in which you include all the sample code headers and then call their respective entry points
#include "samples/sampleA.h"
void main()
{
SomeFunction();
}
then after you make a build run these little apps you need to be sure they ran ok. But can you verify that the code ran ok without having someone have a slumber party with the NightlyBuild server?
Better Solution: Log the output and have someone look at it in the morning.
Even Better Solution: Log the output and grep it or something so no one has to look at it unless its broken.
Best Solution: Find a suitable test framework, hopefully something with all the bells and whistles you can get so it can email people if its broken or something like that. In our case we avoid the bells and whistles instead we connected a USB Police Siren that goes off when something breaks It's quite exciting!