RTXI  2.4
The Real-Time eXperiment Interface Documentation
rtxiTests.cpp
Go to the documentation of this file.
1 /*
2  The Real-Time eXperiment Interface (RTXI)
3  Copyright (C) 2011 Georgia Institute of Technology, University of Utah, Weill Cornell Medical College
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  */
19 
20 #include <rtxiTests.h>
21 #include <iostream>
22 
23 void TestEnvironment::SetUp()
24 {
25  argc = 3;
26  char *argv[3];
27  argv[0] = const_cast<char *>("TestQApp");
28  argv[1] = const_cast<char *>("-platform");
29  argv[2] = const_cast<char *>("offscreen");
30  app = new QApplication(argc, argv);
31  if (app){
32  std::cout << "QT Application object initialized." << std::endl;
33  }else{
34  std::cout << "Unable to initialized QT application." << std::endl;
35  }
36 }
37 
38 void TestEnvironment::TearDown()
39 {
40  delete app;
41 }
42 
43 int main(int argc, char *argv[])
44 {
45  ::testing::InitGoogleTest(&argc, argv);
46  ::testing::AddGlobalTestEnvironment(new TestEnvironment());
47  return RUN_ALL_TESTS();
48 }
rtxiTests.h
main
int main(int argc, char *argv[])
Definition: rtxiTests.cpp:43
TestEnvironment
Definition: rtxiTests.h:26