diff options
Diffstat (limited to 'googletest/src/gtest_main.cc')
-rw-r--r-- | googletest/src/gtest_main.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/googletest/src/gtest_main.cc b/googletest/src/gtest_main.cc index 2113f621e654..f6e1dd96fb3b 100644 --- a/googletest/src/gtest_main.cc +++ b/googletest/src/gtest_main.cc @@ -27,11 +27,21 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <stdio.h> +#include <cstdio> #include "gtest/gtest.h" +#ifdef ARDUINO +void setup() { + testing::InitGoogleTest(); +} + +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 |