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/world/Scene.hpp" 23 : : 24 : : class SceneTests : public testing::Test 25 : : { 26 : : protected: 27 : 13 : virtual void SetUp() override 28 : : { 29 : : // valid initialization 30 : 26 : ::ad::rss::world::Scene value; 31 : 13 : ::ad::rss::situation::SituationType valueSituationType(::ad::rss::situation::SituationType::NotRelevant); 32 : 13 : value.situationType = valueSituationType; 33 : 26 : ::ad::rss::world::Object valueEgoVehicle; 34 : 13 : ::ad::rss::world::ObjectId valueEgoVehicleObjectId(std::numeric_limits<::ad::rss::world::ObjectId>::lowest()); 35 : 13 : valueEgoVehicle.objectId = valueEgoVehicleObjectId; 36 : 13 : ::ad::rss::world::ObjectType valueEgoVehicleObjectType(::ad::rss::world::ObjectType::Invalid); 37 : 13 : valueEgoVehicle.objectType = valueEgoVehicleObjectType; 38 : 26 : ::ad::rss::world::OccupiedRegionVector valueEgoVehicleOccupiedRegions; 39 : 13 : ::ad::rss::world::OccupiedRegion valueEgoVehicleOccupiedRegionsElement; 40 : 13 : ::ad::rss::world::LaneSegmentId valueEgoVehicleOccupiedRegionsElementSegmentId( 41 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::lowest()); 42 : 13 : valueEgoVehicleOccupiedRegionsElement.segmentId = valueEgoVehicleOccupiedRegionsElementSegmentId; 43 : 13 : ::ad::physics::ParametricRange valueEgoVehicleOccupiedRegionsElementLonRange; 44 : 13 : ::ad::physics::ParametricValue valueEgoVehicleOccupiedRegionsElementLonRangeMinimum(0.); 45 : 13 : valueEgoVehicleOccupiedRegionsElementLonRange.minimum = valueEgoVehicleOccupiedRegionsElementLonRangeMinimum; 46 : 13 : ::ad::physics::ParametricValue valueEgoVehicleOccupiedRegionsElementLonRangeMaximum(0.); 47 : 13 : valueEgoVehicleOccupiedRegionsElementLonRange.maximum = valueEgoVehicleOccupiedRegionsElementLonRangeMaximum; 48 : 13 : valueEgoVehicleOccupiedRegionsElementLonRange.maximum = valueEgoVehicleOccupiedRegionsElementLonRange.minimum; 49 : 13 : valueEgoVehicleOccupiedRegionsElementLonRange.minimum = valueEgoVehicleOccupiedRegionsElementLonRange.maximum; 50 : 13 : valueEgoVehicleOccupiedRegionsElement.lonRange = valueEgoVehicleOccupiedRegionsElementLonRange; 51 : 13 : ::ad::physics::ParametricRange valueEgoVehicleOccupiedRegionsElementLatRange; 52 : 13 : ::ad::physics::ParametricValue valueEgoVehicleOccupiedRegionsElementLatRangeMinimum(0.); 53 : 13 : valueEgoVehicleOccupiedRegionsElementLatRange.minimum = valueEgoVehicleOccupiedRegionsElementLatRangeMinimum; 54 : 13 : ::ad::physics::ParametricValue valueEgoVehicleOccupiedRegionsElementLatRangeMaximum(0.); 55 : 13 : valueEgoVehicleOccupiedRegionsElementLatRange.maximum = valueEgoVehicleOccupiedRegionsElementLatRangeMaximum; 56 : 13 : valueEgoVehicleOccupiedRegionsElementLatRange.maximum = valueEgoVehicleOccupiedRegionsElementLatRange.minimum; 57 : 13 : valueEgoVehicleOccupiedRegionsElementLatRange.minimum = valueEgoVehicleOccupiedRegionsElementLatRange.maximum; 58 : 13 : valueEgoVehicleOccupiedRegionsElement.latRange = valueEgoVehicleOccupiedRegionsElementLatRange; 59 [ + - ]: 13 : valueEgoVehicleOccupiedRegions.resize(1, valueEgoVehicleOccupiedRegionsElement); 60 [ + - ]: 13 : valueEgoVehicle.occupiedRegions = valueEgoVehicleOccupiedRegions; 61 : 13 : ::ad::rss::world::Velocity valueEgoVehicleVelocity; 62 : 13 : ::ad::physics::Speed valueEgoVehicleVelocitySpeedLonMin(-100.); 63 : 13 : valueEgoVehicleVelocitySpeedLonMin = ::ad::physics::Speed(0.); // set to valid value within struct 64 : 13 : valueEgoVehicleVelocity.speedLonMin = valueEgoVehicleVelocitySpeedLonMin; 65 : 13 : ::ad::physics::Speed valueEgoVehicleVelocitySpeedLonMax(-100.); 66 : 13 : valueEgoVehicleVelocity.speedLonMax = valueEgoVehicleVelocitySpeedLonMax; 67 : 13 : ::ad::physics::Speed valueEgoVehicleVelocitySpeedLatMin(-100.); 68 : 13 : valueEgoVehicleVelocity.speedLatMin = valueEgoVehicleVelocitySpeedLatMin; 69 : 13 : ::ad::physics::Speed valueEgoVehicleVelocitySpeedLatMax(-100.); 70 : 13 : valueEgoVehicleVelocity.speedLatMax = valueEgoVehicleVelocitySpeedLatMax; 71 : 13 : valueEgoVehicleVelocity.speedLonMax = valueEgoVehicleVelocity.speedLonMin; 72 : 13 : valueEgoVehicleVelocity.speedLatMax = valueEgoVehicleVelocity.speedLatMin; 73 : 13 : valueEgoVehicleVelocity.speedLonMin = valueEgoVehicleVelocity.speedLonMax; 74 : 13 : valueEgoVehicleVelocity.speedLatMin = valueEgoVehicleVelocity.speedLatMax; 75 : 13 : valueEgoVehicle.velocity = valueEgoVehicleVelocity; 76 : 13 : ::ad::rss::world::ObjectState valueEgoVehicleState; 77 : 13 : ::ad::physics::Angle valueEgoVehicleStateYaw(-6.283185308); 78 : 13 : valueEgoVehicleState.yaw = valueEgoVehicleStateYaw; 79 : 13 : ::ad::physics::Dimension2D valueEgoVehicleStateDimension; 80 : 13 : ::ad::physics::Distance valueEgoVehicleStateDimensionLength(-1e9); 81 : 13 : valueEgoVehicleStateDimension.length = valueEgoVehicleStateDimensionLength; 82 : 13 : ::ad::physics::Distance valueEgoVehicleStateDimensionWidth(-1e9); 83 : 13 : valueEgoVehicleStateDimension.width = valueEgoVehicleStateDimensionWidth; 84 : 13 : valueEgoVehicleState.dimension = valueEgoVehicleStateDimension; 85 : 13 : ::ad::physics::AngularVelocity valueEgoVehicleStateYawRate(-100.); 86 : 13 : valueEgoVehicleState.yawRate = valueEgoVehicleStateYawRate; 87 : 13 : ::ad::physics::Distance2D valueEgoVehicleStateCenterPoint; 88 : 13 : ::ad::physics::Distance valueEgoVehicleStateCenterPointX(-1e9); 89 : 13 : valueEgoVehicleStateCenterPoint.x = valueEgoVehicleStateCenterPointX; 90 : 13 : ::ad::physics::Distance valueEgoVehicleStateCenterPointY(-1e9); 91 : 13 : valueEgoVehicleStateCenterPoint.y = valueEgoVehicleStateCenterPointY; 92 : 13 : valueEgoVehicleState.centerPoint = valueEgoVehicleStateCenterPoint; 93 : 13 : ::ad::physics::Speed valueEgoVehicleStateSpeed(-100.); 94 : 13 : valueEgoVehicleState.speed = valueEgoVehicleStateSpeed; 95 : 13 : ::ad::physics::Angle valueEgoVehicleStateSteeringAngle(-6.283185308); 96 : 13 : valueEgoVehicleState.steeringAngle = valueEgoVehicleStateSteeringAngle; 97 : 13 : valueEgoVehicle.state = valueEgoVehicleState; 98 [ + - ]: 13 : value.egoVehicle = valueEgoVehicle; 99 : 13 : ::ad::rss::world::RssDynamics valueEgoVehicleRssDynamics; 100 : 13 : ::ad::rss::world::LongitudinalRssAccelerationValues valueEgoVehicleRssDynamicsAlphaLon; 101 : 13 : ::ad::physics::Acceleration valueEgoVehicleRssDynamicsAlphaLonAccelMax(-1e2); 102 : 13 : valueEgoVehicleRssDynamicsAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct 103 : 13 : valueEgoVehicleRssDynamicsAlphaLon.accelMax = valueEgoVehicleRssDynamicsAlphaLonAccelMax; 104 : 13 : ::ad::physics::Acceleration valueEgoVehicleRssDynamicsAlphaLonBrakeMax(-1e2); 105 : 13 : valueEgoVehicleRssDynamicsAlphaLon.brakeMax = valueEgoVehicleRssDynamicsAlphaLonBrakeMax; 106 : 13 : ::ad::physics::Acceleration valueEgoVehicleRssDynamicsAlphaLonBrakeMin(-1e2); 107 : 13 : valueEgoVehicleRssDynamicsAlphaLon.brakeMin = valueEgoVehicleRssDynamicsAlphaLonBrakeMin; 108 : 13 : ::ad::physics::Acceleration valueEgoVehicleRssDynamicsAlphaLonBrakeMinCorrect(-1e2); 109 : 13 : valueEgoVehicleRssDynamicsAlphaLon.brakeMinCorrect = valueEgoVehicleRssDynamicsAlphaLonBrakeMinCorrect; 110 : 13 : valueEgoVehicleRssDynamicsAlphaLon.brakeMin = valueEgoVehicleRssDynamicsAlphaLon.brakeMax; 111 : 13 : valueEgoVehicleRssDynamicsAlphaLon.brakeMinCorrect = valueEgoVehicleRssDynamicsAlphaLon.brakeMin; 112 : 13 : valueEgoVehicleRssDynamicsAlphaLon.brakeMin = valueEgoVehicleRssDynamicsAlphaLon.brakeMinCorrect; 113 : 13 : valueEgoVehicleRssDynamicsAlphaLon.brakeMax = valueEgoVehicleRssDynamicsAlphaLon.brakeMin; 114 : 13 : valueEgoVehicleRssDynamics.alphaLon = valueEgoVehicleRssDynamicsAlphaLon; 115 : 13 : ::ad::rss::world::LateralRssAccelerationValues valueEgoVehicleRssDynamicsAlphaLat; 116 : 13 : ::ad::physics::Acceleration valueEgoVehicleRssDynamicsAlphaLatAccelMax(-1e2); 117 : 13 : valueEgoVehicleRssDynamicsAlphaLatAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct 118 : 13 : valueEgoVehicleRssDynamicsAlphaLat.accelMax = valueEgoVehicleRssDynamicsAlphaLatAccelMax; 119 : 13 : ::ad::physics::Acceleration valueEgoVehicleRssDynamicsAlphaLatBrakeMin(-1e2); 120 : 13 : valueEgoVehicleRssDynamicsAlphaLat.brakeMin = valueEgoVehicleRssDynamicsAlphaLatBrakeMin; 121 : 13 : valueEgoVehicleRssDynamics.alphaLat = valueEgoVehicleRssDynamicsAlphaLat; 122 : 13 : ::ad::physics::Distance valueEgoVehicleRssDynamicsLateralFluctuationMargin(-1e9); 123 : 13 : valueEgoVehicleRssDynamicsLateralFluctuationMargin = ::ad::physics::Distance(0.); // set to valid value within 124 : : // struct 125 : 13 : valueEgoVehicleRssDynamics.lateralFluctuationMargin = valueEgoVehicleRssDynamicsLateralFluctuationMargin; 126 : 13 : ::ad::physics::Duration valueEgoVehicleRssDynamicsResponseTime(0.); 127 : : valueEgoVehicleRssDynamicsResponseTime 128 : 13 : = ::ad::physics::Duration(0. + ::ad::physics::Duration::cPrecisionValue); // set to valid value within struct 129 : 13 : valueEgoVehicleRssDynamics.responseTime = valueEgoVehicleRssDynamicsResponseTime; 130 : 13 : ::ad::physics::Speed valueEgoVehicleRssDynamicsMaxSpeedOnAcceleration(-100.); 131 : 13 : valueEgoVehicleRssDynamics.maxSpeedOnAcceleration = valueEgoVehicleRssDynamicsMaxSpeedOnAcceleration; 132 : 13 : ::ad::rss::world::UnstructuredSettings valueEgoVehicleRssDynamicsUnstructuredSettings; 133 : 13 : ::ad::physics::Distance valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianTurningRadius(-1e9); 134 : : valueEgoVehicleRssDynamicsUnstructuredSettings.pedestrianTurningRadius 135 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianTurningRadius; 136 : 13 : ::ad::physics::Angle valueEgoVehicleRssDynamicsUnstructuredSettingsDriveAwayMaxAngle(-6.283185308); 137 : : valueEgoVehicleRssDynamicsUnstructuredSettings.driveAwayMaxAngle 138 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsDriveAwayMaxAngle; 139 : 13 : ::ad::physics::AngularAcceleration valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleYawRateChange(-1e2); 140 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleYawRateChange 141 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleYawRateChange; 142 : 13 : ::ad::physics::Distance valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleMinRadius(-1e9); 143 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleMinRadius 144 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleMinRadius; 145 : 13 : ::ad::physics::Duration valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(0.); 146 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 147 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 148 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 149 : : std::numeric_limits<uint32_t>::min()}; 150 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 151 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 152 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 153 : : std::numeric_limits<uint32_t>::min()}; 154 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 155 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 156 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 157 : : std::numeric_limits<uint32_t>::min()}; 158 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 159 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 160 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 161 : : std::numeric_limits<uint32_t>::min()}; 162 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 163 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 164 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps{ 165 : : std::numeric_limits<uint32_t>::min()}; 166 : : valueEgoVehicleRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateYawRateChangeRatioSteps 167 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps; 168 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 169 : : std::numeric_limits<uint32_t>::min()}; 170 : : valueEgoVehicleRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 171 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 172 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 173 : : std::numeric_limits<uint32_t>::min()}; 174 : : valueEgoVehicleRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 175 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 176 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 177 : : std::numeric_limits<uint32_t>::min()}; 178 : : valueEgoVehicleRssDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 179 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 180 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 181 : : std::numeric_limits<uint32_t>::min()}; 182 : : valueEgoVehicleRssDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 183 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 184 : 13 : uint32_t valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 185 : : std::numeric_limits<uint32_t>::min()}; 186 : : valueEgoVehicleRssDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 187 : 13 : = valueEgoVehicleRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 188 : 13 : valueEgoVehicleRssDynamics.unstructuredSettings = valueEgoVehicleRssDynamicsUnstructuredSettings; 189 : 13 : value.egoVehicleRssDynamics = valueEgoVehicleRssDynamics; 190 : 26 : ::ad::rss::world::Object valueObject; 191 : 13 : ::ad::rss::world::ObjectId valueObjectObjectId(std::numeric_limits<::ad::rss::world::ObjectId>::lowest()); 192 : 13 : valueObject.objectId = valueObjectObjectId; 193 : 13 : ::ad::rss::world::ObjectType valueObjectObjectType(::ad::rss::world::ObjectType::Invalid); 194 : 13 : valueObject.objectType = valueObjectObjectType; 195 : 26 : ::ad::rss::world::OccupiedRegionVector valueObjectOccupiedRegions; 196 : 13 : ::ad::rss::world::OccupiedRegion valueObjectOccupiedRegionsElement; 197 : 13 : ::ad::rss::world::LaneSegmentId valueObjectOccupiedRegionsElementSegmentId( 198 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::lowest()); 199 : 13 : valueObjectOccupiedRegionsElement.segmentId = valueObjectOccupiedRegionsElementSegmentId; 200 : 13 : ::ad::physics::ParametricRange valueObjectOccupiedRegionsElementLonRange; 201 : 13 : ::ad::physics::ParametricValue valueObjectOccupiedRegionsElementLonRangeMinimum(0.); 202 : 13 : valueObjectOccupiedRegionsElementLonRange.minimum = valueObjectOccupiedRegionsElementLonRangeMinimum; 203 : 13 : ::ad::physics::ParametricValue valueObjectOccupiedRegionsElementLonRangeMaximum(0.); 204 : 13 : valueObjectOccupiedRegionsElementLonRange.maximum = valueObjectOccupiedRegionsElementLonRangeMaximum; 205 : 13 : valueObjectOccupiedRegionsElementLonRange.maximum = valueObjectOccupiedRegionsElementLonRange.minimum; 206 : 13 : valueObjectOccupiedRegionsElementLonRange.minimum = valueObjectOccupiedRegionsElementLonRange.maximum; 207 : 13 : valueObjectOccupiedRegionsElement.lonRange = valueObjectOccupiedRegionsElementLonRange; 208 : 13 : ::ad::physics::ParametricRange valueObjectOccupiedRegionsElementLatRange; 209 : 13 : ::ad::physics::ParametricValue valueObjectOccupiedRegionsElementLatRangeMinimum(0.); 210 : 13 : valueObjectOccupiedRegionsElementLatRange.minimum = valueObjectOccupiedRegionsElementLatRangeMinimum; 211 : 13 : ::ad::physics::ParametricValue valueObjectOccupiedRegionsElementLatRangeMaximum(0.); 212 : 13 : valueObjectOccupiedRegionsElementLatRange.maximum = valueObjectOccupiedRegionsElementLatRangeMaximum; 213 : 13 : valueObjectOccupiedRegionsElementLatRange.maximum = valueObjectOccupiedRegionsElementLatRange.minimum; 214 : 13 : valueObjectOccupiedRegionsElementLatRange.minimum = valueObjectOccupiedRegionsElementLatRange.maximum; 215 : 13 : valueObjectOccupiedRegionsElement.latRange = valueObjectOccupiedRegionsElementLatRange; 216 [ + - ]: 13 : valueObjectOccupiedRegions.resize(1, valueObjectOccupiedRegionsElement); 217 [ + - ]: 13 : valueObject.occupiedRegions = valueObjectOccupiedRegions; 218 : 13 : ::ad::rss::world::Velocity valueObjectVelocity; 219 : 13 : ::ad::physics::Speed valueObjectVelocitySpeedLonMin(-100.); 220 : 13 : valueObjectVelocitySpeedLonMin = ::ad::physics::Speed(0.); // set to valid value within struct 221 : 13 : valueObjectVelocity.speedLonMin = valueObjectVelocitySpeedLonMin; 222 : 13 : ::ad::physics::Speed valueObjectVelocitySpeedLonMax(-100.); 223 : 13 : valueObjectVelocity.speedLonMax = valueObjectVelocitySpeedLonMax; 224 : 13 : ::ad::physics::Speed valueObjectVelocitySpeedLatMin(-100.); 225 : 13 : valueObjectVelocity.speedLatMin = valueObjectVelocitySpeedLatMin; 226 : 13 : ::ad::physics::Speed valueObjectVelocitySpeedLatMax(-100.); 227 : 13 : valueObjectVelocity.speedLatMax = valueObjectVelocitySpeedLatMax; 228 : 13 : valueObjectVelocity.speedLonMax = valueObjectVelocity.speedLonMin; 229 : 13 : valueObjectVelocity.speedLatMax = valueObjectVelocity.speedLatMin; 230 : 13 : valueObjectVelocity.speedLonMin = valueObjectVelocity.speedLonMax; 231 : 13 : valueObjectVelocity.speedLatMin = valueObjectVelocity.speedLatMax; 232 : 13 : valueObject.velocity = valueObjectVelocity; 233 : 13 : ::ad::rss::world::ObjectState valueObjectState; 234 : 13 : ::ad::physics::Angle valueObjectStateYaw(-6.283185308); 235 : 13 : valueObjectState.yaw = valueObjectStateYaw; 236 : 13 : ::ad::physics::Dimension2D valueObjectStateDimension; 237 : 13 : ::ad::physics::Distance valueObjectStateDimensionLength(-1e9); 238 : 13 : valueObjectStateDimension.length = valueObjectStateDimensionLength; 239 : 13 : ::ad::physics::Distance valueObjectStateDimensionWidth(-1e9); 240 : 13 : valueObjectStateDimension.width = valueObjectStateDimensionWidth; 241 : 13 : valueObjectState.dimension = valueObjectStateDimension; 242 : 13 : ::ad::physics::AngularVelocity valueObjectStateYawRate(-100.); 243 : 13 : valueObjectState.yawRate = valueObjectStateYawRate; 244 : 13 : ::ad::physics::Distance2D valueObjectStateCenterPoint; 245 : 13 : ::ad::physics::Distance valueObjectStateCenterPointX(-1e9); 246 : 13 : valueObjectStateCenterPoint.x = valueObjectStateCenterPointX; 247 : 13 : ::ad::physics::Distance valueObjectStateCenterPointY(-1e9); 248 : 13 : valueObjectStateCenterPoint.y = valueObjectStateCenterPointY; 249 : 13 : valueObjectState.centerPoint = valueObjectStateCenterPoint; 250 : 13 : ::ad::physics::Speed valueObjectStateSpeed(-100.); 251 : 13 : valueObjectState.speed = valueObjectStateSpeed; 252 : 13 : ::ad::physics::Angle valueObjectStateSteeringAngle(-6.283185308); 253 : 13 : valueObjectState.steeringAngle = valueObjectStateSteeringAngle; 254 : 13 : valueObject.state = valueObjectState; 255 [ + - ]: 13 : value.object = valueObject; 256 : 13 : ::ad::rss::world::RssDynamics valueObjectRssDynamics; 257 : 13 : ::ad::rss::world::LongitudinalRssAccelerationValues valueObjectRssDynamicsAlphaLon; 258 : 13 : ::ad::physics::Acceleration valueObjectRssDynamicsAlphaLonAccelMax(-1e2); 259 : 13 : valueObjectRssDynamicsAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct 260 : 13 : valueObjectRssDynamicsAlphaLon.accelMax = valueObjectRssDynamicsAlphaLonAccelMax; 261 : 13 : ::ad::physics::Acceleration valueObjectRssDynamicsAlphaLonBrakeMax(-1e2); 262 : 13 : valueObjectRssDynamicsAlphaLon.brakeMax = valueObjectRssDynamicsAlphaLonBrakeMax; 263 : 13 : ::ad::physics::Acceleration valueObjectRssDynamicsAlphaLonBrakeMin(-1e2); 264 : 13 : valueObjectRssDynamicsAlphaLon.brakeMin = valueObjectRssDynamicsAlphaLonBrakeMin; 265 : 13 : ::ad::physics::Acceleration valueObjectRssDynamicsAlphaLonBrakeMinCorrect(-1e2); 266 : 13 : valueObjectRssDynamicsAlphaLon.brakeMinCorrect = valueObjectRssDynamicsAlphaLonBrakeMinCorrect; 267 : 13 : valueObjectRssDynamicsAlphaLon.brakeMin = valueObjectRssDynamicsAlphaLon.brakeMax; 268 : 13 : valueObjectRssDynamicsAlphaLon.brakeMinCorrect = valueObjectRssDynamicsAlphaLon.brakeMin; 269 : 13 : valueObjectRssDynamicsAlphaLon.brakeMin = valueObjectRssDynamicsAlphaLon.brakeMinCorrect; 270 : 13 : valueObjectRssDynamicsAlphaLon.brakeMax = valueObjectRssDynamicsAlphaLon.brakeMin; 271 : 13 : valueObjectRssDynamics.alphaLon = valueObjectRssDynamicsAlphaLon; 272 : 13 : ::ad::rss::world::LateralRssAccelerationValues valueObjectRssDynamicsAlphaLat; 273 : 13 : ::ad::physics::Acceleration valueObjectRssDynamicsAlphaLatAccelMax(-1e2); 274 : 13 : valueObjectRssDynamicsAlphaLatAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct 275 : 13 : valueObjectRssDynamicsAlphaLat.accelMax = valueObjectRssDynamicsAlphaLatAccelMax; 276 : 13 : ::ad::physics::Acceleration valueObjectRssDynamicsAlphaLatBrakeMin(-1e2); 277 : 13 : valueObjectRssDynamicsAlphaLat.brakeMin = valueObjectRssDynamicsAlphaLatBrakeMin; 278 : 13 : valueObjectRssDynamics.alphaLat = valueObjectRssDynamicsAlphaLat; 279 : 13 : ::ad::physics::Distance valueObjectRssDynamicsLateralFluctuationMargin(-1e9); 280 : 13 : valueObjectRssDynamicsLateralFluctuationMargin = ::ad::physics::Distance(0.); // set to valid value within struct 281 : 13 : valueObjectRssDynamics.lateralFluctuationMargin = valueObjectRssDynamicsLateralFluctuationMargin; 282 : 13 : ::ad::physics::Duration valueObjectRssDynamicsResponseTime(0.); 283 : : valueObjectRssDynamicsResponseTime 284 : 13 : = ::ad::physics::Duration(0. + ::ad::physics::Duration::cPrecisionValue); // set to valid value within struct 285 : 13 : valueObjectRssDynamics.responseTime = valueObjectRssDynamicsResponseTime; 286 : 13 : ::ad::physics::Speed valueObjectRssDynamicsMaxSpeedOnAcceleration(-100.); 287 : 13 : valueObjectRssDynamics.maxSpeedOnAcceleration = valueObjectRssDynamicsMaxSpeedOnAcceleration; 288 : 13 : ::ad::rss::world::UnstructuredSettings valueObjectRssDynamicsUnstructuredSettings; 289 : 13 : ::ad::physics::Distance valueObjectRssDynamicsUnstructuredSettingsPedestrianTurningRadius(-1e9); 290 : : valueObjectRssDynamicsUnstructuredSettings.pedestrianTurningRadius 291 : 13 : = valueObjectRssDynamicsUnstructuredSettingsPedestrianTurningRadius; 292 : 13 : ::ad::physics::Angle valueObjectRssDynamicsUnstructuredSettingsDriveAwayMaxAngle(-6.283185308); 293 : : valueObjectRssDynamicsUnstructuredSettings.driveAwayMaxAngle 294 : 13 : = valueObjectRssDynamicsUnstructuredSettingsDriveAwayMaxAngle; 295 : 13 : ::ad::physics::AngularAcceleration valueObjectRssDynamicsUnstructuredSettingsVehicleYawRateChange(-1e2); 296 : : valueObjectRssDynamicsUnstructuredSettings.vehicleYawRateChange 297 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleYawRateChange; 298 : 13 : ::ad::physics::Distance valueObjectRssDynamicsUnstructuredSettingsVehicleMinRadius(-1e9); 299 : : valueObjectRssDynamicsUnstructuredSettings.vehicleMinRadius 300 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleMinRadius; 301 : 13 : ::ad::physics::Duration valueObjectRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(0.); 302 : : valueObjectRssDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 303 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 304 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 305 : : std::numeric_limits<uint32_t>::min()}; 306 : : valueObjectRssDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 307 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 308 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 309 : : std::numeric_limits<uint32_t>::min()}; 310 : : valueObjectRssDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 311 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 312 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 313 : : std::numeric_limits<uint32_t>::min()}; 314 : : valueObjectRssDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 315 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 316 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 317 : : std::numeric_limits<uint32_t>::min()}; 318 : : valueObjectRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 319 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 320 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps{ 321 : : std::numeric_limits<uint32_t>::min()}; 322 : : valueObjectRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateYawRateChangeRatioSteps 323 : 13 : = valueObjectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps; 324 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 325 : : std::numeric_limits<uint32_t>::min()}; 326 : : valueObjectRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 327 : 13 : = valueObjectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 328 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 329 : : std::numeric_limits<uint32_t>::min()}; 330 : : valueObjectRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 331 : 13 : = valueObjectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 332 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 333 : : std::numeric_limits<uint32_t>::min()}; 334 : : valueObjectRssDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 335 : 13 : = valueObjectRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 336 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 337 : : std::numeric_limits<uint32_t>::min()}; 338 : : valueObjectRssDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 339 : 13 : = valueObjectRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 340 : 13 : uint32_t valueObjectRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 341 : : std::numeric_limits<uint32_t>::min()}; 342 : : valueObjectRssDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 343 : 13 : = valueObjectRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 344 : 13 : valueObjectRssDynamics.unstructuredSettings = valueObjectRssDynamicsUnstructuredSettings; 345 : 13 : value.objectRssDynamics = valueObjectRssDynamics; 346 : 26 : ::ad::rss::world::RoadArea valueIntersectingRoad; 347 : 26 : ::ad::rss::world::RoadSegment valueIntersectingRoadElement; 348 : 13 : ::ad::rss::world::LaneSegment valueIntersectingRoadElementElement; 349 : 13 : ::ad::rss::world::LaneSegmentId valueIntersectingRoadElementElementId( 350 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::lowest()); 351 : 13 : valueIntersectingRoadElementElement.id = valueIntersectingRoadElementElementId; 352 : 13 : ::ad::rss::world::LaneSegmentType valueIntersectingRoadElementElementType( 353 : : ::ad::rss::world::LaneSegmentType::Normal); 354 : 13 : valueIntersectingRoadElementElement.type = valueIntersectingRoadElementElementType; 355 : 13 : ::ad::rss::world::LaneDrivingDirection valueIntersectingRoadElementElementDrivingDirection( 356 : : ::ad::rss::world::LaneDrivingDirection::Bidirectional); 357 : 13 : valueIntersectingRoadElementElement.drivingDirection = valueIntersectingRoadElementElementDrivingDirection; 358 : 13 : ::ad::physics::MetricRange valueIntersectingRoadElementElementLength; 359 : 13 : ::ad::physics::Distance valueIntersectingRoadElementElementLengthMinimum(-1e9); 360 : 13 : valueIntersectingRoadElementElementLengthMinimum = ::ad::physics::Distance(0.); // set to valid value within struct 361 : 13 : valueIntersectingRoadElementElementLength.minimum = valueIntersectingRoadElementElementLengthMinimum; 362 : 13 : ::ad::physics::Distance valueIntersectingRoadElementElementLengthMaximum(-1e9); 363 : 13 : valueIntersectingRoadElementElementLength.maximum = valueIntersectingRoadElementElementLengthMaximum; 364 : 13 : valueIntersectingRoadElementElementLength.maximum = valueIntersectingRoadElementElementLength.minimum; 365 : 13 : valueIntersectingRoadElementElementLength.minimum = valueIntersectingRoadElementElementLength.maximum; 366 : 13 : valueIntersectingRoadElementElement.length = valueIntersectingRoadElementElementLength; 367 : 13 : ::ad::physics::MetricRange valueIntersectingRoadElementElementWidth; 368 : 13 : ::ad::physics::Distance valueIntersectingRoadElementElementWidthMinimum(-1e9); 369 : 13 : valueIntersectingRoadElementElementWidthMinimum = ::ad::physics::Distance(0.); // set to valid value within struct 370 : 13 : valueIntersectingRoadElementElementWidth.minimum = valueIntersectingRoadElementElementWidthMinimum; 371 : 13 : ::ad::physics::Distance valueIntersectingRoadElementElementWidthMaximum(-1e9); 372 : 13 : valueIntersectingRoadElementElementWidth.maximum = valueIntersectingRoadElementElementWidthMaximum; 373 : 13 : valueIntersectingRoadElementElementWidth.maximum = valueIntersectingRoadElementElementWidth.minimum; 374 : 13 : valueIntersectingRoadElementElementWidth.minimum = valueIntersectingRoadElementElementWidth.maximum; 375 : 13 : valueIntersectingRoadElementElement.width = valueIntersectingRoadElementElementWidth; 376 [ + - ]: 13 : valueIntersectingRoadElement.resize(1, valueIntersectingRoadElementElement); 377 [ + - ]: 13 : valueIntersectingRoad.resize(1, valueIntersectingRoadElement); 378 [ + - ]: 13 : value.intersectingRoad = valueIntersectingRoad; 379 : 26 : ::ad::rss::world::RoadArea valueEgoVehicleRoad; 380 : 26 : ::ad::rss::world::RoadSegment valueEgoVehicleRoadElement; 381 : 13 : ::ad::rss::world::LaneSegment valueEgoVehicleRoadElementElement; 382 : 13 : ::ad::rss::world::LaneSegmentId valueEgoVehicleRoadElementElementId( 383 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::lowest()); 384 : 13 : valueEgoVehicleRoadElementElement.id = valueEgoVehicleRoadElementElementId; 385 : 13 : ::ad::rss::world::LaneSegmentType valueEgoVehicleRoadElementElementType(::ad::rss::world::LaneSegmentType::Normal); 386 : 13 : valueEgoVehicleRoadElementElement.type = valueEgoVehicleRoadElementElementType; 387 : 13 : ::ad::rss::world::LaneDrivingDirection valueEgoVehicleRoadElementElementDrivingDirection( 388 : : ::ad::rss::world::LaneDrivingDirection::Bidirectional); 389 : 13 : valueEgoVehicleRoadElementElement.drivingDirection = valueEgoVehicleRoadElementElementDrivingDirection; 390 : 13 : ::ad::physics::MetricRange valueEgoVehicleRoadElementElementLength; 391 : 13 : ::ad::physics::Distance valueEgoVehicleRoadElementElementLengthMinimum(-1e9); 392 : 13 : valueEgoVehicleRoadElementElementLengthMinimum = ::ad::physics::Distance(0.); // set to valid value within struct 393 : 13 : valueEgoVehicleRoadElementElementLength.minimum = valueEgoVehicleRoadElementElementLengthMinimum; 394 : 13 : ::ad::physics::Distance valueEgoVehicleRoadElementElementLengthMaximum(-1e9); 395 : 13 : valueEgoVehicleRoadElementElementLength.maximum = valueEgoVehicleRoadElementElementLengthMaximum; 396 : 13 : valueEgoVehicleRoadElementElementLength.maximum = valueEgoVehicleRoadElementElementLength.minimum; 397 : 13 : valueEgoVehicleRoadElementElementLength.minimum = valueEgoVehicleRoadElementElementLength.maximum; 398 : 13 : valueEgoVehicleRoadElementElement.length = valueEgoVehicleRoadElementElementLength; 399 : 13 : ::ad::physics::MetricRange valueEgoVehicleRoadElementElementWidth; 400 : 13 : ::ad::physics::Distance valueEgoVehicleRoadElementElementWidthMinimum(-1e9); 401 : 13 : valueEgoVehicleRoadElementElementWidthMinimum = ::ad::physics::Distance(0.); // set to valid value within struct 402 : 13 : valueEgoVehicleRoadElementElementWidth.minimum = valueEgoVehicleRoadElementElementWidthMinimum; 403 : 13 : ::ad::physics::Distance valueEgoVehicleRoadElementElementWidthMaximum(-1e9); 404 : 13 : valueEgoVehicleRoadElementElementWidth.maximum = valueEgoVehicleRoadElementElementWidthMaximum; 405 : 13 : valueEgoVehicleRoadElementElementWidth.maximum = valueEgoVehicleRoadElementElementWidth.minimum; 406 : 13 : valueEgoVehicleRoadElementElementWidth.minimum = valueEgoVehicleRoadElementElementWidth.maximum; 407 : 13 : valueEgoVehicleRoadElementElement.width = valueEgoVehicleRoadElementElementWidth; 408 [ + - ]: 13 : valueEgoVehicleRoadElement.resize(1, valueEgoVehicleRoadElementElement); 409 [ + - ]: 13 : valueEgoVehicleRoad.resize(1, valueEgoVehicleRoadElement); 410 [ + - ]: 13 : value.egoVehicleRoad = valueEgoVehicleRoad; 411 [ + - ]: 13 : mValue = value; 412 : 13 : } 413 : : 414 : : ::ad::rss::world::Scene mValue; 415 : : }; 416 : : 417 : 2 : TEST_F(SceneTests, copyConstruction) 418 : : { 419 [ + - ]: 2 : ::ad::rss::world::Scene value(mValue); 420 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 421 : 1 : } 422 : : 423 : 2 : TEST_F(SceneTests, moveConstruction) 424 : : { 425 [ + - ]: 2 : ::ad::rss::world::Scene tmpValue(mValue); 426 : 2 : ::ad::rss::world::Scene value(std::move(tmpValue)); 427 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 428 : 1 : } 429 : : 430 : 2 : TEST_F(SceneTests, copyAssignment) 431 : : { 432 : 2 : ::ad::rss::world::Scene value; 433 [ + - ]: 1 : value = mValue; 434 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 435 : 1 : } 436 : : 437 : 2 : TEST_F(SceneTests, moveAssignment) 438 : : { 439 [ + - ]: 2 : ::ad::rss::world::Scene tmpValue(mValue); 440 : 2 : ::ad::rss::world::Scene value; 441 : 1 : value = std::move(tmpValue); 442 [ + - - + : 1 : EXPECT_EQ(mValue, value); - - - - - - ] 443 : 1 : } 444 : : 445 : 2 : TEST_F(SceneTests, comparisonOperatorEqual) 446 : : { 447 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 448 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 449 : : 450 [ + - - + : 1 : EXPECT_TRUE(valueA == valueB); - - - - - - - - ] 451 [ + - - + : 1 : EXPECT_FALSE(valueA != valueB); - - - - - - - - ] 452 : 1 : } 453 : : 454 : 2 : TEST_F(SceneTests, stringConversionTest) 455 : : { 456 [ + - ]: 1 : std::stringstream stream; 457 [ + - ]: 1 : stream << mValue; 458 [ + - ]: 1 : std::string ostreamStr = stream.str(); 459 [ + - ]: 1 : std::string toStr = std::to_string(mValue); 460 [ + - - + : 1 : ASSERT_EQ(ostreamStr, toStr); - - - - - - ] 461 : : } 462 : : 463 : 2 : TEST_F(SceneTests, comparisonOperatorSituationTypeDiffers) 464 : : { 465 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 466 : 1 : ::ad::rss::situation::SituationType situationType(::ad::rss::situation::SituationType::Unstructured); 467 : 1 : valueA.situationType = situationType; 468 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 469 : : 470 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 471 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 472 : 1 : } 473 : : 474 : 2 : TEST_F(SceneTests, comparisonOperatorEgoVehicleDiffers) 475 : : { 476 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 477 : 2 : ::ad::rss::world::Object egoVehicle; 478 : 1 : ::ad::rss::world::ObjectId egoVehicleObjectId(std::numeric_limits<::ad::rss::world::ObjectId>::max()); 479 : 1 : egoVehicle.objectId = egoVehicleObjectId; 480 : 1 : ::ad::rss::world::ObjectType egoVehicleObjectType(::ad::rss::world::ObjectType::ArtificialObject); 481 : 1 : egoVehicle.objectType = egoVehicleObjectType; 482 : 2 : ::ad::rss::world::OccupiedRegionVector egoVehicleOccupiedRegions; 483 : 1 : ::ad::rss::world::OccupiedRegion egoVehicleOccupiedRegionsElement; 484 : 1 : ::ad::rss::world::LaneSegmentId egoVehicleOccupiedRegionsElementSegmentId( 485 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::max()); 486 : 1 : egoVehicleOccupiedRegionsElement.segmentId = egoVehicleOccupiedRegionsElementSegmentId; 487 : 1 : ::ad::physics::ParametricRange egoVehicleOccupiedRegionsElementLonRange; 488 : 1 : ::ad::physics::ParametricValue egoVehicleOccupiedRegionsElementLonRangeMinimum(1.); 489 : 1 : egoVehicleOccupiedRegionsElementLonRange.minimum = egoVehicleOccupiedRegionsElementLonRangeMinimum; 490 : 1 : ::ad::physics::ParametricValue egoVehicleOccupiedRegionsElementLonRangeMaximum(1.); 491 : 1 : egoVehicleOccupiedRegionsElementLonRange.maximum = egoVehicleOccupiedRegionsElementLonRangeMaximum; 492 : 1 : egoVehicleOccupiedRegionsElementLonRange.maximum = egoVehicleOccupiedRegionsElementLonRange.minimum; 493 : 1 : egoVehicleOccupiedRegionsElementLonRange.minimum = egoVehicleOccupiedRegionsElementLonRange.maximum; 494 : 1 : egoVehicleOccupiedRegionsElement.lonRange = egoVehicleOccupiedRegionsElementLonRange; 495 : 1 : ::ad::physics::ParametricRange egoVehicleOccupiedRegionsElementLatRange; 496 : 1 : ::ad::physics::ParametricValue egoVehicleOccupiedRegionsElementLatRangeMinimum(1.); 497 : 1 : egoVehicleOccupiedRegionsElementLatRange.minimum = egoVehicleOccupiedRegionsElementLatRangeMinimum; 498 : 1 : ::ad::physics::ParametricValue egoVehicleOccupiedRegionsElementLatRangeMaximum(1.); 499 : 1 : egoVehicleOccupiedRegionsElementLatRange.maximum = egoVehicleOccupiedRegionsElementLatRangeMaximum; 500 : 1 : egoVehicleOccupiedRegionsElementLatRange.maximum = egoVehicleOccupiedRegionsElementLatRange.minimum; 501 : 1 : egoVehicleOccupiedRegionsElementLatRange.minimum = egoVehicleOccupiedRegionsElementLatRange.maximum; 502 : 1 : egoVehicleOccupiedRegionsElement.latRange = egoVehicleOccupiedRegionsElementLatRange; 503 [ + - ]: 1 : egoVehicleOccupiedRegions.resize(0 + 1, egoVehicleOccupiedRegionsElement); 504 [ + - ]: 1 : egoVehicle.occupiedRegions = egoVehicleOccupiedRegions; 505 : 1 : ::ad::rss::world::Velocity egoVehicleVelocity; 506 : 1 : ::ad::physics::Speed egoVehicleVelocitySpeedLonMin(100.); 507 : 1 : egoVehicleVelocity.speedLonMin = egoVehicleVelocitySpeedLonMin; 508 : 1 : ::ad::physics::Speed egoVehicleVelocitySpeedLonMax(100.); 509 : 1 : egoVehicleVelocity.speedLonMax = egoVehicleVelocitySpeedLonMax; 510 : 1 : ::ad::physics::Speed egoVehicleVelocitySpeedLatMin(100.); 511 : 1 : egoVehicleVelocity.speedLatMin = egoVehicleVelocitySpeedLatMin; 512 : 1 : ::ad::physics::Speed egoVehicleVelocitySpeedLatMax(100.); 513 : 1 : egoVehicleVelocity.speedLatMax = egoVehicleVelocitySpeedLatMax; 514 : 1 : egoVehicleVelocity.speedLatMax = egoVehicleVelocity.speedLatMin; 515 : 1 : egoVehicleVelocity.speedLonMax = egoVehicleVelocity.speedLonMin; 516 : 1 : egoVehicleVelocity.speedLatMin = egoVehicleVelocity.speedLatMax; 517 : 1 : egoVehicleVelocity.speedLonMin = egoVehicleVelocity.speedLonMax; 518 : 1 : egoVehicle.velocity = egoVehicleVelocity; 519 : 1 : ::ad::rss::world::ObjectState egoVehicleState; 520 : 1 : ::ad::physics::Angle egoVehicleStateYaw(6.283185308); 521 : 1 : egoVehicleState.yaw = egoVehicleStateYaw; 522 : 1 : ::ad::physics::Dimension2D egoVehicleStateDimension; 523 : 1 : ::ad::physics::Distance egoVehicleStateDimensionLength(1e9); 524 : 1 : egoVehicleStateDimension.length = egoVehicleStateDimensionLength; 525 : 1 : ::ad::physics::Distance egoVehicleStateDimensionWidth(1e9); 526 : 1 : egoVehicleStateDimension.width = egoVehicleStateDimensionWidth; 527 : 1 : egoVehicleState.dimension = egoVehicleStateDimension; 528 : 1 : ::ad::physics::AngularVelocity egoVehicleStateYawRate(100.); 529 : 1 : egoVehicleState.yawRate = egoVehicleStateYawRate; 530 : 1 : ::ad::physics::Distance2D egoVehicleStateCenterPoint; 531 : 1 : ::ad::physics::Distance egoVehicleStateCenterPointX(1e9); 532 : 1 : egoVehicleStateCenterPoint.x = egoVehicleStateCenterPointX; 533 : 1 : ::ad::physics::Distance egoVehicleStateCenterPointY(1e9); 534 : 1 : egoVehicleStateCenterPoint.y = egoVehicleStateCenterPointY; 535 : 1 : egoVehicleState.centerPoint = egoVehicleStateCenterPoint; 536 : 1 : ::ad::physics::Speed egoVehicleStateSpeed(100.); 537 : 1 : egoVehicleState.speed = egoVehicleStateSpeed; 538 : 1 : ::ad::physics::Angle egoVehicleStateSteeringAngle(6.283185308); 539 : 1 : egoVehicleState.steeringAngle = egoVehicleStateSteeringAngle; 540 : 1 : egoVehicle.state = egoVehicleState; 541 [ + - ]: 1 : valueA.egoVehicle = egoVehicle; 542 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 543 : : 544 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 545 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 546 : 1 : } 547 : : 548 : 2 : TEST_F(SceneTests, comparisonOperatorEgoVehicleRssDynamicsDiffers) 549 : : { 550 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 551 : 1 : ::ad::rss::world::RssDynamics egoVehicleRssDynamics; 552 : 1 : ::ad::rss::world::LongitudinalRssAccelerationValues egoVehicleRssDynamicsAlphaLon; 553 : 1 : ::ad::physics::Acceleration egoVehicleRssDynamicsAlphaLonAccelMax(1e2); 554 : 1 : egoVehicleRssDynamicsAlphaLon.accelMax = egoVehicleRssDynamicsAlphaLonAccelMax; 555 : 1 : ::ad::physics::Acceleration egoVehicleRssDynamicsAlphaLonBrakeMax(1e2); 556 : 1 : egoVehicleRssDynamicsAlphaLon.brakeMax = egoVehicleRssDynamicsAlphaLonBrakeMax; 557 : 1 : ::ad::physics::Acceleration egoVehicleRssDynamicsAlphaLonBrakeMin(1e2); 558 : 1 : egoVehicleRssDynamicsAlphaLon.brakeMin = egoVehicleRssDynamicsAlphaLonBrakeMin; 559 : 1 : ::ad::physics::Acceleration egoVehicleRssDynamicsAlphaLonBrakeMinCorrect(1e2); 560 : : egoVehicleRssDynamicsAlphaLonBrakeMinCorrect 561 : 1 : = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 562 : 1 : egoVehicleRssDynamicsAlphaLon.brakeMinCorrect = egoVehicleRssDynamicsAlphaLonBrakeMinCorrect; 563 : 1 : egoVehicleRssDynamicsAlphaLon.brakeMinCorrect = egoVehicleRssDynamicsAlphaLon.brakeMin; 564 : 1 : egoVehicleRssDynamicsAlphaLon.brakeMin = egoVehicleRssDynamicsAlphaLon.brakeMax; 565 : 1 : egoVehicleRssDynamicsAlphaLon.brakeMax = egoVehicleRssDynamicsAlphaLon.brakeMin; 566 : 1 : egoVehicleRssDynamicsAlphaLon.brakeMin = egoVehicleRssDynamicsAlphaLon.brakeMinCorrect; 567 : 1 : egoVehicleRssDynamics.alphaLon = egoVehicleRssDynamicsAlphaLon; 568 : 1 : ::ad::rss::world::LateralRssAccelerationValues egoVehicleRssDynamicsAlphaLat; 569 : 1 : ::ad::physics::Acceleration egoVehicleRssDynamicsAlphaLatAccelMax(1e2); 570 : 1 : egoVehicleRssDynamicsAlphaLat.accelMax = egoVehicleRssDynamicsAlphaLatAccelMax; 571 : 1 : ::ad::physics::Acceleration egoVehicleRssDynamicsAlphaLatBrakeMin(1e2); 572 : 1 : egoVehicleRssDynamicsAlphaLatBrakeMin = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 573 : 1 : egoVehicleRssDynamicsAlphaLat.brakeMin = egoVehicleRssDynamicsAlphaLatBrakeMin; 574 : 1 : egoVehicleRssDynamics.alphaLat = egoVehicleRssDynamicsAlphaLat; 575 : 1 : ::ad::physics::Distance egoVehicleRssDynamicsLateralFluctuationMargin(1e9); 576 : 1 : egoVehicleRssDynamicsLateralFluctuationMargin = ::ad::physics::Distance(1.); // set to valid value within struct 577 : 1 : egoVehicleRssDynamics.lateralFluctuationMargin = egoVehicleRssDynamicsLateralFluctuationMargin; 578 : 1 : ::ad::physics::Duration egoVehicleRssDynamicsResponseTime(1e6); 579 : 1 : egoVehicleRssDynamicsResponseTime = ::ad::physics::Duration(10.); // set to valid value within struct 580 : 1 : egoVehicleRssDynamics.responseTime = egoVehicleRssDynamicsResponseTime; 581 : 1 : ::ad::physics::Speed egoVehicleRssDynamicsMaxSpeedOnAcceleration(100.); 582 : 1 : egoVehicleRssDynamics.maxSpeedOnAcceleration = egoVehicleRssDynamicsMaxSpeedOnAcceleration; 583 : 1 : ::ad::rss::world::UnstructuredSettings egoVehicleRssDynamicsUnstructuredSettings; 584 : 1 : ::ad::physics::Distance egoVehicleRssDynamicsUnstructuredSettingsPedestrianTurningRadius(1e9); 585 : : egoVehicleRssDynamicsUnstructuredSettings.pedestrianTurningRadius 586 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsPedestrianTurningRadius; 587 : 1 : ::ad::physics::Angle egoVehicleRssDynamicsUnstructuredSettingsDriveAwayMaxAngle(6.283185308); 588 : : egoVehicleRssDynamicsUnstructuredSettings.driveAwayMaxAngle 589 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsDriveAwayMaxAngle; 590 : 1 : ::ad::physics::AngularAcceleration egoVehicleRssDynamicsUnstructuredSettingsVehicleYawRateChange(1e2); 591 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleYawRateChange 592 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleYawRateChange; 593 : 1 : ::ad::physics::Distance egoVehicleRssDynamicsUnstructuredSettingsVehicleMinRadius(1e9); 594 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleMinRadius 595 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleMinRadius; 596 : 1 : ::ad::physics::Duration egoVehicleRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(1e6); 597 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 598 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 599 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 600 : : std::numeric_limits<uint32_t>::max()}; 601 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 602 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 603 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 604 : : std::numeric_limits<uint32_t>::max()}; 605 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 606 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 607 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 608 : : std::numeric_limits<uint32_t>::max()}; 609 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 610 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 611 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 612 : : std::numeric_limits<uint32_t>::max()}; 613 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 614 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 615 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps{ 616 : : std::numeric_limits<uint32_t>::max()}; 617 : : egoVehicleRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateYawRateChangeRatioSteps 618 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps; 619 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 620 : : std::numeric_limits<uint32_t>::max()}; 621 : : egoVehicleRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 622 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 623 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 624 : : std::numeric_limits<uint32_t>::max()}; 625 : : egoVehicleRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 626 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 627 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 628 : : std::numeric_limits<uint32_t>::max()}; 629 : : egoVehicleRssDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 630 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 631 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 632 : : std::numeric_limits<uint32_t>::max()}; 633 : : egoVehicleRssDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 634 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 635 : 1 : uint32_t egoVehicleRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 636 : : std::numeric_limits<uint32_t>::max()}; 637 : : egoVehicleRssDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 638 : 1 : = egoVehicleRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 639 : 1 : egoVehicleRssDynamics.unstructuredSettings = egoVehicleRssDynamicsUnstructuredSettings; 640 : 1 : valueA.egoVehicleRssDynamics = egoVehicleRssDynamics; 641 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 642 : : 643 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 644 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 645 : 1 : } 646 : : 647 : 2 : TEST_F(SceneTests, comparisonOperatorObjectDiffers) 648 : : { 649 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 650 : 2 : ::ad::rss::world::Object object; 651 : 1 : ::ad::rss::world::ObjectId objectObjectId(std::numeric_limits<::ad::rss::world::ObjectId>::max()); 652 : 1 : object.objectId = objectObjectId; 653 : 1 : ::ad::rss::world::ObjectType objectObjectType(::ad::rss::world::ObjectType::ArtificialObject); 654 : 1 : object.objectType = objectObjectType; 655 : 2 : ::ad::rss::world::OccupiedRegionVector objectOccupiedRegions; 656 : 1 : ::ad::rss::world::OccupiedRegion objectOccupiedRegionsElement; 657 : 1 : ::ad::rss::world::LaneSegmentId objectOccupiedRegionsElementSegmentId( 658 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::max()); 659 : 1 : objectOccupiedRegionsElement.segmentId = objectOccupiedRegionsElementSegmentId; 660 : 1 : ::ad::physics::ParametricRange objectOccupiedRegionsElementLonRange; 661 : 1 : ::ad::physics::ParametricValue objectOccupiedRegionsElementLonRangeMinimum(1.); 662 : 1 : objectOccupiedRegionsElementLonRange.minimum = objectOccupiedRegionsElementLonRangeMinimum; 663 : 1 : ::ad::physics::ParametricValue objectOccupiedRegionsElementLonRangeMaximum(1.); 664 : 1 : objectOccupiedRegionsElementLonRange.maximum = objectOccupiedRegionsElementLonRangeMaximum; 665 : 1 : objectOccupiedRegionsElementLonRange.maximum = objectOccupiedRegionsElementLonRange.minimum; 666 : 1 : objectOccupiedRegionsElementLonRange.minimum = objectOccupiedRegionsElementLonRange.maximum; 667 : 1 : objectOccupiedRegionsElement.lonRange = objectOccupiedRegionsElementLonRange; 668 : 1 : ::ad::physics::ParametricRange objectOccupiedRegionsElementLatRange; 669 : 1 : ::ad::physics::ParametricValue objectOccupiedRegionsElementLatRangeMinimum(1.); 670 : 1 : objectOccupiedRegionsElementLatRange.minimum = objectOccupiedRegionsElementLatRangeMinimum; 671 : 1 : ::ad::physics::ParametricValue objectOccupiedRegionsElementLatRangeMaximum(1.); 672 : 1 : objectOccupiedRegionsElementLatRange.maximum = objectOccupiedRegionsElementLatRangeMaximum; 673 : 1 : objectOccupiedRegionsElementLatRange.maximum = objectOccupiedRegionsElementLatRange.minimum; 674 : 1 : objectOccupiedRegionsElementLatRange.minimum = objectOccupiedRegionsElementLatRange.maximum; 675 : 1 : objectOccupiedRegionsElement.latRange = objectOccupiedRegionsElementLatRange; 676 [ + - ]: 1 : objectOccupiedRegions.resize(0 + 1, objectOccupiedRegionsElement); 677 [ + - ]: 1 : object.occupiedRegions = objectOccupiedRegions; 678 : 1 : ::ad::rss::world::Velocity objectVelocity; 679 : 1 : ::ad::physics::Speed objectVelocitySpeedLonMin(100.); 680 : 1 : objectVelocity.speedLonMin = objectVelocitySpeedLonMin; 681 : 1 : ::ad::physics::Speed objectVelocitySpeedLonMax(100.); 682 : 1 : objectVelocity.speedLonMax = objectVelocitySpeedLonMax; 683 : 1 : ::ad::physics::Speed objectVelocitySpeedLatMin(100.); 684 : 1 : objectVelocity.speedLatMin = objectVelocitySpeedLatMin; 685 : 1 : ::ad::physics::Speed objectVelocitySpeedLatMax(100.); 686 : 1 : objectVelocity.speedLatMax = objectVelocitySpeedLatMax; 687 : 1 : objectVelocity.speedLatMax = objectVelocity.speedLatMin; 688 : 1 : objectVelocity.speedLonMax = objectVelocity.speedLonMin; 689 : 1 : objectVelocity.speedLatMin = objectVelocity.speedLatMax; 690 : 1 : objectVelocity.speedLonMin = objectVelocity.speedLonMax; 691 : 1 : object.velocity = objectVelocity; 692 : 1 : ::ad::rss::world::ObjectState objectState; 693 : 1 : ::ad::physics::Angle objectStateYaw(6.283185308); 694 : 1 : objectState.yaw = objectStateYaw; 695 : 1 : ::ad::physics::Dimension2D objectStateDimension; 696 : 1 : ::ad::physics::Distance objectStateDimensionLength(1e9); 697 : 1 : objectStateDimension.length = objectStateDimensionLength; 698 : 1 : ::ad::physics::Distance objectStateDimensionWidth(1e9); 699 : 1 : objectStateDimension.width = objectStateDimensionWidth; 700 : 1 : objectState.dimension = objectStateDimension; 701 : 1 : ::ad::physics::AngularVelocity objectStateYawRate(100.); 702 : 1 : objectState.yawRate = objectStateYawRate; 703 : 1 : ::ad::physics::Distance2D objectStateCenterPoint; 704 : 1 : ::ad::physics::Distance objectStateCenterPointX(1e9); 705 : 1 : objectStateCenterPoint.x = objectStateCenterPointX; 706 : 1 : ::ad::physics::Distance objectStateCenterPointY(1e9); 707 : 1 : objectStateCenterPoint.y = objectStateCenterPointY; 708 : 1 : objectState.centerPoint = objectStateCenterPoint; 709 : 1 : ::ad::physics::Speed objectStateSpeed(100.); 710 : 1 : objectState.speed = objectStateSpeed; 711 : 1 : ::ad::physics::Angle objectStateSteeringAngle(6.283185308); 712 : 1 : objectState.steeringAngle = objectStateSteeringAngle; 713 : 1 : object.state = objectState; 714 [ + - ]: 1 : valueA.object = object; 715 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 716 : : 717 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 718 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 719 : 1 : } 720 : : 721 : 2 : TEST_F(SceneTests, comparisonOperatorObjectRssDynamicsDiffers) 722 : : { 723 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 724 : 1 : ::ad::rss::world::RssDynamics objectRssDynamics; 725 : 1 : ::ad::rss::world::LongitudinalRssAccelerationValues objectRssDynamicsAlphaLon; 726 : 1 : ::ad::physics::Acceleration objectRssDynamicsAlphaLonAccelMax(1e2); 727 : 1 : objectRssDynamicsAlphaLon.accelMax = objectRssDynamicsAlphaLonAccelMax; 728 : 1 : ::ad::physics::Acceleration objectRssDynamicsAlphaLonBrakeMax(1e2); 729 : 1 : objectRssDynamicsAlphaLon.brakeMax = objectRssDynamicsAlphaLonBrakeMax; 730 : 1 : ::ad::physics::Acceleration objectRssDynamicsAlphaLonBrakeMin(1e2); 731 : 1 : objectRssDynamicsAlphaLon.brakeMin = objectRssDynamicsAlphaLonBrakeMin; 732 : 1 : ::ad::physics::Acceleration objectRssDynamicsAlphaLonBrakeMinCorrect(1e2); 733 : 1 : objectRssDynamicsAlphaLonBrakeMinCorrect = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 734 : 1 : objectRssDynamicsAlphaLon.brakeMinCorrect = objectRssDynamicsAlphaLonBrakeMinCorrect; 735 : 1 : objectRssDynamicsAlphaLon.brakeMinCorrect = objectRssDynamicsAlphaLon.brakeMin; 736 : 1 : objectRssDynamicsAlphaLon.brakeMin = objectRssDynamicsAlphaLon.brakeMax; 737 : 1 : objectRssDynamicsAlphaLon.brakeMax = objectRssDynamicsAlphaLon.brakeMin; 738 : 1 : objectRssDynamicsAlphaLon.brakeMin = objectRssDynamicsAlphaLon.brakeMinCorrect; 739 : 1 : objectRssDynamics.alphaLon = objectRssDynamicsAlphaLon; 740 : 1 : ::ad::rss::world::LateralRssAccelerationValues objectRssDynamicsAlphaLat; 741 : 1 : ::ad::physics::Acceleration objectRssDynamicsAlphaLatAccelMax(1e2); 742 : 1 : objectRssDynamicsAlphaLat.accelMax = objectRssDynamicsAlphaLatAccelMax; 743 : 1 : ::ad::physics::Acceleration objectRssDynamicsAlphaLatBrakeMin(1e2); 744 : 1 : objectRssDynamicsAlphaLatBrakeMin = ::ad::physics::Acceleration(0. * 0.9); // set to valid value within struct 745 : 1 : objectRssDynamicsAlphaLat.brakeMin = objectRssDynamicsAlphaLatBrakeMin; 746 : 1 : objectRssDynamics.alphaLat = objectRssDynamicsAlphaLat; 747 : 1 : ::ad::physics::Distance objectRssDynamicsLateralFluctuationMargin(1e9); 748 : 1 : objectRssDynamicsLateralFluctuationMargin = ::ad::physics::Distance(1.); // set to valid value within struct 749 : 1 : objectRssDynamics.lateralFluctuationMargin = objectRssDynamicsLateralFluctuationMargin; 750 : 1 : ::ad::physics::Duration objectRssDynamicsResponseTime(1e6); 751 : 1 : objectRssDynamicsResponseTime = ::ad::physics::Duration(10.); // set to valid value within struct 752 : 1 : objectRssDynamics.responseTime = objectRssDynamicsResponseTime; 753 : 1 : ::ad::physics::Speed objectRssDynamicsMaxSpeedOnAcceleration(100.); 754 : 1 : objectRssDynamics.maxSpeedOnAcceleration = objectRssDynamicsMaxSpeedOnAcceleration; 755 : 1 : ::ad::rss::world::UnstructuredSettings objectRssDynamicsUnstructuredSettings; 756 : 1 : ::ad::physics::Distance objectRssDynamicsUnstructuredSettingsPedestrianTurningRadius(1e9); 757 : : objectRssDynamicsUnstructuredSettings.pedestrianTurningRadius 758 : 1 : = objectRssDynamicsUnstructuredSettingsPedestrianTurningRadius; 759 : 1 : ::ad::physics::Angle objectRssDynamicsUnstructuredSettingsDriveAwayMaxAngle(6.283185308); 760 : 1 : objectRssDynamicsUnstructuredSettings.driveAwayMaxAngle = objectRssDynamicsUnstructuredSettingsDriveAwayMaxAngle; 761 : 1 : ::ad::physics::AngularAcceleration objectRssDynamicsUnstructuredSettingsVehicleYawRateChange(1e2); 762 : : objectRssDynamicsUnstructuredSettings.vehicleYawRateChange 763 : 1 : = objectRssDynamicsUnstructuredSettingsVehicleYawRateChange; 764 : 1 : ::ad::physics::Distance objectRssDynamicsUnstructuredSettingsVehicleMinRadius(1e9); 765 : 1 : objectRssDynamicsUnstructuredSettings.vehicleMinRadius = objectRssDynamicsUnstructuredSettingsVehicleMinRadius; 766 : 1 : ::ad::physics::Duration objectRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep(1e6); 767 : : objectRssDynamicsUnstructuredSettings.vehicleTrajectoryCalculationStep 768 : 1 : = objectRssDynamicsUnstructuredSettingsVehicleTrajectoryCalculationStep; 769 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps{ 770 : : std::numeric_limits<uint32_t>::max()}; 771 : : objectRssDynamicsUnstructuredSettings.vehicleFrontIntermediateYawRateChangeRatioSteps 772 : 1 : = objectRssDynamicsUnstructuredSettingsVehicleFrontIntermediateYawRateChangeRatioSteps; 773 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps{ 774 : : std::numeric_limits<uint32_t>::max()}; 775 : : objectRssDynamicsUnstructuredSettings.vehicleBackIntermediateYawRateChangeRatioSteps 776 : 1 : = objectRssDynamicsUnstructuredSettingsVehicleBackIntermediateYawRateChangeRatioSteps; 777 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps{ 778 : : std::numeric_limits<uint32_t>::max()}; 779 : : objectRssDynamicsUnstructuredSettings.vehicleBrakeIntermediateAccelerationSteps 780 : 1 : = objectRssDynamicsUnstructuredSettingsVehicleBrakeIntermediateAccelerationSteps; 781 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps{ 782 : : std::numeric_limits<uint32_t>::max()}; 783 : : objectRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateAccelerationSteps 784 : 1 : = objectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateAccelerationSteps; 785 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps{ 786 : : std::numeric_limits<uint32_t>::max()}; 787 : : objectRssDynamicsUnstructuredSettings.vehicleContinueForwardIntermediateYawRateChangeRatioSteps 788 : 1 : = objectRssDynamicsUnstructuredSettingsVehicleContinueForwardIntermediateYawRateChangeRatioSteps; 789 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps{ 790 : : std::numeric_limits<uint32_t>::max()}; 791 : : objectRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateHeadingChangeRatioSteps 792 : 1 : = objectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateHeadingChangeRatioSteps; 793 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps{ 794 : : std::numeric_limits<uint32_t>::max()}; 795 : : objectRssDynamicsUnstructuredSettings.pedestrianContinueForwardIntermediateAccelerationSteps 796 : 1 : = objectRssDynamicsUnstructuredSettingsPedestrianContinueForwardIntermediateAccelerationSteps; 797 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps{ 798 : : std::numeric_limits<uint32_t>::max()}; 799 : : objectRssDynamicsUnstructuredSettings.pedestrianBrakeIntermediateAccelerationSteps 800 : 1 : = objectRssDynamicsUnstructuredSettingsPedestrianBrakeIntermediateAccelerationSteps; 801 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps{ 802 : : std::numeric_limits<uint32_t>::max()}; 803 : : objectRssDynamicsUnstructuredSettings.pedestrianFrontIntermediateHeadingChangeRatioSteps 804 : 1 : = objectRssDynamicsUnstructuredSettingsPedestrianFrontIntermediateHeadingChangeRatioSteps; 805 : 1 : uint32_t objectRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps{ 806 : : std::numeric_limits<uint32_t>::max()}; 807 : : objectRssDynamicsUnstructuredSettings.pedestrianBackIntermediateHeadingChangeRatioSteps 808 : 1 : = objectRssDynamicsUnstructuredSettingsPedestrianBackIntermediateHeadingChangeRatioSteps; 809 : 1 : objectRssDynamics.unstructuredSettings = objectRssDynamicsUnstructuredSettings; 810 : 1 : valueA.objectRssDynamics = objectRssDynamics; 811 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 812 : : 813 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 814 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 815 : 1 : } 816 : : 817 : 2 : TEST_F(SceneTests, comparisonOperatorIntersectingRoadDiffers) 818 : : { 819 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 820 : 2 : ::ad::rss::world::RoadArea intersectingRoad; 821 : 2 : ::ad::rss::world::RoadSegment intersectingRoadElement; 822 : 1 : ::ad::rss::world::LaneSegment intersectingRoadElementElement; 823 : 1 : ::ad::rss::world::LaneSegmentId intersectingRoadElementElementId( 824 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::max()); 825 : 1 : intersectingRoadElementElement.id = intersectingRoadElementElementId; 826 : 1 : ::ad::rss::world::LaneSegmentType intersectingRoadElementElementType(::ad::rss::world::LaneSegmentType::Intersection); 827 : 1 : intersectingRoadElementElement.type = intersectingRoadElementElementType; 828 : 1 : ::ad::rss::world::LaneDrivingDirection intersectingRoadElementElementDrivingDirection( 829 : : ::ad::rss::world::LaneDrivingDirection::Negative); 830 : 1 : intersectingRoadElementElement.drivingDirection = intersectingRoadElementElementDrivingDirection; 831 : 1 : ::ad::physics::MetricRange intersectingRoadElementElementLength; 832 : 1 : ::ad::physics::Distance intersectingRoadElementElementLengthMinimum(1e9); 833 : 1 : intersectingRoadElementElementLength.minimum = intersectingRoadElementElementLengthMinimum; 834 : 1 : ::ad::physics::Distance intersectingRoadElementElementLengthMaximum(1e9); 835 : 1 : intersectingRoadElementElementLengthMaximum = ::ad::physics::Distance(1e6); // set to valid value within struct 836 : 1 : intersectingRoadElementElementLength.maximum = intersectingRoadElementElementLengthMaximum; 837 : 1 : intersectingRoadElementElementLength.maximum = intersectingRoadElementElementLength.minimum; 838 : 1 : intersectingRoadElementElementLength.minimum = intersectingRoadElementElementLength.maximum; 839 : 1 : intersectingRoadElementElement.length = intersectingRoadElementElementLength; 840 : 1 : ::ad::physics::MetricRange intersectingRoadElementElementWidth; 841 : 1 : ::ad::physics::Distance intersectingRoadElementElementWidthMinimum(1e9); 842 : 1 : intersectingRoadElementElementWidth.minimum = intersectingRoadElementElementWidthMinimum; 843 : 1 : ::ad::physics::Distance intersectingRoadElementElementWidthMaximum(1e9); 844 : 1 : intersectingRoadElementElementWidthMaximum = ::ad::physics::Distance(1e6); // set to valid value within struct 845 : 1 : intersectingRoadElementElementWidth.maximum = intersectingRoadElementElementWidthMaximum; 846 : 1 : intersectingRoadElementElementWidth.maximum = intersectingRoadElementElementWidth.minimum; 847 : 1 : intersectingRoadElementElementWidth.minimum = intersectingRoadElementElementWidth.maximum; 848 : 1 : intersectingRoadElementElement.width = intersectingRoadElementElementWidth; 849 [ + - ]: 1 : intersectingRoadElement.resize(1 + 1, intersectingRoadElementElement); 850 [ + - ]: 1 : intersectingRoad.resize(0 + 1, intersectingRoadElement); 851 [ + - ]: 1 : valueA.intersectingRoad = intersectingRoad; 852 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 853 : : 854 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 855 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 856 : 1 : } 857 : : 858 : 2 : TEST_F(SceneTests, comparisonOperatorEgoVehicleRoadDiffers) 859 : : { 860 [ + - ]: 2 : ::ad::rss::world::Scene valueA = mValue; 861 : 2 : ::ad::rss::world::RoadArea egoVehicleRoad; 862 : 2 : ::ad::rss::world::RoadSegment egoVehicleRoadElement; 863 : 1 : ::ad::rss::world::LaneSegment egoVehicleRoadElementElement; 864 : 1 : ::ad::rss::world::LaneSegmentId egoVehicleRoadElementElementId( 865 : : std::numeric_limits<::ad::rss::world::LaneSegmentId>::max()); 866 : 1 : egoVehicleRoadElementElement.id = egoVehicleRoadElementElementId; 867 : 1 : ::ad::rss::world::LaneSegmentType egoVehicleRoadElementElementType(::ad::rss::world::LaneSegmentType::Intersection); 868 : 1 : egoVehicleRoadElementElement.type = egoVehicleRoadElementElementType; 869 : 1 : ::ad::rss::world::LaneDrivingDirection egoVehicleRoadElementElementDrivingDirection( 870 : : ::ad::rss::world::LaneDrivingDirection::Negative); 871 : 1 : egoVehicleRoadElementElement.drivingDirection = egoVehicleRoadElementElementDrivingDirection; 872 : 1 : ::ad::physics::MetricRange egoVehicleRoadElementElementLength; 873 : 1 : ::ad::physics::Distance egoVehicleRoadElementElementLengthMinimum(1e9); 874 : 1 : egoVehicleRoadElementElementLength.minimum = egoVehicleRoadElementElementLengthMinimum; 875 : 1 : ::ad::physics::Distance egoVehicleRoadElementElementLengthMaximum(1e9); 876 : 1 : egoVehicleRoadElementElementLengthMaximum = ::ad::physics::Distance(1e6); // set to valid value within struct 877 : 1 : egoVehicleRoadElementElementLength.maximum = egoVehicleRoadElementElementLengthMaximum; 878 : 1 : egoVehicleRoadElementElementLength.maximum = egoVehicleRoadElementElementLength.minimum; 879 : 1 : egoVehicleRoadElementElementLength.minimum = egoVehicleRoadElementElementLength.maximum; 880 : 1 : egoVehicleRoadElementElement.length = egoVehicleRoadElementElementLength; 881 : 1 : ::ad::physics::MetricRange egoVehicleRoadElementElementWidth; 882 : 1 : ::ad::physics::Distance egoVehicleRoadElementElementWidthMinimum(1e9); 883 : 1 : egoVehicleRoadElementElementWidth.minimum = egoVehicleRoadElementElementWidthMinimum; 884 : 1 : ::ad::physics::Distance egoVehicleRoadElementElementWidthMaximum(1e9); 885 : 1 : egoVehicleRoadElementElementWidthMaximum = ::ad::physics::Distance(1e6); // set to valid value within struct 886 : 1 : egoVehicleRoadElementElementWidth.maximum = egoVehicleRoadElementElementWidthMaximum; 887 : 1 : egoVehicleRoadElementElementWidth.maximum = egoVehicleRoadElementElementWidth.minimum; 888 : 1 : egoVehicleRoadElementElementWidth.minimum = egoVehicleRoadElementElementWidth.maximum; 889 : 1 : egoVehicleRoadElementElement.width = egoVehicleRoadElementElementWidth; 890 [ + - ]: 1 : egoVehicleRoadElement.resize(1 + 1, egoVehicleRoadElementElement); 891 [ + - ]: 1 : egoVehicleRoad.resize(0 + 1, egoVehicleRoadElement); 892 [ + - ]: 1 : valueA.egoVehicleRoad = egoVehicleRoad; 893 [ + - ]: 2 : ::ad::rss::world::Scene valueB = mValue; 894 : : 895 [ + - - + : 1 : EXPECT_FALSE(valueA == valueB); - - - - - - - - ] 896 [ + - - + : 1 : EXPECT_TRUE(valueA != valueB); - - - - - - - - ] 897 : 1 : } 898 : : 899 : : #if defined(__clang__) && (__clang_major__ >= 7) 900 : : #pragma GCC diagnostic pop 901 : : #endif