LCOV - code coverage report
Current view: top level - tests/generated/ad/rss/world - ObjectStateValidInputRangeTests.cpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 351 351 100.0 %
Date: 2024-12-17 12:06:18 Functions: 34 34 100.0 %
Branches: 34 204 16.7 %

           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                 :            : #include <gtest/gtest.h>
      16                 :            : 
      17                 :            : #include <limits>
      18                 :            : 
      19                 :            : #include "ad/rss/world/ObjectStateValidInputRange.hpp"
      20                 :            : 
      21                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRange)
      22                 :            : {
      23                 :          1 :   ::ad::rss::world::ObjectState value;
      24                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
      25                 :          1 :   value.yaw = valueYaw;
      26                 :          1 :   ::ad::physics::Dimension2D valueDimension;
      27                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
      28                 :          1 :   valueDimension.length = valueDimensionLength;
      29                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
      30                 :          1 :   valueDimension.width = valueDimensionWidth;
      31                 :          1 :   value.dimension = valueDimension;
      32                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
      33                 :          1 :   value.yawRate = valueYawRate;
      34                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
      35                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
      36                 :          1 :   valueCenterPoint.x = valueCenterPointX;
      37                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
      38                 :          1 :   valueCenterPoint.y = valueCenterPointY;
      39                 :          1 :   value.centerPoint = valueCenterPoint;
      40                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
      41                 :          1 :   value.speed = valueSpeed;
      42                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
      43                 :          1 :   value.steeringAngle = valueSteeringAngle;
      44   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
      45                 :            : }
      46                 :            : 
      47                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeYawTooSmall)
      48                 :            : {
      49                 :          1 :   ::ad::rss::world::ObjectState value;
      50                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
      51                 :          1 :   value.yaw = valueYaw;
      52                 :          1 :   ::ad::physics::Dimension2D valueDimension;
      53                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
      54                 :          1 :   valueDimension.length = valueDimensionLength;
      55                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
      56                 :          1 :   valueDimension.width = valueDimensionWidth;
      57                 :          1 :   value.dimension = valueDimension;
      58                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
      59                 :          1 :   value.yawRate = valueYawRate;
      60                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
      61                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
      62                 :          1 :   valueCenterPoint.x = valueCenterPointX;
      63                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
      64                 :          1 :   valueCenterPoint.y = valueCenterPointY;
      65                 :          1 :   value.centerPoint = valueCenterPoint;
      66                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
      67                 :          1 :   value.speed = valueSpeed;
      68                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
      69                 :          1 :   value.steeringAngle = valueSteeringAngle;
      70                 :            : 
      71                 :            :   // override member with data type value below input range minimum
      72                 :          1 :   ::ad::physics::Angle invalidInitializedMember(-6.283185308 * 1.1);
      73                 :          1 :   value.yaw = invalidInitializedMember;
      74   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
      75                 :            : }
      76                 :            : 
      77                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeYawTooBig)
      78                 :            : {
      79                 :          1 :   ::ad::rss::world::ObjectState value;
      80                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
      81                 :          1 :   value.yaw = valueYaw;
      82                 :          1 :   ::ad::physics::Dimension2D valueDimension;
      83                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
      84                 :          1 :   valueDimension.length = valueDimensionLength;
      85                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
      86                 :          1 :   valueDimension.width = valueDimensionWidth;
      87                 :          1 :   value.dimension = valueDimension;
      88                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
      89                 :          1 :   value.yawRate = valueYawRate;
      90                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
      91                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
      92                 :          1 :   valueCenterPoint.x = valueCenterPointX;
      93                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
      94                 :          1 :   valueCenterPoint.y = valueCenterPointY;
      95                 :          1 :   value.centerPoint = valueCenterPoint;
      96                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
      97                 :          1 :   value.speed = valueSpeed;
      98                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
      99                 :          1 :   value.steeringAngle = valueSteeringAngle;
     100                 :            : 
     101                 :            :   // override member with data type value above input range maximum
     102                 :          1 :   ::ad::physics::Angle invalidInitializedMember(6.283185308 * 1.1);
     103                 :          1 :   value.yaw = invalidInitializedMember;
     104   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     105                 :            : }
     106                 :            : 
     107                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeyawDefault)
     108                 :            : {
     109                 :          1 :   ::ad::rss::world::ObjectState value;
     110                 :          1 :   ::ad::physics::Angle valueDefault;
     111                 :          1 :   value.yaw = valueDefault;
     112   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     113                 :            : }
     114                 :            : 
     115                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeDimensionTooSmall)
     116                 :            : {
     117                 :          1 :   ::ad::rss::world::ObjectState value;
     118                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     119                 :          1 :   value.yaw = valueYaw;
     120                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     121                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     122                 :          1 :   valueDimension.length = valueDimensionLength;
     123                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     124                 :          1 :   valueDimension.width = valueDimensionWidth;
     125                 :          1 :   value.dimension = valueDimension;
     126                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     127                 :          1 :   value.yawRate = valueYawRate;
     128                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     129                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     130                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     131                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     132                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     133                 :          1 :   value.centerPoint = valueCenterPoint;
     134                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     135                 :          1 :   value.speed = valueSpeed;
     136                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     137                 :          1 :   value.steeringAngle = valueSteeringAngle;
     138                 :            : 
     139                 :            :   // override member with data type value below input range minimum
     140                 :          1 :   ::ad::physics::Dimension2D invalidInitializedMember;
     141                 :          1 :   ::ad::physics::Distance invalidInitializedMemberLength(-1e9 * 1.1);
     142                 :          1 :   invalidInitializedMember.length = invalidInitializedMemberLength;
     143                 :          1 :   value.dimension = invalidInitializedMember;
     144   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     145                 :            : }
     146                 :            : 
     147                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeDimensionTooBig)
     148                 :            : {
     149                 :          1 :   ::ad::rss::world::ObjectState value;
     150                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     151                 :          1 :   value.yaw = valueYaw;
     152                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     153                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     154                 :          1 :   valueDimension.length = valueDimensionLength;
     155                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     156                 :          1 :   valueDimension.width = valueDimensionWidth;
     157                 :          1 :   value.dimension = valueDimension;
     158                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     159                 :          1 :   value.yawRate = valueYawRate;
     160                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     161                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     162                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     163                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     164                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     165                 :          1 :   value.centerPoint = valueCenterPoint;
     166                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     167                 :          1 :   value.speed = valueSpeed;
     168                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     169                 :          1 :   value.steeringAngle = valueSteeringAngle;
     170                 :            : 
     171                 :            :   // override member with data type value above input range maximum
     172                 :          1 :   ::ad::physics::Dimension2D invalidInitializedMember;
     173                 :          1 :   ::ad::physics::Distance invalidInitializedMemberLength(1e9 * 1.1);
     174                 :          1 :   invalidInitializedMember.length = invalidInitializedMemberLength;
     175                 :          1 :   value.dimension = invalidInitializedMember;
     176   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     177                 :            : }
     178                 :            : 
     179                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeYawRateTooSmall)
     180                 :            : {
     181                 :          1 :   ::ad::rss::world::ObjectState value;
     182                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     183                 :          1 :   value.yaw = valueYaw;
     184                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     185                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     186                 :          1 :   valueDimension.length = valueDimensionLength;
     187                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     188                 :          1 :   valueDimension.width = valueDimensionWidth;
     189                 :          1 :   value.dimension = valueDimension;
     190                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     191                 :          1 :   value.yawRate = valueYawRate;
     192                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     193                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     194                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     195                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     196                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     197                 :          1 :   value.centerPoint = valueCenterPoint;
     198                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     199                 :          1 :   value.speed = valueSpeed;
     200                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     201                 :          1 :   value.steeringAngle = valueSteeringAngle;
     202                 :            : 
     203                 :            :   // override member with data type value below input range minimum
     204                 :          1 :   ::ad::physics::AngularVelocity invalidInitializedMember(-100. * 1.1);
     205                 :          1 :   value.yawRate = invalidInitializedMember;
     206   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     207                 :            : }
     208                 :            : 
     209                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeYawRateTooBig)
     210                 :            : {
     211                 :          1 :   ::ad::rss::world::ObjectState value;
     212                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     213                 :          1 :   value.yaw = valueYaw;
     214                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     215                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     216                 :          1 :   valueDimension.length = valueDimensionLength;
     217                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     218                 :          1 :   valueDimension.width = valueDimensionWidth;
     219                 :          1 :   value.dimension = valueDimension;
     220                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     221                 :          1 :   value.yawRate = valueYawRate;
     222                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     223                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     224                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     225                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     226                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     227                 :          1 :   value.centerPoint = valueCenterPoint;
     228                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     229                 :          1 :   value.speed = valueSpeed;
     230                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     231                 :          1 :   value.steeringAngle = valueSteeringAngle;
     232                 :            : 
     233                 :            :   // override member with data type value above input range maximum
     234                 :          1 :   ::ad::physics::AngularVelocity invalidInitializedMember(100. * 1.1);
     235                 :          1 :   value.yawRate = invalidInitializedMember;
     236   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     237                 :            : }
     238                 :            : 
     239                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeyawRateDefault)
     240                 :            : {
     241                 :          1 :   ::ad::rss::world::ObjectState value;
     242                 :          1 :   ::ad::physics::AngularVelocity valueDefault;
     243                 :          1 :   value.yawRate = valueDefault;
     244   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     245                 :            : }
     246                 :            : 
     247                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeCenterPointTooSmall)
     248                 :            : {
     249                 :          1 :   ::ad::rss::world::ObjectState value;
     250                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     251                 :          1 :   value.yaw = valueYaw;
     252                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     253                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     254                 :          1 :   valueDimension.length = valueDimensionLength;
     255                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     256                 :          1 :   valueDimension.width = valueDimensionWidth;
     257                 :          1 :   value.dimension = valueDimension;
     258                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     259                 :          1 :   value.yawRate = valueYawRate;
     260                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     261                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     262                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     263                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     264                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     265                 :          1 :   value.centerPoint = valueCenterPoint;
     266                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     267                 :          1 :   value.speed = valueSpeed;
     268                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     269                 :          1 :   value.steeringAngle = valueSteeringAngle;
     270                 :            : 
     271                 :            :   // override member with data type value below input range minimum
     272                 :          1 :   ::ad::physics::Distance2D invalidInitializedMember;
     273                 :          1 :   ::ad::physics::Distance invalidInitializedMemberX(-1e9 * 1.1);
     274                 :          1 :   invalidInitializedMember.x = invalidInitializedMemberX;
     275                 :          1 :   value.centerPoint = invalidInitializedMember;
     276   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     277                 :            : }
     278                 :            : 
     279                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeCenterPointTooBig)
     280                 :            : {
     281                 :          1 :   ::ad::rss::world::ObjectState value;
     282                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     283                 :          1 :   value.yaw = valueYaw;
     284                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     285                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     286                 :          1 :   valueDimension.length = valueDimensionLength;
     287                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     288                 :          1 :   valueDimension.width = valueDimensionWidth;
     289                 :          1 :   value.dimension = valueDimension;
     290                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     291                 :          1 :   value.yawRate = valueYawRate;
     292                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     293                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     294                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     295                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     296                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     297                 :          1 :   value.centerPoint = valueCenterPoint;
     298                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     299                 :          1 :   value.speed = valueSpeed;
     300                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     301                 :          1 :   value.steeringAngle = valueSteeringAngle;
     302                 :            : 
     303                 :            :   // override member with data type value above input range maximum
     304                 :          1 :   ::ad::physics::Distance2D invalidInitializedMember;
     305                 :          1 :   ::ad::physics::Distance invalidInitializedMemberX(1e9 * 1.1);
     306                 :          1 :   invalidInitializedMember.x = invalidInitializedMemberX;
     307                 :          1 :   value.centerPoint = invalidInitializedMember;
     308   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     309                 :            : }
     310                 :            : 
     311                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeSpeedTooSmall)
     312                 :            : {
     313                 :          1 :   ::ad::rss::world::ObjectState value;
     314                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     315                 :          1 :   value.yaw = valueYaw;
     316                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     317                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     318                 :          1 :   valueDimension.length = valueDimensionLength;
     319                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     320                 :          1 :   valueDimension.width = valueDimensionWidth;
     321                 :          1 :   value.dimension = valueDimension;
     322                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     323                 :          1 :   value.yawRate = valueYawRate;
     324                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     325                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     326                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     327                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     328                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     329                 :          1 :   value.centerPoint = valueCenterPoint;
     330                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     331                 :          1 :   value.speed = valueSpeed;
     332                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     333                 :          1 :   value.steeringAngle = valueSteeringAngle;
     334                 :            : 
     335                 :            :   // override member with data type value below input range minimum
     336                 :          1 :   ::ad::physics::Speed invalidInitializedMember(-100. * 1.1);
     337                 :          1 :   value.speed = invalidInitializedMember;
     338   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     339                 :            : }
     340                 :            : 
     341                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeSpeedTooBig)
     342                 :            : {
     343                 :          1 :   ::ad::rss::world::ObjectState value;
     344                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     345                 :          1 :   value.yaw = valueYaw;
     346                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     347                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     348                 :          1 :   valueDimension.length = valueDimensionLength;
     349                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     350                 :          1 :   valueDimension.width = valueDimensionWidth;
     351                 :          1 :   value.dimension = valueDimension;
     352                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     353                 :          1 :   value.yawRate = valueYawRate;
     354                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     355                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     356                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     357                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     358                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     359                 :          1 :   value.centerPoint = valueCenterPoint;
     360                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     361                 :          1 :   value.speed = valueSpeed;
     362                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     363                 :          1 :   value.steeringAngle = valueSteeringAngle;
     364                 :            : 
     365                 :            :   // override member with data type value above input range maximum
     366                 :          1 :   ::ad::physics::Speed invalidInitializedMember(100. * 1.1);
     367                 :          1 :   value.speed = invalidInitializedMember;
     368   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     369                 :            : }
     370                 :            : 
     371                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangespeedDefault)
     372                 :            : {
     373                 :          1 :   ::ad::rss::world::ObjectState value;
     374                 :          1 :   ::ad::physics::Speed valueDefault;
     375                 :          1 :   value.speed = valueDefault;
     376   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     377                 :            : }
     378                 :            : 
     379                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeSteeringAngleTooSmall)
     380                 :            : {
     381                 :          1 :   ::ad::rss::world::ObjectState value;
     382                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     383                 :          1 :   value.yaw = valueYaw;
     384                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     385                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     386                 :          1 :   valueDimension.length = valueDimensionLength;
     387                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     388                 :          1 :   valueDimension.width = valueDimensionWidth;
     389                 :          1 :   value.dimension = valueDimension;
     390                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     391                 :          1 :   value.yawRate = valueYawRate;
     392                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     393                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     394                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     395                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     396                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     397                 :          1 :   value.centerPoint = valueCenterPoint;
     398                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     399                 :          1 :   value.speed = valueSpeed;
     400                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     401                 :          1 :   value.steeringAngle = valueSteeringAngle;
     402                 :            : 
     403                 :            :   // override member with data type value below input range minimum
     404                 :          1 :   ::ad::physics::Angle invalidInitializedMember(-6.283185308 * 1.1);
     405                 :          1 :   value.steeringAngle = invalidInitializedMember;
     406   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     407                 :            : }
     408                 :            : 
     409                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangeSteeringAngleTooBig)
     410                 :            : {
     411                 :          1 :   ::ad::rss::world::ObjectState value;
     412                 :          1 :   ::ad::physics::Angle valueYaw(-6.283185308);
     413                 :          1 :   value.yaw = valueYaw;
     414                 :          1 :   ::ad::physics::Dimension2D valueDimension;
     415                 :          1 :   ::ad::physics::Distance valueDimensionLength(-1e9);
     416                 :          1 :   valueDimension.length = valueDimensionLength;
     417                 :          1 :   ::ad::physics::Distance valueDimensionWidth(-1e9);
     418                 :          1 :   valueDimension.width = valueDimensionWidth;
     419                 :          1 :   value.dimension = valueDimension;
     420                 :          1 :   ::ad::physics::AngularVelocity valueYawRate(-100.);
     421                 :          1 :   value.yawRate = valueYawRate;
     422                 :          1 :   ::ad::physics::Distance2D valueCenterPoint;
     423                 :          1 :   ::ad::physics::Distance valueCenterPointX(-1e9);
     424                 :          1 :   valueCenterPoint.x = valueCenterPointX;
     425                 :          1 :   ::ad::physics::Distance valueCenterPointY(-1e9);
     426                 :          1 :   valueCenterPoint.y = valueCenterPointY;
     427                 :          1 :   value.centerPoint = valueCenterPoint;
     428                 :          1 :   ::ad::physics::Speed valueSpeed(-100.);
     429                 :          1 :   value.speed = valueSpeed;
     430                 :          1 :   ::ad::physics::Angle valueSteeringAngle(-6.283185308);
     431                 :          1 :   value.steeringAngle = valueSteeringAngle;
     432                 :            : 
     433                 :            :   // override member with data type value above input range maximum
     434                 :          1 :   ::ad::physics::Angle invalidInitializedMember(6.283185308 * 1.1);
     435                 :          1 :   value.steeringAngle = invalidInitializedMember;
     436   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     437                 :            : }
     438                 :            : 
     439                 :          2 : TEST(ObjectStateValidInputRangeTests, testValidInputRangesteeringAngleDefault)
     440                 :            : {
     441                 :          1 :   ::ad::rss::world::ObjectState value;
     442                 :          1 :   ::ad::physics::Angle valueDefault;
     443                 :          1 :   value.steeringAngle = valueDefault;
     444   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     445                 :            : }

Generated by: LCOV version 1.14