Branch data Line data Source code
1 : : /* 2 : : * ----------------- BEGIN LICENSE BLOCK --------------------------------- 3 : : * 4 : : * Copyright (C) 2018-2021 Intel Corporation 5 : : * 6 : : * SPDX-License-Identifier: LGPL-2.1-only 7 : : * 8 : : * ----------------- END LICENSE BLOCK ----------------------------------- 9 : : */ 10 : : 11 : : /* 12 : : * Generated file 13 : : */ 14 : : 15 : : #if defined(__clang__) && (__clang_major__ >= 7) 16 : : #pragma GCC diagnostic push 17 : : #pragma GCC diagnostic ignored "-Wself-assign-overloaded" 18 : : #endif 19 : : 20 : : #include <gtest/gtest.h> 21 : : #include <limits> 22 : : #include "ad/rss/situation/Situation.hpp" 23 : : 24 : : class SituationTests : public testing::Test 25 : : { 26 : : protected: 27 : 12 : virtual void SetUp() override 28 : : { 29 : : // valid initialization 30 : 12 : ::ad::rss::situation::Situation value; 31 : 12 : ::ad::rss::situation::SituationId valueSituationId( 32 : : std::numeric_limits<::ad::rss::situation::SituationId>::lowest()); 33 : 12 : value.situationId = valueSituationId; 34 : 12 : ::ad::rss::world::ObjectId valueObjectId(std::numeric_limits<::ad::rss::world::ObjectId>::lowest()); 35 : 12 : value.objectId = valueObjectId; 36 : 12 : ::ad::rss::situation::SituationType valueSituationType(::ad::rss::situation::SituationType::NotRelevant); 37 : 12 : value.situationType = valueSituationType; 38 : 12 : ::ad::rss::situation::VehicleState valueEgoVehicleState; 39 : 12 : ::ad::rss::situation::VelocityRange valueEgoVehicleStateVelocity; 40 : 12 : ::ad::physics::SpeedRange valueEgoVehicleStateVelocitySpeedLon; 41 : 12 : ::ad::physics::Speed valueEgoVehicleStateVelocitySpeedLonMinimum(-100.); 42 : 12 : valueEgoVehicleStateVelocitySpeedLon.minimum = valueEgoVehicleStateVelocitySpeedLonMinimum; 43 : 12 : ::ad::physics::Speed valueEgoVehicleStateVelocitySpeedLonMaximum(-100.); 44 : 12 : valueEgoVehicleStateVelocitySpeedLon.maximum = valueEgoVehicleStateVelocitySpeedLonMaximum; 45 : 12 : valueEgoVehicleStateVelocitySpeedLon.maximum = valueEgoVehicleStateVelocitySpeedLon.minimum; 46 : 12 : valueEgoVehicleStateVelocitySpeedLon.minimum = valueEgoVehicleStateVelocitySpeedLon.maximum; 47 : 12 : valueEgoVehicleStateVelocity.speedLon = valueEgoVehicleStateVelocitySpeedLon; 48 : 12 : ::ad::physics::SpeedRange valueEgoVehicleStateVelocitySpeedLat; 49 : 12 : ::ad::physics::Speed valueEgoVehicleStateVelocitySpeedLatMinimum(-100.); 50 : 12 : valueEgoVehicleStateVelocitySpeedLat.minimum = valueEgoVehicleStateVelocitySpeedLatMinimum; 51 : 12 : ::ad::physics::Speed valueEgoVehicleStateVelocitySpeedLatMaximum(-100.); 52 : 12 : valueEgoVehicleStateVelocitySpeedLat.maximum = valueEgoVehicleStateVelocitySpeedLatMaximum; 53 : 12 : valueEgoVehicleStateVelocitySpeedLat.maximum = valueEgoVehicleStateVelocitySpeedLat.minimum; 54 : 12 : valueEgoVehicleStateVelocitySpeedLat.minimum = valueEgoVehicleStateVelocitySpeedLat.maximum; 55 : 12 : valueEgoVehicleStateVelocity.speedLat = valueEgoVehicleStateVelocitySpeedLat; 56 : 12 : valueEgoVehicleState.velocity = valueEgoVehicleStateVelocity; 57 : 12 : ::ad::rss::world::RssDynamics valueEgoVehicleStateDynamics; 58 : 12 : ::ad::rss::world::LongitudinalRssAccelerationValues valueEgoVehicleStateDynamicsAlphaLon; 59 : 12 : ::ad::physics::Acceleration valueEgoVehicleStateDynamicsAlphaLonAccelMax(-1e2); 60 : 12 : valueEgoVehicleStateDynamicsAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct 61 : 12 : valueEgoVehicleStateDynamicsAlphaLon.accelMax = valueEgoVehicleStateDynamicsAlphaLonAccelMax; 62 : 12 : ::ad::physics::Acceleration valueEgoVehicleStateDynamicsAlphaLonBrakeMax(-1e2); 63 : 12 : valueEgoVehicleStateDynamicsAlphaLon.brakeMax = valueEgoVehicleStateDynamicsAlphaLonBrakeMax; 64 : 12 : ::ad::physics::Acceleration valueEgoVehicleStateDynamicsAlphaLonBrakeMin(-1e2); 65 : 12 : valueEgoVehicleStateDynamicsAlphaLon.brakeMin = valueEgoVehicleStateDynamicsAlphaLonBrakeMin; 66 : 12 : ::ad::physics::Acceleration valueEgoVehicleStateDynamicsAlphaLonBrakeMinCorrect(-1e2); 67 : 12 : valueEgoVehicleStateDynamicsAlphaLon.brakeMinCorrect = valueEgoVehicleStateDynamicsAlphaLonBrakeMinCorrect; 68 : 12 : valueEgoVehicleStateDynamicsAlphaLon.brakeMin = valueEgoVehicleStateDynamicsAlphaLon.brakeMax; 69 : 12 : valueEgoVehicleStateDynamicsAlphaLon.brakeMinCorrect = valueEgoVehicleStateDynamicsAlphaLon.brakeMin; 70 : 12 : valueEgoVehicleStateDynamicsAlphaLon.brakeMin = valueEgoVehicleStateDynamicsAlphaLon.brakeMinCorrect; 71 : 12 : valueEgoVehicleStateDynamicsAlphaLon.brakeMax = valueEgoVehicleStateDynamicsAlphaLon.brakeMin; 72 : 12 : valueEgoVehicleStateDynamics.alphaLon = valueEgoVehicleStateDynamicsAlphaLon; 73 : 12 : ::ad::rss::world::LateralRssAccelerationValues valueEgoVehicleStateDynamicsAlphaLat; 74 : 12 : ::ad::physics::Acceleration valueEgoVehicleStateDynamicsAlphaLatAccelMax(-1e2); 75 : 12 : valueEgoVehicleStateDynamicsAlphaLatAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct 76 : 12 : valueEgoVehicleStateDynamicsAlphaLat.accelMax = valueEgoVehicleStateDynamicsAlphaLatAccelMax; 77 : 12 : ::ad::physics::Acceleration valueEgoVehicleStateDynamicsAlphaLatBrakeMin(-1e2); 78 : 12 : valueEgoVehicleStateDynamicsAlphaLat.brakeMin = valueEgoVehicleStateDynamicsAlphaLatBrakeMin; 79 : 12 : valueEgoVehicleStateDynamics.alphaLat = valueEgoVehicleStateDynamicsAlphaLat; 80 : 12 : ::ad::physics::Distance valueEgoVehicleStateDynamicsLateralFluctuationMargin(-1e9); 81 : : valueEgoVehicleStateDynamicsLateralFluctuationMargin 82 : 12 : = ::ad::physics::Distance(0.); // set to valid value within struct 83 : 12 : valueEgoVehicleStateDynamics.lateralFluctuationMargin = valueEgoVehicleStateDynamicsLateralFluctuationMargin; 84 : 12 : ::ad::physics::Duration valueEgoVehicleStateDynamicsResponseTime(0.); 85 : : valueEgoVehicleStateDynamicsResponseTime 86 : 12 : = ::ad::physics::Duration(0. + ::ad::physics::Duration::cPrecisionValue); // set to valid value within struct 87 : 12 : valueEgoVehicleStateDynamics.responseTime = valueEgoVehicleStateDynamicsResponseTime; 88 : 12 : ::ad::physics::Speed valueEgoVehicleStateDynamicsMaxSpeedOnAcceleration(-100.); 89 : 12 : valueEgoVehicleStateDynamics.maxSpeedOnAcceleration = valueEgoVehicleStateDynamicsMaxSpeedOnAcceleration; 90 : 12 : ::ad::rss::world::UnstructuredSettings valueEgoVehicleStateDynamicsUnstructuredSettings; 91 : 12 : ::ad::physics::Distance valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius(-1e9); 92 : : valueEgoVehicleStateDynamicsUnstructuredSettings.pedestrianTurningRadius 93 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius; 94 : 12 : ::ad::physics::Angle valueEgoVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle(-6.283185308); 95 : : valueEgoVehicleStateDynamicsUnstructuredSettings.driveAwayMaxAngle 96 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle; 97 : 12 : ::ad::physics::AngularAcceleration valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange(-1e2); 98 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleYawRateChange 99 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange; 100 : 12 : ::ad::physics::Distance valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius(-1e9); 101 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleMinRadius 102 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius; 103 : 12 : ::ad::physics::Duration valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(0.); 104 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 105 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 106 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 107 : : std::numeric_limits<uint32_t>::min()}; 108 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 109 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 110 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 111 : : std::numeric_limits<uint32_t>::min()}; 112 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 113 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 114 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 115 : : std::numeric_limits<uint32_t>::min()}; 116 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 117 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 118 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 119 : : std::numeric_limits<uint32_t>::min()}; 120 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 121 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 122 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps{ 123 : : std::numeric_limits<uint32_t>::min()}; 124 : : valueEgoVehicleStateDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateYawRateChangeRatioSteps 125 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps; 126 : : uint32_t 127 : 12 : valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 128 : : std::numeric_limits<uint32_t>::min()}; 129 : : valueEgoVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 130 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 131 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 132 : : std::numeric_limits<uint32_t>::min()}; 133 : : valueEgoVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 134 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 135 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 136 : : std::numeric_limits<uint32_t>::min()}; 137 : : valueEgoVehicleStateDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 138 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 139 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 140 : : std::numeric_limits<uint32_t>::min()}; 141 : : valueEgoVehicleStateDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 142 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 143 : 12 : uint32_t valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 144 : : std::numeric_limits<uint32_t>::min()}; 145 : : valueEgoVehicleStateDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 146 : 12 : = valueEgoVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 147 : 12 : valueEgoVehicleStateDynamics.unstructuredSettings = valueEgoVehicleStateDynamicsUnstructuredSettings; 148 : 12 : valueEgoVehicleState.dynamics = valueEgoVehicleStateDynamics; 149 : 12 : bool valueEgoVehicleStateHasPriority{true}; 150 : 12 : valueEgoVehicleState.hasPriority = valueEgoVehicleStateHasPriority; 151 : 12 : bool valueEgoVehicleStateIsInCorrectLane{true}; 152 : 12 : valueEgoVehicleState.isInCorrectLane = valueEgoVehicleStateIsInCorrectLane; 153 : 12 : ::ad::physics::Distance valueEgoVehicleStateDistanceToEnterIntersection(-1e9); 154 : 12 : valueEgoVehicleStateDistanceToEnterIntersection = ::ad::physics::Distance(0.); // set to valid value within struct 155 : 12 : valueEgoVehicleState.distanceToEnterIntersection = valueEgoVehicleStateDistanceToEnterIntersection; 156 : 12 : ::ad::physics::Distance valueEgoVehicleStateDistanceToLeaveIntersection(-1e9); 157 : 12 : valueEgoVehicleState.distanceToLeaveIntersection = valueEgoVehicleStateDistanceToLeaveIntersection; 158 : 12 : ::ad::rss::world::ObjectType valueEgoVehicleStateObjectType(::ad::rss::world::ObjectType::Invalid); 159 : 12 : valueEgoVehicleState.objectType = valueEgoVehicleStateObjectType; 160 : 12 : ::ad::rss::world::ObjectState valueEgoVehicleStateObjectState; 161 : 12 : ::ad::physics::Angle valueEgoVehicleStateObjectStateYaw(-6.283185308); 162 : 12 : valueEgoVehicleStateObjectState.yaw = valueEgoVehicleStateObjectStateYaw; 163 : 12 : ::ad::physics::Dimension2D valueEgoVehicleStateObjectStateDimension; 164 : 12 : ::ad::physics::Distance valueEgoVehicleStateObjectStateDimensionLength(-1e9); 165 : 12 : valueEgoVehicleStateObjectStateDimension.length = valueEgoVehicleStateObjectStateDimensionLength; 166 : 12 : ::ad::physics::Distance valueEgoVehicleStateObjectStateDimensionWidth(-1e9); 167 : 12 : valueEgoVehicleStateObjectStateDimension.width = valueEgoVehicleStateObjectStateDimensionWidth; 168 : 12 : valueEgoVehicleStateObjectState.dimension = valueEgoVehicleStateObjectStateDimension; 169 : 12 : ::ad::physics::AngularVelocity valueEgoVehicleStateObjectStateYawRate(-100.); 170 : 12 : valueEgoVehicleStateObjectState.yawRate = valueEgoVehicleStateObjectStateYawRate; 171 : 12 : ::ad::physics::Distance2D valueEgoVehicleStateObjectStateCenterPoint; 172 : 12 : ::ad::physics::Distance valueEgoVehicleStateObjectStateCenterPointX(-1e9); 173 : 12 : valueEgoVehicleStateObjectStateCenterPoint.x = valueEgoVehicleStateObjectStateCenterPointX; 174 : 12 : ::ad::physics::Distance valueEgoVehicleStateObjectStateCenterPointY(-1e9); 175 : 12 : valueEgoVehicleStateObjectStateCenterPoint.y = valueEgoVehicleStateObjectStateCenterPointY; 176 : 12 : valueEgoVehicleStateObjectState.centerPoint = valueEgoVehicleStateObjectStateCenterPoint; 177 : 12 : ::ad::physics::Speed valueEgoVehicleStateObjectStateSpeed(-100.); 178 : 12 : valueEgoVehicleStateObjectState.speed = valueEgoVehicleStateObjectStateSpeed; 179 : 12 : ::ad::physics::Angle valueEgoVehicleStateObjectStateSteeringAngle(-6.283185308); 180 : 12 : valueEgoVehicleStateObjectState.steeringAngle = valueEgoVehicleStateObjectStateSteeringAngle; 181 : 12 : valueEgoVehicleState.objectState = valueEgoVehicleStateObjectState; 182 : 12 : valueEgoVehicleState.distanceToLeaveIntersection = valueEgoVehicleState.distanceToEnterIntersection; 183 : 12 : valueEgoVehicleState.distanceToEnterIntersection = valueEgoVehicleState.distanceToLeaveIntersection; 184 : 12 : value.egoVehicleState = valueEgoVehicleState; 185 : 12 : ::ad::rss::situation::VehicleState valueOtherVehicleState; 186 : 12 : ::ad::rss::situation::VelocityRange valueOtherVehicleStateVelocity; 187 : 12 : ::ad::physics::SpeedRange valueOtherVehicleStateVelocitySpeedLon; 188 : 12 : ::ad::physics::Speed valueOtherVehicleStateVelocitySpeedLonMinimum(-100.); 189 : 12 : valueOtherVehicleStateVelocitySpeedLon.minimum = valueOtherVehicleStateVelocitySpeedLonMinimum; 190 : 12 : ::ad::physics::Speed valueOtherVehicleStateVelocitySpeedLonMaximum(-100.); 191 : 12 : valueOtherVehicleStateVelocitySpeedLon.maximum = valueOtherVehicleStateVelocitySpeedLonMaximum; 192 : 12 : valueOtherVehicleStateVelocitySpeedLon.maximum = valueOtherVehicleStateVelocitySpeedLon.minimum; 193 : 12 : valueOtherVehicleStateVelocitySpeedLon.minimum = valueOtherVehicleStateVelocitySpeedLon.maximum; 194 : 12 : valueOtherVehicleStateVelocity.speedLon = valueOtherVehicleStateVelocitySpeedLon; 195 : 12 : ::ad::physics::SpeedRange valueOtherVehicleStateVelocitySpeedLat; 196 : 12 : ::ad::physics::Speed valueOtherVehicleStateVelocitySpeedLatMinimum(-100.); 197 : 12 : valueOtherVehicleStateVelocitySpeedLat.minimum = valueOtherVehicleStateVelocitySpeedLatMinimum; 198 : 12 : ::ad::physics::Speed valueOtherVehicleStateVelocitySpeedLatMaximum(-100.); 199 : 12 : valueOtherVehicleStateVelocitySpeedLat.maximum = valueOtherVehicleStateVelocitySpeedLatMaximum; 200 : 12 : valueOtherVehicleStateVelocitySpeedLat.maximum = valueOtherVehicleStateVelocitySpeedLat.minimum; 201 : 12 : valueOtherVehicleStateVelocitySpeedLat.minimum = valueOtherVehicleStateVelocitySpeedLat.maximum; 202 : 12 : valueOtherVehicleStateVelocity.speedLat = valueOtherVehicleStateVelocitySpeedLat; 203 : 12 : valueOtherVehicleState.velocity = valueOtherVehicleStateVelocity; 204 : 12 : ::ad::rss::world::RssDynamics valueOtherVehicleStateDynamics; 205 : 12 : ::ad::rss::world::LongitudinalRssAccelerationValues valueOtherVehicleStateDynamicsAlphaLon; 206 : 12 : ::ad::physics::Acceleration valueOtherVehicleStateDynamicsAlphaLonAccelMax(-1e2); 207 : 12 : valueOtherVehicleStateDynamicsAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within 208 : : // struct 209 : 12 : valueOtherVehicleStateDynamicsAlphaLon.accelMax = valueOtherVehicleStateDynamicsAlphaLonAccelMax; 210 : 12 : ::ad::physics::Acceleration valueOtherVehicleStateDynamicsAlphaLonBrakeMax(-1e2); 211 : 12 : valueOtherVehicleStateDynamicsAlphaLon.brakeMax = valueOtherVehicleStateDynamicsAlphaLonBrakeMax; 212 : 12 : ::ad::physics::Acceleration valueOtherVehicleStateDynamicsAlphaLonBrakeMin(-1e2); 213 : 12 : valueOtherVehicleStateDynamicsAlphaLon.brakeMin = valueOtherVehicleStateDynamicsAlphaLonBrakeMin; 214 : 12 : ::ad::physics::Acceleration valueOtherVehicleStateDynamicsAlphaLonBrakeMinCorrect(-1e2); 215 : 12 : valueOtherVehicleStateDynamicsAlphaLon.brakeMinCorrect = valueOtherVehicleStateDynamicsAlphaLonBrakeMinCorrect; 216 : 12 : valueOtherVehicleStateDynamicsAlphaLon.brakeMin = valueOtherVehicleStateDynamicsAlphaLon.brakeMax; 217 : 12 : valueOtherVehicleStateDynamicsAlphaLon.brakeMinCorrect = valueOtherVehicleStateDynamicsAlphaLon.brakeMin; 218 : 12 : valueOtherVehicleStateDynamicsAlphaLon.brakeMin = valueOtherVehicleStateDynamicsAlphaLon.brakeMinCorrect; 219 : 12 : valueOtherVehicleStateDynamicsAlphaLon.brakeMax = valueOtherVehicleStateDynamicsAlphaLon.brakeMin; 220 : 12 : valueOtherVehicleStateDynamics.alphaLon = valueOtherVehicleStateDynamicsAlphaLon; 221 : 12 : ::ad::rss::world::LateralRssAccelerationValues valueOtherVehicleStateDynamicsAlphaLat; 222 : 12 : ::ad::physics::Acceleration valueOtherVehicleStateDynamicsAlphaLatAccelMax(-1e2); 223 : 12 : valueOtherVehicleStateDynamicsAlphaLatAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within 224 : : // struct 225 : 12 : valueOtherVehicleStateDynamicsAlphaLat.accelMax = valueOtherVehicleStateDynamicsAlphaLatAccelMax; 226 : 12 : ::ad::physics::Acceleration valueOtherVehicleStateDynamicsAlphaLatBrakeMin(-1e2); 227 : 12 : valueOtherVehicleStateDynamicsAlphaLat.brakeMin = valueOtherVehicleStateDynamicsAlphaLatBrakeMin; 228 : 12 : valueOtherVehicleStateDynamics.alphaLat = valueOtherVehicleStateDynamicsAlphaLat; 229 : 12 : ::ad::physics::Distance valueOtherVehicleStateDynamicsLateralFluctuationMargin(-1e9); 230 : : valueOtherVehicleStateDynamicsLateralFluctuationMargin 231 : 12 : = ::ad::physics::Distance(0.); // set to valid value within struct 232 : 12 : valueOtherVehicleStateDynamics.lateralFluctuationMargin = valueOtherVehicleStateDynamicsLateralFluctuationMargin; 233 : 12 : ::ad::physics::Duration valueOtherVehicleStateDynamicsResponseTime(0.); 234 : : valueOtherVehicleStateDynamicsResponseTime 235 : 12 : = ::ad::physics::Duration(0. + ::ad::physics::Duration::cPrecisionValue); // set to valid value within struct 236 : 12 : valueOtherVehicleStateDynamics.responseTime = valueOtherVehicleStateDynamicsResponseTime; 237 : 12 : ::ad::physics::Speed valueOtherVehicleStateDynamicsMaxSpeedOnAcceleration(-100.); 238 : 12 : valueOtherVehicleStateDynamics.maxSpeedOnAcceleration = valueOtherVehicleStateDynamicsMaxSpeedOnAcceleration; 239 : 12 : ::ad::rss::world::UnstructuredSettings valueOtherVehicleStateDynamicsUnstructuredSettings; 240 : 12 : ::ad::physics::Distance valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius(-1e9); 241 : : valueOtherVehicleStateDynamicsUnstructuredSettings.pedestrianTurningRadius 242 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius; 243 : 12 : ::ad::physics::Angle valueOtherVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle(-6.283185308); 244 : : valueOtherVehicleStateDynamicsUnstructuredSettings.driveAwayMaxAngle 245 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle; 246 : 12 : ::ad::physics::AngularAcceleration valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange(-1e2); 247 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleYawRateChange 248 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange; 249 : 12 : ::ad::physics::Distance valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius(-1e9); 250 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleMinRadius 251 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius; 252 : 12 : ::ad::physics::Duration valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(0.); 253 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 254 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 255 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 256 : : std::numeric_limits<uint32_t>::min()}; 257 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 258 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 259 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 260 : : std::numeric_limits<uint32_t>::min()}; 261 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 262 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 263 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 264 : : std::numeric_limits<uint32_t>::min()}; 265 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 266 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 267 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 268 : : std::numeric_limits<uint32_t>::min()}; 269 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 270 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 271 : : uint32_t 272 : 12 : valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps{ 273 : : std::numeric_limits<uint32_t>::min()}; 274 : : valueOtherVehicleStateDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateYawRateChangeRatioSteps 275 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps; 276 : : uint32_t 277 : 12 : valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 278 : : std::numeric_limits<uint32_t>::min()}; 279 : : valueOtherVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 280 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 281 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 282 : : std::numeric_limits<uint32_t>::min()}; 283 : : valueOtherVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 284 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 285 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 286 : : std::numeric_limits<uint32_t>::min()}; 287 : : valueOtherVehicleStateDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 288 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 289 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 290 : : std::numeric_limits<uint32_t>::min()}; 291 : : valueOtherVehicleStateDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 292 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 293 : 12 : uint32_t valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 294 : : std::numeric_limits<uint32_t>::min()}; 295 : : valueOtherVehicleStateDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 296 : 12 : = valueOtherVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 297 : 12 : valueOtherVehicleStateDynamics.unstructuredSettings = valueOtherVehicleStateDynamicsUnstructuredSettings; 298 : 12 : valueOtherVehicleState.dynamics = valueOtherVehicleStateDynamics; 299 : 12 : bool valueOtherVehicleStateHasPriority{true}; 300 : 12 : valueOtherVehicleState.hasPriority = valueOtherVehicleStateHasPriority; 301 : 12 : bool valueOtherVehicleStateIsInCorrectLane{true}; 302 : 12 : valueOtherVehicleState.isInCorrectLane = valueOtherVehicleStateIsInCorrectLane; 303 : 12 : ::ad::physics::Distance valueOtherVehicleStateDistanceToEnterIntersection(-1e9); 304 : 12 : valueOtherVehicleStateDistanceToEnterIntersection = ::ad::physics::Distance(0.); // set to valid value within struct 305 : 12 : valueOtherVehicleState.distanceToEnterIntersection = valueOtherVehicleStateDistanceToEnterIntersection; 306 : 12 : ::ad::physics::Distance valueOtherVehicleStateDistanceToLeaveIntersection(-1e9); 307 : 12 : valueOtherVehicleState.distanceToLeaveIntersection = valueOtherVehicleStateDistanceToLeaveIntersection; 308 : 12 : ::ad::rss::world::ObjectType valueOtherVehicleStateObjectType(::ad::rss::world::ObjectType::Invalid); 309 : 12 : valueOtherVehicleState.objectType = valueOtherVehicleStateObjectType; 310 : 12 : ::ad::rss::world::ObjectState valueOtherVehicleStateObjectState; 311 : 12 : ::ad::physics::Angle valueOtherVehicleStateObjectStateYaw(-6.283185308); 312 : 12 : valueOtherVehicleStateObjectState.yaw = valueOtherVehicleStateObjectStateYaw; 313 : 12 : ::ad::physics::Dimension2D valueOtherVehicleStateObjectStateDimension; 314 : 12 : ::ad::physics::Distance valueOtherVehicleStateObjectStateDimensionLength(-1e9); 315 : 12 : valueOtherVehicleStateObjectStateDimension.length = valueOtherVehicleStateObjectStateDimensionLength; 316 : 12 : ::ad::physics::Distance valueOtherVehicleStateObjectStateDimensionWidth(-1e9); 317 : 12 : valueOtherVehicleStateObjectStateDimension.width = valueOtherVehicleStateObjectStateDimensionWidth; 318 : 12 : valueOtherVehicleStateObjectState.dimension = valueOtherVehicleStateObjectStateDimension; 319 : 12 : ::ad::physics::AngularVelocity valueOtherVehicleStateObjectStateYawRate(-100.); 320 : 12 : valueOtherVehicleStateObjectState.yawRate = valueOtherVehicleStateObjectStateYawRate; 321 : 12 : ::ad::physics::Distance2D valueOtherVehicleStateObjectStateCenterPoint; 322 : 12 : ::ad::physics::Distance valueOtherVehicleStateObjectStateCenterPointX(-1e9); 323 : 12 : valueOtherVehicleStateObjectStateCenterPoint.x = valueOtherVehicleStateObjectStateCenterPointX; 324 : 12 : ::ad::physics::Distance valueOtherVehicleStateObjectStateCenterPointY(-1e9); 325 : 12 : valueOtherVehicleStateObjectStateCenterPoint.y = valueOtherVehicleStateObjectStateCenterPointY; 326 : 12 : valueOtherVehicleStateObjectState.centerPoint = valueOtherVehicleStateObjectStateCenterPoint; 327 : 12 : ::ad::physics::Speed valueOtherVehicleStateObjectStateSpeed(-100.); 328 : 12 : valueOtherVehicleStateObjectState.speed = valueOtherVehicleStateObjectStateSpeed; 329 : 12 : ::ad::physics::Angle valueOtherVehicleStateObjectStateSteeringAngle(-6.283185308); 330 : 12 : valueOtherVehicleStateObjectState.steeringAngle = valueOtherVehicleStateObjectStateSteeringAngle; 331 : 12 : valueOtherVehicleState.objectState = valueOtherVehicleStateObjectState; 332 : 12 : valueOtherVehicleState.distanceToLeaveIntersection = valueOtherVehicleState.distanceToEnterIntersection; 333 : 12 : valueOtherVehicleState.distanceToEnterIntersection = valueOtherVehicleState.distanceToLeaveIntersection; 334 : 12 : value.otherVehicleState = valueOtherVehicleState; 335 : 12 : ::ad::rss::situation::RelativePosition valueRelativePosition; 336 : 12 : ::ad::rss::situation::LongitudinalRelativePosition valueRelativePositionLongitudinalPosition( 337 : : ::ad::rss::situation::LongitudinalRelativePosition::InFront); 338 : 12 : valueRelativePosition.longitudinalPosition = valueRelativePositionLongitudinalPosition; 339 : 12 : ::ad::physics::Distance valueRelativePositionLongitudinalDistance(-1e9); 340 : 12 : valueRelativePosition.longitudinalDistance = valueRelativePositionLongitudinalDistance; 341 : 12 : ::ad::rss::situation::LateralRelativePosition valueRelativePositionLateralPosition( 342 : : ::ad::rss::situation::LateralRelativePosition::AtLeft); 343 : 12 : valueRelativePosition.lateralPosition = valueRelativePositionLateralPosition; 344 : 12 : ::ad::physics::Distance valueRelativePositionLateralDistance(-1e9); 345 : 12 : valueRelativePosition.lateralDistance = valueRelativePositionLateralDistance; 346 : 12 : value.relativePosition = valueRelativePosition; 347 : 12 : mValue = value; 348 : 12 : } 349 : : 350 : : ::ad::rss::situation::Situation mValue; 351 : : }; 352 : : 353 : 2 : TEST_F(SituationTests, copyConstruction) 354 : : { 355 : 1 : ::ad::rss::situation::Situation value(mValue); 356 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 357 : 1 : } 358 : : 359 : 2 : TEST_F(SituationTests, moveConstruction) 360 : : { 361 : 1 : ::ad::rss::situation::Situation tmpValue(mValue); 362 : 1 : ::ad::rss::situation::Situation value(std::move(tmpValue)); 363 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 364 : 1 : } 365 : : 366 : 2 : TEST_F(SituationTests, copyAssignment) 367 : : { 368 : 1 : ::ad::rss::situation::Situation value; 369 : 1 : value = mValue; 370 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 371 : 1 : } 372 : : 373 : 2 : TEST_F(SituationTests, moveAssignment) 374 : : { 375 : 1 : ::ad::rss::situation::Situation tmpValue(mValue); 376 : 1 : ::ad::rss::situation::Situation value; 377 : 1 : value = std::move(tmpValue); 378 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 379 : 1 : } 380 : : 381 : 2 : TEST_F(SituationTests, comparisonOperatorEqual) 382 : : { 383 : 1 : ::ad::rss::situation::Situation valueA = mValue; 384 : 1 : ::ad::rss::situation::Situation valueB = mValue; 385 : : 386 [ + - - + : 1 : EXPECT_TRUE(valueA == valueB); - - - - - - - - ] 387 [ + - - + : 1 : EXPECT_FALSE(valueA != valueB); - - - - - - - - ] 388 : 1 : } 389 : : 390 : 2 : TEST_F(SituationTests, stringConversionTest) 391 : : { 392 [ + - ]: 1 : std::stringstream stream; 393 [ + - ]: 1 : stream << mValue; 394 [ + - ]: 1 : std::string ostreamStr = stream.str(); 395 [ + - ]: 1 : std::string toStr = std::to_string(mValue); 396 [ + - - + : 1 : ASSERT_EQ(ostreamStr, toStr); - - - - - - ] 397 : : } 398 : : 399 : 2 : TEST_F(SituationTests, comparisonOperatorSituationIdDiffers) 400 : : { 401 : 1 : ::ad::rss::situation::Situation valueA = mValue; 402 : 1 : ::ad::rss::situation::SituationId situationId(std::numeric_limits<::ad::rss::situation::SituationId>::max()); 403 : 1 : valueA.situationId = situationId; 404 : 1 : ::ad::rss::situation::Situation valueB = mValue; 405 : : 406 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 407 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 408 : 1 : } 409 : : 410 : 2 : TEST_F(SituationTests, comparisonOperatorObjectIdDiffers) 411 : : { 412 : 1 : ::ad::rss::situation::Situation valueA = mValue; 413 : 1 : ::ad::rss::world::ObjectId objectId(std::numeric_limits<::ad::rss::world::ObjectId>::max()); 414 : 1 : valueA.objectId = objectId; 415 : 1 : ::ad::rss::situation::Situation valueB = mValue; 416 : : 417 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 418 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 419 : 1 : } 420 : : 421 : 2 : TEST_F(SituationTests, comparisonOperatorSituationTypeDiffers) 422 : : { 423 : 1 : ::ad::rss::situation::Situation valueA = mValue; 424 : 1 : ::ad::rss::situation::SituationType situationType(::ad::rss::situation::SituationType::Unstructured); 425 : 1 : valueA.situationType = situationType; 426 : 1 : ::ad::rss::situation::Situation valueB = mValue; 427 : : 428 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 429 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 430 : 1 : } 431 : : 432 : 2 : TEST_F(SituationTests, comparisonOperatorEgoVehicleStateDiffers) 433 : : { 434 : 1 : ::ad::rss::situation::Situation valueA = mValue; 435 : 1 : ::ad::rss::situation::VehicleState egoVehicleState; 436 : 1 : ::ad::rss::situation::VelocityRange egoVehicleStateVelocity; 437 : 1 : ::ad::physics::SpeedRange egoVehicleStateVelocitySpeedLon; 438 : 1 : ::ad::physics::Speed egoVehicleStateVelocitySpeedLonMinimum(100.); 439 : 1 : egoVehicleStateVelocitySpeedLon.minimum = egoVehicleStateVelocitySpeedLonMinimum; 440 : 1 : ::ad::physics::Speed egoVehicleStateVelocitySpeedLonMaximum(100.); 441 : 1 : egoVehicleStateVelocitySpeedLon.maximum = egoVehicleStateVelocitySpeedLonMaximum; 442 : 1 : egoVehicleStateVelocitySpeedLon.maximum = egoVehicleStateVelocitySpeedLon.minimum; 443 : 1 : egoVehicleStateVelocitySpeedLon.minimum = egoVehicleStateVelocitySpeedLon.maximum; 444 : 1 : egoVehicleStateVelocity.speedLon = egoVehicleStateVelocitySpeedLon; 445 : 1 : ::ad::physics::SpeedRange egoVehicleStateVelocitySpeedLat; 446 : 1 : ::ad::physics::Speed egoVehicleStateVelocitySpeedLatMinimum(100.); 447 : 1 : egoVehicleStateVelocitySpeedLat.minimum = egoVehicleStateVelocitySpeedLatMinimum; 448 : 1 : ::ad::physics::Speed egoVehicleStateVelocitySpeedLatMaximum(100.); 449 : 1 : egoVehicleStateVelocitySpeedLat.maximum = egoVehicleStateVelocitySpeedLatMaximum; 450 : 1 : egoVehicleStateVelocitySpeedLat.maximum = egoVehicleStateVelocitySpeedLat.minimum; 451 : 1 : egoVehicleStateVelocitySpeedLat.minimum = egoVehicleStateVelocitySpeedLat.maximum; 452 : 1 : egoVehicleStateVelocity.speedLat = egoVehicleStateVelocitySpeedLat; 453 : 1 : egoVehicleState.velocity = egoVehicleStateVelocity; 454 : 1 : ::ad::rss::world::RssDynamics egoVehicleStateDynamics; 455 : 1 : ::ad::rss::world::LongitudinalRssAccelerationValues egoVehicleStateDynamicsAlphaLon; 456 : 1 : ::ad::physics::Acceleration egoVehicleStateDynamicsAlphaLonAccelMax(1e2); 457 : 1 : egoVehicleStateDynamicsAlphaLon.accelMax = egoVehicleStateDynamicsAlphaLonAccelMax; 458 : 1 : ::ad::physics::Acceleration egoVehicleStateDynamicsAlphaLonBrakeMax(1e2); 459 : 1 : egoVehicleStateDynamicsAlphaLon.brakeMax = egoVehicleStateDynamicsAlphaLonBrakeMax; 460 : 1 : ::ad::physics::Acceleration egoVehicleStateDynamicsAlphaLonBrakeMin(1e2); 461 : 1 : egoVehicleStateDynamicsAlphaLon.brakeMin = egoVehicleStateDynamicsAlphaLonBrakeMin; 462 : 1 : ::ad::physics::Acceleration egoVehicleStateDynamicsAlphaLonBrakeMinCorrect(1e2); 463 : : egoVehicleStateDynamicsAlphaLonBrakeMinCorrect 464 : 1 : = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 465 : 1 : egoVehicleStateDynamicsAlphaLon.brakeMinCorrect = egoVehicleStateDynamicsAlphaLonBrakeMinCorrect; 466 : 1 : egoVehicleStateDynamicsAlphaLon.brakeMinCorrect = egoVehicleStateDynamicsAlphaLon.brakeMin; 467 : 1 : egoVehicleStateDynamicsAlphaLon.brakeMin = egoVehicleStateDynamicsAlphaLon.brakeMax; 468 : 1 : egoVehicleStateDynamicsAlphaLon.brakeMax = egoVehicleStateDynamicsAlphaLon.brakeMin; 469 : 1 : egoVehicleStateDynamicsAlphaLon.brakeMin = egoVehicleStateDynamicsAlphaLon.brakeMinCorrect; 470 : 1 : egoVehicleStateDynamics.alphaLon = egoVehicleStateDynamicsAlphaLon; 471 : 1 : ::ad::rss::world::LateralRssAccelerationValues egoVehicleStateDynamicsAlphaLat; 472 : 1 : ::ad::physics::Acceleration egoVehicleStateDynamicsAlphaLatAccelMax(1e2); 473 : 1 : egoVehicleStateDynamicsAlphaLat.accelMax = egoVehicleStateDynamicsAlphaLatAccelMax; 474 : 1 : ::ad::physics::Acceleration egoVehicleStateDynamicsAlphaLatBrakeMin(1e2); 475 : 1 : egoVehicleStateDynamicsAlphaLatBrakeMin = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 476 : 1 : egoVehicleStateDynamicsAlphaLat.brakeMin = egoVehicleStateDynamicsAlphaLatBrakeMin; 477 : 1 : egoVehicleStateDynamics.alphaLat = egoVehicleStateDynamicsAlphaLat; 478 : 1 : ::ad::physics::Distance egoVehicleStateDynamicsLateralFluctuationMargin(1e9); 479 : 1 : egoVehicleStateDynamicsLateralFluctuationMargin = ::ad::physics::Distance(1.); // set to valid value within struct 480 : 1 : egoVehicleStateDynamics.lateralFluctuationMargin = egoVehicleStateDynamicsLateralFluctuationMargin; 481 : 1 : ::ad::physics::Duration egoVehicleStateDynamicsResponseTime(1e6); 482 : 1 : egoVehicleStateDynamicsResponseTime = ::ad::physics::Duration(10.); // set to valid value within struct 483 : 1 : egoVehicleStateDynamics.responseTime = egoVehicleStateDynamicsResponseTime; 484 : 1 : ::ad::physics::Speed egoVehicleStateDynamicsMaxSpeedOnAcceleration(100.); 485 : 1 : egoVehicleStateDynamics.maxSpeedOnAcceleration = egoVehicleStateDynamicsMaxSpeedOnAcceleration; 486 : 1 : ::ad::rss::world::UnstructuredSettings egoVehicleStateDynamicsUnstructuredSettings; 487 : 1 : ::ad::physics::Distance egoVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius(1e9); 488 : : egoVehicleStateDynamicsUnstructuredSettings.pedestrianTurningRadius 489 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius; 490 : 1 : ::ad::physics::Angle egoVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle(6.283185308); 491 : : egoVehicleStateDynamicsUnstructuredSettings.driveAwayMaxAngle 492 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle; 493 : 1 : ::ad::physics::AngularAcceleration egoVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange(1e2); 494 : : egoVehicleStateDynamicsUnstructuredSettings.vehicleYawRateChange 495 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange; 496 : 1 : ::ad::physics::Distance egoVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius(1e9); 497 : : egoVehicleStateDynamicsUnstructuredSettings.vehicleMinRadius 498 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius; 499 : 1 : ::ad::physics::Duration egoVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(1e6); 500 : : egoVehicleStateDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 501 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 502 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 503 : : std::numeric_limits<uint32_t>::max()}; 504 : : egoVehicleStateDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 505 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 506 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 507 : : std::numeric_limits<uint32_t>::max()}; 508 : : egoVehicleStateDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 509 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 510 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 511 : : std::numeric_limits<uint32_t>::max()}; 512 : : egoVehicleStateDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 513 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 514 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 515 : : std::numeric_limits<uint32_t>::max()}; 516 : : egoVehicleStateDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 517 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 518 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 519 : : std::numeric_limits<uint32_t>::max()}; 520 : : egoVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 521 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 522 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 523 : : std::numeric_limits<uint32_t>::max()}; 524 : : egoVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 525 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 526 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 527 : : std::numeric_limits<uint32_t>::max()}; 528 : : egoVehicleStateDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 529 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 530 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 531 : : std::numeric_limits<uint32_t>::max()}; 532 : : egoVehicleStateDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 533 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 534 : 1 : uint32_t egoVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 535 : : std::numeric_limits<uint32_t>::max()}; 536 : : egoVehicleStateDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 537 : 1 : = egoVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 538 : 1 : egoVehicleStateDynamics.unstructuredSettings = egoVehicleStateDynamicsUnstructuredSettings; 539 : 1 : egoVehicleState.dynamics = egoVehicleStateDynamics; 540 : 1 : bool egoVehicleStateHasPriority{false}; 541 : 1 : egoVehicleState.hasPriority = egoVehicleStateHasPriority; 542 : 1 : bool egoVehicleStateIsInCorrectLane{false}; 543 : 1 : egoVehicleState.isInCorrectLane = egoVehicleStateIsInCorrectLane; 544 : 1 : ::ad::physics::Distance egoVehicleStateDistanceToEnterIntersection(1e9); 545 : 1 : egoVehicleState.distanceToEnterIntersection = egoVehicleStateDistanceToEnterIntersection; 546 : 1 : ::ad::physics::Distance egoVehicleStateDistanceToLeaveIntersection(1e9); 547 : 1 : egoVehicleStateDistanceToLeaveIntersection = ::ad::physics::Distance(1e4); // set to valid value within struct 548 : 1 : egoVehicleState.distanceToLeaveIntersection = egoVehicleStateDistanceToLeaveIntersection; 549 : 1 : ::ad::rss::world::ObjectType egoVehicleStateObjectType(::ad::rss::world::ObjectType::ArtificialObject); 550 : 1 : egoVehicleState.objectType = egoVehicleStateObjectType; 551 : 1 : ::ad::rss::world::ObjectState egoVehicleStateObjectState; 552 : 1 : ::ad::physics::Angle egoVehicleStateObjectStateYaw(6.283185308); 553 : 1 : egoVehicleStateObjectState.yaw = egoVehicleStateObjectStateYaw; 554 : 1 : ::ad::physics::Dimension2D egoVehicleStateObjectStateDimension; 555 : 1 : ::ad::physics::Distance egoVehicleStateObjectStateDimensionLength(1e9); 556 : 1 : egoVehicleStateObjectStateDimension.length = egoVehicleStateObjectStateDimensionLength; 557 : 1 : ::ad::physics::Distance egoVehicleStateObjectStateDimensionWidth(1e9); 558 : 1 : egoVehicleStateObjectStateDimension.width = egoVehicleStateObjectStateDimensionWidth; 559 : 1 : egoVehicleStateObjectState.dimension = egoVehicleStateObjectStateDimension; 560 : 1 : ::ad::physics::AngularVelocity egoVehicleStateObjectStateYawRate(100.); 561 : 1 : egoVehicleStateObjectState.yawRate = egoVehicleStateObjectStateYawRate; 562 : 1 : ::ad::physics::Distance2D egoVehicleStateObjectStateCenterPoint; 563 : 1 : ::ad::physics::Distance egoVehicleStateObjectStateCenterPointX(1e9); 564 : 1 : egoVehicleStateObjectStateCenterPoint.x = egoVehicleStateObjectStateCenterPointX; 565 : 1 : ::ad::physics::Distance egoVehicleStateObjectStateCenterPointY(1e9); 566 : 1 : egoVehicleStateObjectStateCenterPoint.y = egoVehicleStateObjectStateCenterPointY; 567 : 1 : egoVehicleStateObjectState.centerPoint = egoVehicleStateObjectStateCenterPoint; 568 : 1 : ::ad::physics::Speed egoVehicleStateObjectStateSpeed(100.); 569 : 1 : egoVehicleStateObjectState.speed = egoVehicleStateObjectStateSpeed; 570 : 1 : ::ad::physics::Angle egoVehicleStateObjectStateSteeringAngle(6.283185308); 571 : 1 : egoVehicleStateObjectState.steeringAngle = egoVehicleStateObjectStateSteeringAngle; 572 : 1 : egoVehicleState.objectState = egoVehicleStateObjectState; 573 : 1 : egoVehicleState.distanceToLeaveIntersection = egoVehicleState.distanceToEnterIntersection; 574 : 1 : egoVehicleState.distanceToEnterIntersection = egoVehicleState.distanceToLeaveIntersection; 575 : 1 : valueA.egoVehicleState = egoVehicleState; 576 : 1 : ::ad::rss::situation::Situation valueB = mValue; 577 : : 578 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 579 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 580 : 1 : } 581 : : 582 : 2 : TEST_F(SituationTests, comparisonOperatorOtherVehicleStateDiffers) 583 : : { 584 : 1 : ::ad::rss::situation::Situation valueA = mValue; 585 : 1 : ::ad::rss::situation::VehicleState otherVehicleState; 586 : 1 : ::ad::rss::situation::VelocityRange otherVehicleStateVelocity; 587 : 1 : ::ad::physics::SpeedRange otherVehicleStateVelocitySpeedLon; 588 : 1 : ::ad::physics::Speed otherVehicleStateVelocitySpeedLonMinimum(100.); 589 : 1 : otherVehicleStateVelocitySpeedLon.minimum = otherVehicleStateVelocitySpeedLonMinimum; 590 : 1 : ::ad::physics::Speed otherVehicleStateVelocitySpeedLonMaximum(100.); 591 : 1 : otherVehicleStateVelocitySpeedLon.maximum = otherVehicleStateVelocitySpeedLonMaximum; 592 : 1 : otherVehicleStateVelocitySpeedLon.maximum = otherVehicleStateVelocitySpeedLon.minimum; 593 : 1 : otherVehicleStateVelocitySpeedLon.minimum = otherVehicleStateVelocitySpeedLon.maximum; 594 : 1 : otherVehicleStateVelocity.speedLon = otherVehicleStateVelocitySpeedLon; 595 : 1 : ::ad::physics::SpeedRange otherVehicleStateVelocitySpeedLat; 596 : 1 : ::ad::physics::Speed otherVehicleStateVelocitySpeedLatMinimum(100.); 597 : 1 : otherVehicleStateVelocitySpeedLat.minimum = otherVehicleStateVelocitySpeedLatMinimum; 598 : 1 : ::ad::physics::Speed otherVehicleStateVelocitySpeedLatMaximum(100.); 599 : 1 : otherVehicleStateVelocitySpeedLat.maximum = otherVehicleStateVelocitySpeedLatMaximum; 600 : 1 : otherVehicleStateVelocitySpeedLat.maximum = otherVehicleStateVelocitySpeedLat.minimum; 601 : 1 : otherVehicleStateVelocitySpeedLat.minimum = otherVehicleStateVelocitySpeedLat.maximum; 602 : 1 : otherVehicleStateVelocity.speedLat = otherVehicleStateVelocitySpeedLat; 603 : 1 : otherVehicleState.velocity = otherVehicleStateVelocity; 604 : 1 : ::ad::rss::world::RssDynamics otherVehicleStateDynamics; 605 : 1 : ::ad::rss::world::LongitudinalRssAccelerationValues otherVehicleStateDynamicsAlphaLon; 606 : 1 : ::ad::physics::Acceleration otherVehicleStateDynamicsAlphaLonAccelMax(1e2); 607 : 1 : otherVehicleStateDynamicsAlphaLon.accelMax = otherVehicleStateDynamicsAlphaLonAccelMax; 608 : 1 : ::ad::physics::Acceleration otherVehicleStateDynamicsAlphaLonBrakeMax(1e2); 609 : 1 : otherVehicleStateDynamicsAlphaLon.brakeMax = otherVehicleStateDynamicsAlphaLonBrakeMax; 610 : 1 : ::ad::physics::Acceleration otherVehicleStateDynamicsAlphaLonBrakeMin(1e2); 611 : 1 : otherVehicleStateDynamicsAlphaLon.brakeMin = otherVehicleStateDynamicsAlphaLonBrakeMin; 612 : 1 : ::ad::physics::Acceleration otherVehicleStateDynamicsAlphaLonBrakeMinCorrect(1e2); 613 : : otherVehicleStateDynamicsAlphaLonBrakeMinCorrect 614 : 1 : = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 615 : 1 : otherVehicleStateDynamicsAlphaLon.brakeMinCorrect = otherVehicleStateDynamicsAlphaLonBrakeMinCorrect; 616 : 1 : otherVehicleStateDynamicsAlphaLon.brakeMinCorrect = otherVehicleStateDynamicsAlphaLon.brakeMin; 617 : 1 : otherVehicleStateDynamicsAlphaLon.brakeMin = otherVehicleStateDynamicsAlphaLon.brakeMax; 618 : 1 : otherVehicleStateDynamicsAlphaLon.brakeMax = otherVehicleStateDynamicsAlphaLon.brakeMin; 619 : 1 : otherVehicleStateDynamicsAlphaLon.brakeMin = otherVehicleStateDynamicsAlphaLon.brakeMinCorrect; 620 : 1 : otherVehicleStateDynamics.alphaLon = otherVehicleStateDynamicsAlphaLon; 621 : 1 : ::ad::rss::world::LateralRssAccelerationValues otherVehicleStateDynamicsAlphaLat; 622 : 1 : ::ad::physics::Acceleration otherVehicleStateDynamicsAlphaLatAccelMax(1e2); 623 : 1 : otherVehicleStateDynamicsAlphaLat.accelMax = otherVehicleStateDynamicsAlphaLatAccelMax; 624 : 1 : ::ad::physics::Acceleration otherVehicleStateDynamicsAlphaLatBrakeMin(1e2); 625 : 1 : otherVehicleStateDynamicsAlphaLatBrakeMin = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 626 : 1 : otherVehicleStateDynamicsAlphaLat.brakeMin = otherVehicleStateDynamicsAlphaLatBrakeMin; 627 : 1 : otherVehicleStateDynamics.alphaLat = otherVehicleStateDynamicsAlphaLat; 628 : 1 : ::ad::physics::Distance otherVehicleStateDynamicsLateralFluctuationMargin(1e9); 629 : 1 : otherVehicleStateDynamicsLateralFluctuationMargin = ::ad::physics::Distance(1.); // set to valid value within struct 630 : 1 : otherVehicleStateDynamics.lateralFluctuationMargin = otherVehicleStateDynamicsLateralFluctuationMargin; 631 : 1 : ::ad::physics::Duration otherVehicleStateDynamicsResponseTime(1e6); 632 : 1 : otherVehicleStateDynamicsResponseTime = ::ad::physics::Duration(10.); // set to valid value within struct 633 : 1 : otherVehicleStateDynamics.responseTime = otherVehicleStateDynamicsResponseTime; 634 : 1 : ::ad::physics::Speed otherVehicleStateDynamicsMaxSpeedOnAcceleration(100.); 635 : 1 : otherVehicleStateDynamics.maxSpeedOnAcceleration = otherVehicleStateDynamicsMaxSpeedOnAcceleration; 636 : 1 : ::ad::rss::world::UnstructuredSettings otherVehicleStateDynamicsUnstructuredSettings; 637 : 1 : ::ad::physics::Distance otherVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius(1e9); 638 : : otherVehicleStateDynamicsUnstructuredSettings.pedestrianTurningRadius 639 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsPedestrianTurningRadius; 640 : 1 : ::ad::physics::Angle otherVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle(6.283185308); 641 : : otherVehicleStateDynamicsUnstructuredSettings.driveAwayMaxAngle 642 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsDriveAwayMaxAngle; 643 : 1 : ::ad::physics::AngularAcceleration otherVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange(1e2); 644 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleYawRateChange 645 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleYawRateChange; 646 : 1 : ::ad::physics::Distance otherVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius(1e9); 647 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleMinRadius 648 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleMinRadius; 649 : 1 : ::ad::physics::Duration otherVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(1e6); 650 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 651 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 652 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 653 : : std::numeric_limits<uint32_t>::max()}; 654 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 655 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 656 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 657 : : std::numeric_limits<uint32_t>::max()}; 658 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 659 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 660 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 661 : : std::numeric_limits<uint32_t>::max()}; 662 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 663 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 664 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 665 : : std::numeric_limits<uint32_t>::max()}; 666 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 667 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 668 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps{ 669 : : std::numeric_limits<uint32_t>::max()}; 670 : : otherVehicleStateDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateYawRateChangeRatioSteps 671 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps; 672 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 673 : : std::numeric_limits<uint32_t>::max()}; 674 : : otherVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 675 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 676 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 677 : : std::numeric_limits<uint32_t>::max()}; 678 : : otherVehicleStateDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 679 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 680 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 681 : : std::numeric_limits<uint32_t>::max()}; 682 : : otherVehicleStateDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 683 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 684 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 685 : : std::numeric_limits<uint32_t>::max()}; 686 : : otherVehicleStateDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 687 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 688 : 1 : uint32_t otherVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 689 : : std::numeric_limits<uint32_t>::max()}; 690 : : otherVehicleStateDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 691 : 1 : = otherVehicleStateDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 692 : 1 : otherVehicleStateDynamics.unstructuredSettings = otherVehicleStateDynamicsUnstructuredSettings; 693 : 1 : otherVehicleState.dynamics = otherVehicleStateDynamics; 694 : 1 : bool otherVehicleStateHasPriority{false}; 695 : 1 : otherVehicleState.hasPriority = otherVehicleStateHasPriority; 696 : 1 : bool otherVehicleStateIsInCorrectLane{false}; 697 : 1 : otherVehicleState.isInCorrectLane = otherVehicleStateIsInCorrectLane; 698 : 1 : ::ad::physics::Distance otherVehicleStateDistanceToEnterIntersection(1e9); 699 : 1 : otherVehicleState.distanceToEnterIntersection = otherVehicleStateDistanceToEnterIntersection; 700 : 1 : ::ad::physics::Distance otherVehicleStateDistanceToLeaveIntersection(1e9); 701 : 1 : otherVehicleStateDistanceToLeaveIntersection = ::ad::physics::Distance(1e4); // set to valid value within struct 702 : 1 : otherVehicleState.distanceToLeaveIntersection = otherVehicleStateDistanceToLeaveIntersection; 703 : 1 : ::ad::rss::world::ObjectType otherVehicleStateObjectType(::ad::rss::world::ObjectType::ArtificialObject); 704 : 1 : otherVehicleState.objectType = otherVehicleStateObjectType; 705 : 1 : ::ad::rss::world::ObjectState otherVehicleStateObjectState; 706 : 1 : ::ad::physics::Angle otherVehicleStateObjectStateYaw(6.283185308); 707 : 1 : otherVehicleStateObjectState.yaw = otherVehicleStateObjectStateYaw; 708 : 1 : ::ad::physics::Dimension2D otherVehicleStateObjectStateDimension; 709 : 1 : ::ad::physics::Distance otherVehicleStateObjectStateDimensionLength(1e9); 710 : 1 : otherVehicleStateObjectStateDimension.length = otherVehicleStateObjectStateDimensionLength; 711 : 1 : ::ad::physics::Distance otherVehicleStateObjectStateDimensionWidth(1e9); 712 : 1 : otherVehicleStateObjectStateDimension.width = otherVehicleStateObjectStateDimensionWidth; 713 : 1 : otherVehicleStateObjectState.dimension = otherVehicleStateObjectStateDimension; 714 : 1 : ::ad::physics::AngularVelocity otherVehicleStateObjectStateYawRate(100.); 715 : 1 : otherVehicleStateObjectState.yawRate = otherVehicleStateObjectStateYawRate; 716 : 1 : ::ad::physics::Distance2D otherVehicleStateObjectStateCenterPoint; 717 : 1 : ::ad::physics::Distance otherVehicleStateObjectStateCenterPointX(1e9); 718 : 1 : otherVehicleStateObjectStateCenterPoint.x = otherVehicleStateObjectStateCenterPointX; 719 : 1 : ::ad::physics::Distance otherVehicleStateObjectStateCenterPointY(1e9); 720 : 1 : otherVehicleStateObjectStateCenterPoint.y = otherVehicleStateObjectStateCenterPointY; 721 : 1 : otherVehicleStateObjectState.centerPoint = otherVehicleStateObjectStateCenterPoint; 722 : 1 : ::ad::physics::Speed otherVehicleStateObjectStateSpeed(100.); 723 : 1 : otherVehicleStateObjectState.speed = otherVehicleStateObjectStateSpeed; 724 : 1 : ::ad::physics::Angle otherVehicleStateObjectStateSteeringAngle(6.283185308); 725 : 1 : otherVehicleStateObjectState.steeringAngle = otherVehicleStateObjectStateSteeringAngle; 726 : 1 : otherVehicleState.objectState = otherVehicleStateObjectState; 727 : 1 : otherVehicleState.distanceToLeaveIntersection = otherVehicleState.distanceToEnterIntersection; 728 : 1 : otherVehicleState.distanceToEnterIntersection = otherVehicleState.distanceToLeaveIntersection; 729 : 1 : valueA.otherVehicleState = otherVehicleState; 730 : 1 : ::ad::rss::situation::Situation valueB = mValue; 731 : : 732 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 733 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 734 : 1 : } 735 : : 736 : 2 : TEST_F(SituationTests, comparisonOperatorRelativePositionDiffers) 737 : : { 738 : 1 : ::ad::rss::situation::Situation valueA = mValue; 739 : 1 : ::ad::rss::situation::RelativePosition relativePosition; 740 : 1 : ::ad::rss::situation::LongitudinalRelativePosition relativePositionLongitudinalPosition( 741 : : ::ad::rss::situation::LongitudinalRelativePosition::AtBack); 742 : 1 : relativePosition.longitudinalPosition = relativePositionLongitudinalPosition; 743 : 1 : ::ad::physics::Distance relativePositionLongitudinalDistance(1e9); 744 : 1 : relativePosition.longitudinalDistance = relativePositionLongitudinalDistance; 745 : 1 : ::ad::rss::situation::LateralRelativePosition relativePositionLateralPosition( 746 : : ::ad::rss::situation::LateralRelativePosition::AtRight); 747 : 1 : relativePosition.lateralPosition = relativePositionLateralPosition; 748 : 1 : ::ad::physics::Distance relativePositionLateralDistance(1e9); 749 : 1 : relativePosition.lateralDistance = relativePositionLateralDistance; 750 : 1 : valueA.relativePosition = relativePosition; 751 : 1 : ::ad::rss::situation::Situation valueB = mValue; 752 : : 753 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 754 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 755 : 1 : } 756 : : 757 : : #if defined(__clang__) && (__clang_major__ >= 7) 758 : : #pragma GCC diagnostic pop 759 : : #endif