Skip to content

Commit

Permalink
Simplification of gtest-all-guard
Browse files Browse the repository at this point in the history
  • Loading branch information
codemercenary committed Aug 2, 2014
1 parent 0feec37 commit 4715a22
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions src/autotesting/gtest-all-guard.cpp
@@ -1,31 +1,14 @@
// Copyright (C) 2012-2014 Leap Motion, Inc. All rights reserved.
#include "stdafx.h"
#if __APPLE__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-private-field"
#endif
#include "EnclosedContextTestBase.hpp"
#include "AutowiringEnclosure.h"
#include <gtest/gtest-all.cc>
#include <iostream>

using namespace testing::internal;
using namespace std;

// Misc. globals:
int g_argc;
char** g_argv;

template<class T, int n>
const char(&ArraySizer(const T(&vals)[n]))[n];
#define ARYLEN(x) sizeof(ArraySizer(x))

int main(int argc, char* argv [])
int main(int argc, char* argv[])
{
g_argc = argc;
g_argv = argv;

auto& listeners = testing::UnitTest::GetInstance()->listeners();
listeners.Append(new EnclosedContextTestBase);
listeners.Append(new AutowiringEnclosure);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

0 comments on commit 4715a22

Please sign in to comment.