fix: Add Arduino setup()/loop() functions back

Added setup()/loop() functions back to *_main.cc files to support compiling in CI.  Future features could enable this for the end user.
This commit is contained in:
Chris
2019-01-07 12:37:34 -06:00
parent 23e6937873
commit 45c58aa6f3
2 changed files with 28 additions and 0 deletions

View File

@@ -30,8 +30,22 @@
#include <stdio.h>
#include "gtest/gtest.h"
#ifdef ARDUINO
void setup() {
int argc = 0;
char** argv = nullptr;
testing::InitGoogleTest(&argc, argv);
}
void loop() { RUN_ALL_TESTS(); }
#else
GTEST_API_ int main(int argc, char **argv) {
printf("Running main() from %s\n", __FILE__);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
#endif