Apollo  6.0
Open source self driving car software
Classes | Namespaces | Macros | Functions
planning_test_base.h File Reference
#include <map>
#include <memory>
#include <string>
#include "gtest/gtest.h"
#include "modules/planning/proto/traffic_rule_config.pb.h"
#include "modules/planning/on_lane_planning.h"
#include "modules/planning/planning_base.h"
Include dependency graph for planning_test_base.h:

Go to the source code of this file.

Classes

class  apollo::planning::PlanningTestBase
 

Namespaces

 apollo
 PlanningContext is the runtime context in planning. It is persistent across multiple frames.
 
 apollo::planning
 apollo::planning
 

Macros

#define RUN_GOLDEN_TEST(sub_case_num)
 
#define RUN_GOLDEN_TEST_DECISION(sub_case_num)
 
#define TMAIN
 
#define ENABLE_RULE(RULE_ID, ENABLED)   this->rule_enabled_[RULE_ID] = ENABLED
 

Functions

 apollo::planning::DECLARE_string (test_routing_response_file)
 
 apollo::planning::DECLARE_string (test_localization_file)
 
 apollo::planning::DECLARE_string (test_chassis_file)
 
 apollo::planning::DECLARE_string (test_data_dir)
 
 apollo::planning::DECLARE_string (test_prediction_file)
 
 apollo::planning::DECLARE_string (test_traffic_light_file)
 
 apollo::planning::DECLARE_string (test_relative_map_file)
 
 apollo::planning::DECLARE_string (test_previous_planning_file)
 

Macro Definition Documentation

◆ ENABLE_RULE

#define ENABLE_RULE (   RULE_ID,
  ENABLED 
)    this->rule_enabled_[RULE_ID] = ENABLED

◆ RUN_GOLDEN_TEST

#define RUN_GOLDEN_TEST (   sub_case_num)
Value:
{ \
const ::testing::TestInfo* const test_info = \
::testing::UnitTest::GetInstance()->current_test_info(); \
bool no_trajectory_point = false; \
bool run_planning_success = \
RunPlanning(test_info->name(), sub_case_num, no_trajectory_point); \
EXPECT_TRUE(run_planning_success); \
}

◆ RUN_GOLDEN_TEST_DECISION

#define RUN_GOLDEN_TEST_DECISION (   sub_case_num)
Value:
{ \
const ::testing::TestInfo* const test_info = \
::testing::UnitTest::GetInstance()->current_test_info(); \
bool no_trajectory_point = true; \
bool run_planning_success = \
RunPlanning(test_info->name(), sub_case_num, no_trajectory_point); \
EXPECT_TRUE(run_planning_success); \
}

◆ TMAIN

#define TMAIN
Value:
int main(int argc, char** argv) { \
::apollo::cyber::Init("planning_test"); \
::testing::InitGoogleTest(&argc, argv); \
::google::ParseCommandLineFlags(&argc, &argv, true); \
return RUN_ALL_TESTS(); \
}
bool Init(const char *binary_name)