summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest_main.cc
diff options
context:
space:
mode:
authorChris Johnson <chrisjohnsonmail@gmail.com>2018-12-05 03:44:39 (GMT)
committerGitHub <noreply@github.com>2018-12-05 03:44:39 (GMT)
commit2c8ab3f18b2ed9fdc1742ec60b6e34248d04efe3 (patch)
treead8950e1471e577aa76519049ca1f269a0e1f4f3 /googletest/src/gtest_main.cc
parentfe14e3030737509c2b9f9adad80ff56f80e988a2 (diff)
downloadgoogletest-2c8ab3f18b2ed9fdc1742ec60b6e34248d04efe3.zip
googletest-2c8ab3f18b2ed9fdc1742ec60b6e34248d04efe3.tar.gz
googletest-2c8ab3f18b2ed9fdc1742ec60b6e34248d04efe3.tar.bz2
feat: Add initial support for PlatformIO and Arduino
Diffstat (limited to 'googletest/src/gtest_main.cc')
-rw-r--r--googletest/src/gtest_main.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/googletest/src/gtest_main.cc b/googletest/src/gtest_main.cc
index 2113f62..0d343ba 100644
--- a/googletest/src/gtest_main.cc
+++ b/googletest/src/gtest_main.cc
@@ -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