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/ContactLaneListValidInputRange.hpp" 20 : : 21 : 2 : TEST(ContactLaneListValidInputRangeTests, testValidInputRangeValidInputRangeMin) 22 : : { 23 : 1 : ::ad::map::lane::ContactLaneList value; 24 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(value)); - - - - - - - - ] 25 : : } 26 : : 27 : 2 : TEST(ContactLaneListValidInputRangeTests, testValidInputRangeElementValid) 28 : : { 29 : 1 : ::ad::map::lane::ContactLaneList value; 30 : 1 : ::ad::map::lane::ContactLane element; 31 : 1 : ::ad::map::lane::LaneId elementToLane(1); 32 : 1 : element.toLane = elementToLane; 33 : 1 : ::ad::map::lane::ContactLocation elementLocation(::ad::map::lane::ContactLocation::INVALID); 34 : 1 : element.location = elementLocation; 35 : 1 : ::ad::map::lane::ContactTypeList elementTypes; 36 : 1 : ::ad::map::lane::ContactType elementTypesElement(::ad::map::lane::ContactType::INVALID); 37 [ + - ]: 1 : elementTypes.resize(1, elementTypesElement); 38 [ + - ]: 1 : element.types = elementTypes; 39 : 1 : ::ad::map::restriction::Restrictions elementRestrictions; 40 : 1 : ::ad::map::restriction::RestrictionList elementRestrictionsConjunctions; 41 : 1 : ::ad::map::restriction::Restriction elementRestrictionsConjunctionsElement; 42 : 1 : bool elementRestrictionsConjunctionsElementNegated{true}; 43 : 1 : elementRestrictionsConjunctionsElement.negated = elementRestrictionsConjunctionsElementNegated; 44 : 1 : ::ad::map::restriction::RoadUserTypeList elementRestrictionsConjunctionsElementRoadUserTypes; 45 : 1 : ::ad::map::restriction::RoadUserType elementRestrictionsConjunctionsElementRoadUserTypesElement( 46 : : ::ad::map::restriction::RoadUserType::INVALID); 47 [ + - ]: 1 : elementRestrictionsConjunctionsElementRoadUserTypes.resize( 48 : : 1, elementRestrictionsConjunctionsElementRoadUserTypesElement); 49 [ + - ]: 1 : elementRestrictionsConjunctionsElement.roadUserTypes = elementRestrictionsConjunctionsElementRoadUserTypes; 50 : 1 : ::ad::map::restriction::PassengerCount elementRestrictionsConjunctionsElementPassengersMin( 51 : : std::numeric_limits<::ad::map::restriction::PassengerCount>::lowest()); 52 : 1 : elementRestrictionsConjunctionsElement.passengersMin = elementRestrictionsConjunctionsElementPassengersMin; 53 [ + - ]: 1 : elementRestrictionsConjunctions.resize(1, elementRestrictionsConjunctionsElement); 54 [ + - ]: 1 : elementRestrictions.conjunctions = elementRestrictionsConjunctions; 55 : 1 : ::ad::map::restriction::RestrictionList elementRestrictionsDisjunctions; 56 : 1 : ::ad::map::restriction::Restriction elementRestrictionsDisjunctionsElement; 57 : 1 : bool elementRestrictionsDisjunctionsElementNegated{true}; 58 : 1 : elementRestrictionsDisjunctionsElement.negated = elementRestrictionsDisjunctionsElementNegated; 59 : 1 : ::ad::map::restriction::RoadUserTypeList elementRestrictionsDisjunctionsElementRoadUserTypes; 60 : 1 : ::ad::map::restriction::RoadUserType elementRestrictionsDisjunctionsElementRoadUserTypesElement( 61 : : ::ad::map::restriction::RoadUserType::INVALID); 62 [ + - ]: 1 : elementRestrictionsDisjunctionsElementRoadUserTypes.resize( 63 : : 1, elementRestrictionsDisjunctionsElementRoadUserTypesElement); 64 [ + - ]: 1 : elementRestrictionsDisjunctionsElement.roadUserTypes = elementRestrictionsDisjunctionsElementRoadUserTypes; 65 : 1 : ::ad::map::restriction::PassengerCount elementRestrictionsDisjunctionsElementPassengersMin( 66 : : std::numeric_limits<::ad::map::restriction::PassengerCount>::lowest()); 67 : 1 : elementRestrictionsDisjunctionsElement.passengersMin = elementRestrictionsDisjunctionsElementPassengersMin; 68 [ + - ]: 1 : elementRestrictionsDisjunctions.resize(1, elementRestrictionsDisjunctionsElement); 69 [ + - ]: 1 : elementRestrictions.disjunctions = elementRestrictionsDisjunctions; 70 [ + - ]: 1 : element.restrictions = elementRestrictions; 71 : 1 : ::ad::map::landmark::LandmarkId elementTrafficLightId(std::numeric_limits<::ad::map::landmark::LandmarkId>::lowest()); 72 : 1 : element.trafficLightId = elementTrafficLightId; 73 [ + - ]: 1 : value.push_back(element); 74 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(value)); - - - - - - - - ] 75 : : } 76 : : 77 : 2 : TEST(ContactLaneListValidInputRangeTests, testValidInputRangeElementInvalid) 78 : : { 79 : 1 : ::ad::map::lane::ContactLaneList value; 80 : 1 : ::ad::map::lane::ContactLane element; 81 : 1 : ::ad::map::lane::ContactLocation elementLocation(static_cast<::ad::map::lane::ContactLocation>(-1)); 82 : 1 : element.location = elementLocation; 83 [ + - ]: 1 : value.push_back(element); 84 [ + - - + : 1 : ASSERT_FALSE(withinValidInputRange(value)); - - - - - - - - ] 85 : : }