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/lane/ContactTypeValidInputRange.hpp"
20 : :
21 : 2 : TEST(ContactTypeValidInputRangeTests, testValidInputRangeValid)
22 : : {
23 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::INVALID));
- - - - -
- - - ]
24 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::UNKNOWN));
- - - - -
- - - ]
25 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::FREE));
- - - - -
- - - ]
26 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::LANE_CHANGE));
- - - - -
- - - ]
27 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::LANE_CONTINUATION));
- - - - -
- - - ]
28 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::LANE_END));
- - - - -
- - - ]
29 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::SINGLE_POINT));
- - - - -
- - - ]
30 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::STOP));
- - - - -
- - - ]
31 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::STOP_ALL));
- - - - -
- - - ]
32 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::YIELD));
- - - - -
- - - ]
33 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::GATE_BARRIER));
- - - - -
- - - ]
34 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::GATE_TOLBOOTH));
- - - - -
- - - ]
35 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::GATE_SPIKES));
- - - - -
- - - ]
36 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::GATE_SPIKES_CONTRA));
- - - - -
- - - ]
37 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::CURB_UP));
- - - - -
- - - ]
38 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::CURB_DOWN));
- - - - -
- - - ]
39 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::SPEED_BUMP));
- - - - -
- - - ]
40 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::TRAFFIC_LIGHT));
- - - - -
- - - ]
41 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::CROSSWALK));
- - - - -
- - - ]
42 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::PRIO_TO_RIGHT));
- - - - -
- - - ]
43 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::RIGHT_OF_WAY));
- - - - -
- - - ]
44 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactType::PRIO_TO_RIGHT_AND_STRAIGHT));
- - - - -
- - - ]
45 : : }
46 : :
47 : 2 : TEST(ContactTypeValidInputRangeTests, testValidInputRangeInvalid)
48 : : {
49 : 1 : int32_t minValue = std::numeric_limits<int32_t>::max();
50 : :
51 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::INVALID));
52 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::UNKNOWN));
53 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::FREE));
54 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::LANE_CHANGE));
55 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::LANE_CONTINUATION));
56 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::LANE_END));
57 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::SINGLE_POINT));
58 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::STOP));
59 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::STOP_ALL));
60 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::YIELD));
61 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::GATE_BARRIER));
62 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::GATE_TOLBOOTH));
63 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::GATE_SPIKES));
64 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::GATE_SPIKES_CONTRA));
65 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::CURB_UP));
66 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::CURB_DOWN));
67 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::SPEED_BUMP));
68 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::TRAFFIC_LIGHT));
69 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::CROSSWALK));
70 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::PRIO_TO_RIGHT));
71 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::RIGHT_OF_WAY));
72 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactType::PRIO_TO_RIGHT_AND_STRAIGHT));
73 : :
74 [ + - - + : 1 : ASSERT_FALSE(withinValidInputRange(static_cast<::ad::map::lane::ContactType>(minValue - 1)));
- - - - -
- - - ]
75 : : }
|