utest.cpp
Go to the documentation of this file.
00001 /*
00002  * Software License Agreement (Apache License)
00003  *
00004  * Copyright (c) 2016 Shaun Edwards
00005  *
00006  * Licensed under the Apache License, Version 2.0 (the "License");
00007  * you may not use this file except in compliance with the License.
00008  * You may obtain a copy of the License at
00009  *
00010  * http://www.apache.org/licenses/LICENSE-2.0
00011  *
00012  * Unless required by applicable law or agreed to in writing, software
00013  * distributed under the License is distributed on an "AS IS" BASIS,
00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  * See the License for the specific language governing permissions and
00016  * limitations under the License.
00017  */
00018 
00019 #include <gtest/gtest.h>
00020 #include <ros/time.h>
00021 #include <QCoreApplication>
00022 #include <QTimer>
00023 #include <boost/thread/thread.hpp>
00024 #include <ros/console.h>
00025 
00026 void qtWorker(int argc, char *argv[])
00027 {
00028     QCoreApplication a(argc, argv);
00029     a.exec();
00030 }
00031 
00032 int main(int argc, char **argv)
00033 {
00034   boost::thread* thr = new boost::thread(&qtWorker, argc, argv);
00035   ros::Time::init();
00036   while(NULL == QCoreApplication::instance())
00037   {
00038     ROS_INFO_STREAM_THROTTLE(0.1, "Waiting for QCore application to start");
00039   }
00040   testing::InitGoogleTest(&argc, argv);
00041   return RUN_ALL_TESTS();
00042 }


packml_sm
Author(s): Shaun Edwards
autogenerated on Sat Jun 8 2019 20:13:34