提交 4cc6820d 编写于 作者: K kechxu 提交者: Liangliang Zhang

Prediction: unit test for cruise_scenario_features.cc

上级 58c7f77c
......@@ -13,4 +13,16 @@ cc_library(
],
)
cc_test(
name = "cruise_scenario_features_test",
size = "small",
srcs = [
"cruise_scenario_features_test.cc",
],
deps = [
":scenario_features",
"@gtest//:main",
],
)
cpplint()
/******************************************************************************
* Copyright 2018 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include "modules/prediction/scenario/scenario_features/cruise_scenario_features.h"
#include "gtest/gtest.h"
namespace apollo {
namespace prediction {
class CruiseScenarioFeaturesTest : public ::testing::Test {
public:
void SetUp() override {}
};
TEST_F(CruiseScenarioFeaturesTest, LaneId) {
CruiseScenarioFeatures cruise_scenario_features;
EXPECT_FALSE(cruise_scenario_features.IsLaneOfInterest("1-1"));
cruise_scenario_features.InsertLaneOfInterest("1-1");
EXPECT_TRUE(cruise_scenario_features.IsLaneOfInterest("1-1"));
}
} // namespace prediction
} // namespace apollo
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册