feat: Add initial support for PlatformIO and Arduino

This commit is contained in:
Chris Johnson
2018-12-04 21:44:39 -06:00
committed by GitHub
parent fe14e30307
commit 2c8ab3f18b
6 changed files with 77 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