Branch data Line data Source code
1 : : /*
2 : : * ----------------- BEGIN LICENSE BLOCK ---------------------------------
3 : : *
4 : : * Copyright (C) 2018-2021 Intel Corporation
5 : : *
6 : : * SPDX-License-Identifier: MIT
7 : : *
8 : : * ----------------- END LICENSE BLOCK -----------------------------------
9 : : */
10 : :
11 : : /*
12 : : * Generated file
13 : : */
14 : :
15 : : #include <gtest/gtest.h>
16 : :
17 : : #include <limits>
18 : :
19 : : #include "ad/map/landmark/TrafficLightTypeValidInputRange.hpp"
20 : :
21 : 2 : TEST(TrafficLightTypeValidInputRangeTests, testValidInputRangeValid)
22 : : {
23 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::INVALID));
- - - - -
- - - ]
24 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::UNKNOWN));
- - - - -
- - - ]
25 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::SOLID_RED_YELLOW));
- - - - -
- - - ]
26 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::SOLID_RED_YELLOW_GREEN));
- - - - -
- - - ]
27 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::LEFT_RED_YELLOW_GREEN));
- - - - -
- - - ]
28 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::RIGHT_RED_YELLOW_GREEN));
- - - - -
- - - ]
29 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::STRAIGHT_RED_YELLOW_GREEN));
- - - - -
- - - ]
30 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::LEFT_STRAIGHT_RED_YELLOW_GREEN));
- - - - -
- - - ]
31 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::RIGHT_STRAIGHT_RED_YELLOW_GREEN));
- - - - -
- - - ]
32 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::PEDESTRIAN_RED_GREEN));
- - - - -
- - - ]
33 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::BIKE_RED_GREEN));
- - - - -
- - - ]
34 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::BIKE_PEDESTRIAN_RED_GREEN));
- - - - -
- - - ]
35 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::PEDESTRIAN_RED_YELLOW_GREEN));
- - - - -
- - - ]
36 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::BIKE_RED_YELLOW_GREEN));
- - - - -
- - - ]
37 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::landmark::TrafficLightType::BIKE_PEDESTRIAN_RED_YELLOW_GREEN));
- - - - -
- - - ]
38 : : }
39 : :
40 : 2 : TEST(TrafficLightTypeValidInputRangeTests, testValidInputRangeInvalid)
41 : : {
42 : 1 : int32_t minValue = std::numeric_limits<int32_t>::max();
43 : :
44 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::INVALID));
45 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::UNKNOWN));
46 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::SOLID_RED_YELLOW));
47 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::SOLID_RED_YELLOW_GREEN));
48 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::LEFT_RED_YELLOW_GREEN));
49 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::RIGHT_RED_YELLOW_GREEN));
50 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::STRAIGHT_RED_YELLOW_GREEN));
51 : : minValue
52 : 1 : = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::LEFT_STRAIGHT_RED_YELLOW_GREEN));
53 : : minValue
54 : 1 : = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::RIGHT_STRAIGHT_RED_YELLOW_GREEN));
55 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::PEDESTRIAN_RED_GREEN));
56 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::BIKE_RED_GREEN));
57 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::BIKE_PEDESTRIAN_RED_GREEN));
58 : : minValue
59 : 1 : = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::PEDESTRIAN_RED_YELLOW_GREEN));
60 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::BIKE_RED_YELLOW_GREEN));
61 : : minValue
62 : 1 : = std::min(minValue, static_cast<int32_t>(::ad::map::landmark::TrafficLightType::BIKE_PEDESTRIAN_RED_YELLOW_GREEN));
63 : :
64 [ + - - + : 1 : ASSERT_FALSE(withinValidInputRange(static_cast<::ad::map::landmark::TrafficLightType>(minValue - 1)));
- - - - -
- - - ]
65 : : }
|