提交 8a25f01d 编写于 作者: S siyangy 提交者: Jiangtao Hu

get rid of #define private public

上级 671c71b3
......@@ -22,6 +22,7 @@ cc_library(
deps = [
"//modules/common",
"//modules/common:log",
"@gtest//:gtest",
],
)
......
......@@ -57,6 +57,8 @@
#include <string>
#include <vector>
#include "gtest/gtest_prod.h"
#include "modules/common/log.h"
#include "modules/common/macro.h"
......@@ -105,6 +107,8 @@ class Any {
};
PlaceHolder *content_;
FRIEND_TEST(ObjectFactoryTest, test_ObjectFactory);
};
class ObjectFactory {
......
......@@ -16,7 +16,6 @@
#include "gtest/gtest.h"
#define private public
#include "modules/perception/lib/base/registerer.h"
namespace apollo {
......
......@@ -15,6 +15,7 @@ cc_library(
"//modules/perception/lib/pcl_util",
"//modules/perception/obstacle/base:perception_obstacle_base",
"@eigen//:eigen",
"@gtest//:gtest",
],
)
......@@ -38,6 +39,7 @@ cc_library(
"//modules/perception/obstacle/lidar/segmentation/cnnseg:perception_obstacle_lidar_segmention_cnnseg",
"//modules/perception/obstacle/lidar/tracker/hm_tracker:perception_obstacle_lidar_tracker_hm_tracker",
"@eigen//:eigen",
"@gtest//:gtest",
"@ros//:ros_common",
],
)
......
......@@ -18,6 +18,9 @@
#define MODULES_PERCEPTION_ONBOARD_HDMAP_INPUT_H_
#include <mutex>
#include "gtest/gtest_prod.h"
#include "modules/common/macro.h"
#include "modules/map/hdmap/hdmap.h"
#include "modules/perception/lib/base/singleton.h"
......@@ -56,6 +59,9 @@ class HDMapInput {
std::unique_ptr<apollo::hdmap::HDMap> hdmap_;
DISALLOW_COPY_AND_ASSIGN(HDMapInput);
FRIEND_TEST(HDMapInputTest, test_Init);
FRIEND_TEST(HDMapInputTest, test_GetROI);
};
typedef typename std::shared_ptr<HDMapInput> HDMapInputPtr;
......
......@@ -19,7 +19,6 @@
#include "modules/common/log.h"
#include "modules/perception/common/perception_gflags.h"
#define private public
#include "modules/perception/obstacle/onboard/hdmap_input.h"
namespace apollo {
......@@ -36,7 +35,6 @@ class HDMapInputTest : public testing::Test {
ASSERT_TRUE(hdmap_input_ != NULL);
}
private:
HDMapInput* hdmap_input_;
};
......
......@@ -18,6 +18,8 @@
#define MODEULES_PERCEPTION_OBSTACLE_ONBOARD_LIDAR_PROCESS_H_
#include "Eigen/Core"
#include "gtest/gtest_prod.h"
#include "modules/perception/lib/pcl_util/pcl_types.h"
#include "modules/perception/obstacle/base/object.h"
#include "modules/perception/obstacle/lidar/interface/base_object_builder.h"
......@@ -75,6 +77,10 @@ class LidarProcess {
std::unique_ptr<BaseObjectBuilder> object_builder_;
std::unique_ptr<BaseTracker> tracker_;
pcl_util::PointIndicesPtr roi_indices_;
FRIEND_TEST(LidarProcessTest, test_Init);
FRIEND_TEST(LidarProcessTest, test_Process);
FRIEND_TEST(LidarProcessTest, test_GeneratePbMsg);
};
} // namespace perception
......
......@@ -21,8 +21,6 @@
#include "modules/perception/common/perception_gflags.h"
#include "modules/perception/lib/pcl_util/pcl_types.h"
#include "modules/perception/obstacle/lidar/dummy/dummy_algorithms.h"
#define private public
#include "modules/perception/obstacle/onboard/lidar_process.h"
namespace apollo {
......@@ -38,11 +36,7 @@ class LidarProcessTest : public testing::Test {
protected:
LidarProcessTest() {}
virtual ~LidarProcessTest() {}
virtual void SetUp() {
lidar_process_.RegistAllAlgorithm();
}
private:
LidarProcess lidar_process_;
};
......
......@@ -19,7 +19,6 @@
#include <fstream>
#include "gflags/gflags.h"
#define private public
#include "modules/map/proto/map_geometry.pb.h"
#include "modules/common/log.h"
#include "modules/map/hdmap/hdmap_common.h"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册