LCOV - code coverage report
Current view: top level - tests/generated/ad/rss/state - UnstructuredSceneRssStateValidInputRangeTests.cpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 342 342 100.0 %
Date: 2024-12-17 12:06:18 Functions: 14 14 100.0 %
Branches: 49 154 31.8 %

           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/state/UnstructuredSceneRssStateValidInputRange.hpp"
      20                 :            : 
      21                 :          2 : TEST(UnstructuredSceneRssStateValidInputRangeTests, testValidInputRange)
      22                 :            : {
      23                 :          1 :   ::ad::rss::state::UnstructuredSceneRssState value;
      24                 :          1 :   bool valueIsSafe{true};
      25                 :          1 :   value.isSafe = valueIsSafe;
      26                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse valueResponse(::ad::rss::state::UnstructuredSceneResponse::None);
      27                 :          1 :   value.response = valueResponse;
      28                 :          1 :   ::ad::rss::state::HeadingRange valueHeadingRange;
      29                 :          1 :   ::ad::physics::Angle valueHeadingRangeBegin(-6.283185308);
      30                 :          1 :   valueHeadingRange.begin = valueHeadingRangeBegin;
      31                 :          1 :   ::ad::physics::Angle valueHeadingRangeEnd(-6.283185308);
      32                 :          1 :   valueHeadingRange.end = valueHeadingRangeEnd;
      33                 :          1 :   value.headingRange = valueHeadingRange;
      34                 :          1 :   ::ad::rss::state::UnstructuredSceneStateInformation valueRssStateInformation;
      35                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationBrakeTrajectorySet;
      36                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationBrakeTrajectorySetElement;
      37                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementX(-1e9);
      38                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.x = valueRssStateInformationBrakeTrajectorySetElementX;
      39                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementY(-1e9);
      40                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.y = valueRssStateInformationBrakeTrajectorySetElementY;
      41         [ +  - ]:          1 :   valueRssStateInformationBrakeTrajectorySet.resize(1, valueRssStateInformationBrakeTrajectorySetElement);
      42         [ +  - ]:          1 :   valueRssStateInformation.brakeTrajectorySet = valueRssStateInformationBrakeTrajectorySet;
      43                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationContinueForwardTrajectorySet;
      44                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationContinueForwardTrajectorySetElement;
      45                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementX(-1e9);
      46                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.x
      47                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementX;
      48                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementY(-1e9);
      49                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.y
      50                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementY;
      51         [ +  - ]:          1 :   valueRssStateInformationContinueForwardTrajectorySet.resize(
      52                 :            :     1, valueRssStateInformationContinueForwardTrajectorySetElement);
      53         [ +  - ]:          1 :   valueRssStateInformation.continueForwardTrajectorySet = valueRssStateInformationContinueForwardTrajectorySet;
      54         [ +  - ]:          1 :   value.rssStateInformation = valueRssStateInformation;
      55                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues valueAlphaLon;
      56                 :          1 :   ::ad::physics::Acceleration valueAlphaLonAccelMax(-1e2);
      57                 :          1 :   valueAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct
      58                 :          1 :   valueAlphaLon.accelMax = valueAlphaLonAccelMax;
      59                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMax(-1e2);
      60                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLonBrakeMax;
      61                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMin(-1e2);
      62                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLonBrakeMin;
      63                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMinCorrect(-1e2);
      64                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLonBrakeMinCorrect;
      65                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMax;
      66                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLon.brakeMin;
      67                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMinCorrect;
      68                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLon.brakeMin;
      69                 :          1 :   value.alphaLon = valueAlphaLon;
      70   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
      71                 :            : }
      72                 :            : 
      73                 :          2 : TEST(UnstructuredSceneRssStateValidInputRangeTests, testValidInputRangeResponseTooSmall)
      74                 :            : {
      75                 :          1 :   ::ad::rss::state::UnstructuredSceneRssState value;
      76                 :          1 :   bool valueIsSafe{true};
      77                 :          1 :   value.isSafe = valueIsSafe;
      78                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse valueResponse(::ad::rss::state::UnstructuredSceneResponse::None);
      79                 :          1 :   value.response = valueResponse;
      80                 :          1 :   ::ad::rss::state::HeadingRange valueHeadingRange;
      81                 :          1 :   ::ad::physics::Angle valueHeadingRangeBegin(-6.283185308);
      82                 :          1 :   valueHeadingRange.begin = valueHeadingRangeBegin;
      83                 :          1 :   ::ad::physics::Angle valueHeadingRangeEnd(-6.283185308);
      84                 :          1 :   valueHeadingRange.end = valueHeadingRangeEnd;
      85                 :          1 :   value.headingRange = valueHeadingRange;
      86                 :          1 :   ::ad::rss::state::UnstructuredSceneStateInformation valueRssStateInformation;
      87                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationBrakeTrajectorySet;
      88                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationBrakeTrajectorySetElement;
      89                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementX(-1e9);
      90                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.x = valueRssStateInformationBrakeTrajectorySetElementX;
      91                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementY(-1e9);
      92                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.y = valueRssStateInformationBrakeTrajectorySetElementY;
      93         [ +  - ]:          1 :   valueRssStateInformationBrakeTrajectorySet.resize(1, valueRssStateInformationBrakeTrajectorySetElement);
      94         [ +  - ]:          1 :   valueRssStateInformation.brakeTrajectorySet = valueRssStateInformationBrakeTrajectorySet;
      95                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationContinueForwardTrajectorySet;
      96                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationContinueForwardTrajectorySetElement;
      97                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementX(-1e9);
      98                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.x
      99                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementX;
     100                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementY(-1e9);
     101                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.y
     102                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementY;
     103         [ +  - ]:          1 :   valueRssStateInformationContinueForwardTrajectorySet.resize(
     104                 :            :     1, valueRssStateInformationContinueForwardTrajectorySetElement);
     105         [ +  - ]:          1 :   valueRssStateInformation.continueForwardTrajectorySet = valueRssStateInformationContinueForwardTrajectorySet;
     106         [ +  - ]:          1 :   value.rssStateInformation = valueRssStateInformation;
     107                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues valueAlphaLon;
     108                 :          1 :   ::ad::physics::Acceleration valueAlphaLonAccelMax(-1e2);
     109                 :          1 :   valueAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct
     110                 :          1 :   valueAlphaLon.accelMax = valueAlphaLonAccelMax;
     111                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMax(-1e2);
     112                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLonBrakeMax;
     113                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMin(-1e2);
     114                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLonBrakeMin;
     115                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMinCorrect(-1e2);
     116                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLonBrakeMinCorrect;
     117                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMax;
     118                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLon.brakeMin;
     119                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMinCorrect;
     120                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLon.brakeMin;
     121                 :          1 :   value.alphaLon = valueAlphaLon;
     122                 :            : 
     123                 :            :   // override member with data type value below input range minimum
     124                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse invalidInitializedMember(
     125                 :            :     static_cast<::ad::rss::state::UnstructuredSceneResponse>(-1));
     126                 :          1 :   value.response = invalidInitializedMember;
     127   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     128                 :            : }
     129                 :            : 
     130                 :          2 : TEST(UnstructuredSceneRssStateValidInputRangeTests, testValidInputRangeResponseTooBig)
     131                 :            : {
     132                 :          1 :   ::ad::rss::state::UnstructuredSceneRssState value;
     133                 :          1 :   bool valueIsSafe{true};
     134                 :          1 :   value.isSafe = valueIsSafe;
     135                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse valueResponse(::ad::rss::state::UnstructuredSceneResponse::None);
     136                 :          1 :   value.response = valueResponse;
     137                 :          1 :   ::ad::rss::state::HeadingRange valueHeadingRange;
     138                 :          1 :   ::ad::physics::Angle valueHeadingRangeBegin(-6.283185308);
     139                 :          1 :   valueHeadingRange.begin = valueHeadingRangeBegin;
     140                 :          1 :   ::ad::physics::Angle valueHeadingRangeEnd(-6.283185308);
     141                 :          1 :   valueHeadingRange.end = valueHeadingRangeEnd;
     142                 :          1 :   value.headingRange = valueHeadingRange;
     143                 :          1 :   ::ad::rss::state::UnstructuredSceneStateInformation valueRssStateInformation;
     144                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationBrakeTrajectorySet;
     145                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationBrakeTrajectorySetElement;
     146                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementX(-1e9);
     147                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.x = valueRssStateInformationBrakeTrajectorySetElementX;
     148                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementY(-1e9);
     149                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.y = valueRssStateInformationBrakeTrajectorySetElementY;
     150         [ +  - ]:          1 :   valueRssStateInformationBrakeTrajectorySet.resize(1, valueRssStateInformationBrakeTrajectorySetElement);
     151         [ +  - ]:          1 :   valueRssStateInformation.brakeTrajectorySet = valueRssStateInformationBrakeTrajectorySet;
     152                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationContinueForwardTrajectorySet;
     153                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationContinueForwardTrajectorySetElement;
     154                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementX(-1e9);
     155                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.x
     156                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementX;
     157                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementY(-1e9);
     158                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.y
     159                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementY;
     160         [ +  - ]:          1 :   valueRssStateInformationContinueForwardTrajectorySet.resize(
     161                 :            :     1, valueRssStateInformationContinueForwardTrajectorySetElement);
     162         [ +  - ]:          1 :   valueRssStateInformation.continueForwardTrajectorySet = valueRssStateInformationContinueForwardTrajectorySet;
     163         [ +  - ]:          1 :   value.rssStateInformation = valueRssStateInformation;
     164                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues valueAlphaLon;
     165                 :          1 :   ::ad::physics::Acceleration valueAlphaLonAccelMax(-1e2);
     166                 :          1 :   valueAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct
     167                 :          1 :   valueAlphaLon.accelMax = valueAlphaLonAccelMax;
     168                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMax(-1e2);
     169                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLonBrakeMax;
     170                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMin(-1e2);
     171                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLonBrakeMin;
     172                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMinCorrect(-1e2);
     173                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLonBrakeMinCorrect;
     174                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMax;
     175                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLon.brakeMin;
     176                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMinCorrect;
     177                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLon.brakeMin;
     178                 :          1 :   value.alphaLon = valueAlphaLon;
     179                 :            : 
     180                 :            :   // override member with data type value above input range maximum
     181                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse invalidInitializedMember(
     182                 :            :     static_cast<::ad::rss::state::UnstructuredSceneResponse>(-1));
     183                 :          1 :   value.response = invalidInitializedMember;
     184   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     185                 :            : }
     186                 :            : 
     187                 :          2 : TEST(UnstructuredSceneRssStateValidInputRangeTests, testValidInputRangeHeadingRangeTooSmall)
     188                 :            : {
     189                 :          1 :   ::ad::rss::state::UnstructuredSceneRssState value;
     190                 :          1 :   bool valueIsSafe{true};
     191                 :          1 :   value.isSafe = valueIsSafe;
     192                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse valueResponse(::ad::rss::state::UnstructuredSceneResponse::None);
     193                 :          1 :   value.response = valueResponse;
     194                 :          1 :   ::ad::rss::state::HeadingRange valueHeadingRange;
     195                 :          1 :   ::ad::physics::Angle valueHeadingRangeBegin(-6.283185308);
     196                 :          1 :   valueHeadingRange.begin = valueHeadingRangeBegin;
     197                 :          1 :   ::ad::physics::Angle valueHeadingRangeEnd(-6.283185308);
     198                 :          1 :   valueHeadingRange.end = valueHeadingRangeEnd;
     199                 :          1 :   value.headingRange = valueHeadingRange;
     200                 :          1 :   ::ad::rss::state::UnstructuredSceneStateInformation valueRssStateInformation;
     201                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationBrakeTrajectorySet;
     202                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationBrakeTrajectorySetElement;
     203                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementX(-1e9);
     204                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.x = valueRssStateInformationBrakeTrajectorySetElementX;
     205                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementY(-1e9);
     206                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.y = valueRssStateInformationBrakeTrajectorySetElementY;
     207         [ +  - ]:          1 :   valueRssStateInformationBrakeTrajectorySet.resize(1, valueRssStateInformationBrakeTrajectorySetElement);
     208         [ +  - ]:          1 :   valueRssStateInformation.brakeTrajectorySet = valueRssStateInformationBrakeTrajectorySet;
     209                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationContinueForwardTrajectorySet;
     210                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationContinueForwardTrajectorySetElement;
     211                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementX(-1e9);
     212                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.x
     213                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementX;
     214                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementY(-1e9);
     215                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.y
     216                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementY;
     217         [ +  - ]:          1 :   valueRssStateInformationContinueForwardTrajectorySet.resize(
     218                 :            :     1, valueRssStateInformationContinueForwardTrajectorySetElement);
     219         [ +  - ]:          1 :   valueRssStateInformation.continueForwardTrajectorySet = valueRssStateInformationContinueForwardTrajectorySet;
     220         [ +  - ]:          1 :   value.rssStateInformation = valueRssStateInformation;
     221                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues valueAlphaLon;
     222                 :          1 :   ::ad::physics::Acceleration valueAlphaLonAccelMax(-1e2);
     223                 :          1 :   valueAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct
     224                 :          1 :   valueAlphaLon.accelMax = valueAlphaLonAccelMax;
     225                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMax(-1e2);
     226                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLonBrakeMax;
     227                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMin(-1e2);
     228                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLonBrakeMin;
     229                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMinCorrect(-1e2);
     230                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLonBrakeMinCorrect;
     231                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMax;
     232                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLon.brakeMin;
     233                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMinCorrect;
     234                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLon.brakeMin;
     235                 :          1 :   value.alphaLon = valueAlphaLon;
     236                 :            : 
     237                 :            :   // override member with data type value below input range minimum
     238                 :          1 :   ::ad::rss::state::HeadingRange invalidInitializedMember;
     239                 :          1 :   ::ad::physics::Angle invalidInitializedMemberBegin(-6.283185308 * 1.1);
     240                 :          1 :   invalidInitializedMember.begin = invalidInitializedMemberBegin;
     241                 :          1 :   value.headingRange = invalidInitializedMember;
     242   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     243                 :            : }
     244                 :            : 
     245                 :          2 : TEST(UnstructuredSceneRssStateValidInputRangeTests, testValidInputRangeHeadingRangeTooBig)
     246                 :            : {
     247                 :          1 :   ::ad::rss::state::UnstructuredSceneRssState value;
     248                 :          1 :   bool valueIsSafe{true};
     249                 :          1 :   value.isSafe = valueIsSafe;
     250                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse valueResponse(::ad::rss::state::UnstructuredSceneResponse::None);
     251                 :          1 :   value.response = valueResponse;
     252                 :          1 :   ::ad::rss::state::HeadingRange valueHeadingRange;
     253                 :          1 :   ::ad::physics::Angle valueHeadingRangeBegin(-6.283185308);
     254                 :          1 :   valueHeadingRange.begin = valueHeadingRangeBegin;
     255                 :          1 :   ::ad::physics::Angle valueHeadingRangeEnd(-6.283185308);
     256                 :          1 :   valueHeadingRange.end = valueHeadingRangeEnd;
     257                 :          1 :   value.headingRange = valueHeadingRange;
     258                 :          1 :   ::ad::rss::state::UnstructuredSceneStateInformation valueRssStateInformation;
     259                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationBrakeTrajectorySet;
     260                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationBrakeTrajectorySetElement;
     261                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementX(-1e9);
     262                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.x = valueRssStateInformationBrakeTrajectorySetElementX;
     263                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementY(-1e9);
     264                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.y = valueRssStateInformationBrakeTrajectorySetElementY;
     265         [ +  - ]:          1 :   valueRssStateInformationBrakeTrajectorySet.resize(1, valueRssStateInformationBrakeTrajectorySetElement);
     266         [ +  - ]:          1 :   valueRssStateInformation.brakeTrajectorySet = valueRssStateInformationBrakeTrajectorySet;
     267                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationContinueForwardTrajectorySet;
     268                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationContinueForwardTrajectorySetElement;
     269                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementX(-1e9);
     270                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.x
     271                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementX;
     272                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementY(-1e9);
     273                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.y
     274                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementY;
     275         [ +  - ]:          1 :   valueRssStateInformationContinueForwardTrajectorySet.resize(
     276                 :            :     1, valueRssStateInformationContinueForwardTrajectorySetElement);
     277         [ +  - ]:          1 :   valueRssStateInformation.continueForwardTrajectorySet = valueRssStateInformationContinueForwardTrajectorySet;
     278         [ +  - ]:          1 :   value.rssStateInformation = valueRssStateInformation;
     279                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues valueAlphaLon;
     280                 :          1 :   ::ad::physics::Acceleration valueAlphaLonAccelMax(-1e2);
     281                 :          1 :   valueAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct
     282                 :          1 :   valueAlphaLon.accelMax = valueAlphaLonAccelMax;
     283                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMax(-1e2);
     284                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLonBrakeMax;
     285                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMin(-1e2);
     286                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLonBrakeMin;
     287                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMinCorrect(-1e2);
     288                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLonBrakeMinCorrect;
     289                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMax;
     290                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLon.brakeMin;
     291                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMinCorrect;
     292                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLon.brakeMin;
     293                 :          1 :   value.alphaLon = valueAlphaLon;
     294                 :            : 
     295                 :            :   // override member with data type value above input range maximum
     296                 :          1 :   ::ad::rss::state::HeadingRange invalidInitializedMember;
     297                 :          1 :   ::ad::physics::Angle invalidInitializedMemberBegin(6.283185308 * 1.1);
     298                 :          1 :   invalidInitializedMember.begin = invalidInitializedMemberBegin;
     299                 :          1 :   value.headingRange = invalidInitializedMember;
     300   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     301                 :            : }
     302                 :            : 
     303                 :          2 : TEST(UnstructuredSceneRssStateValidInputRangeTests, testValidInputRangeAlphaLonTooSmall)
     304                 :            : {
     305                 :          1 :   ::ad::rss::state::UnstructuredSceneRssState value;
     306                 :          1 :   bool valueIsSafe{true};
     307                 :          1 :   value.isSafe = valueIsSafe;
     308                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse valueResponse(::ad::rss::state::UnstructuredSceneResponse::None);
     309                 :          1 :   value.response = valueResponse;
     310                 :          1 :   ::ad::rss::state::HeadingRange valueHeadingRange;
     311                 :          1 :   ::ad::physics::Angle valueHeadingRangeBegin(-6.283185308);
     312                 :          1 :   valueHeadingRange.begin = valueHeadingRangeBegin;
     313                 :          1 :   ::ad::physics::Angle valueHeadingRangeEnd(-6.283185308);
     314                 :          1 :   valueHeadingRange.end = valueHeadingRangeEnd;
     315                 :          1 :   value.headingRange = valueHeadingRange;
     316                 :          1 :   ::ad::rss::state::UnstructuredSceneStateInformation valueRssStateInformation;
     317                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationBrakeTrajectorySet;
     318                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationBrakeTrajectorySetElement;
     319                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementX(-1e9);
     320                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.x = valueRssStateInformationBrakeTrajectorySetElementX;
     321                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementY(-1e9);
     322                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.y = valueRssStateInformationBrakeTrajectorySetElementY;
     323         [ +  - ]:          1 :   valueRssStateInformationBrakeTrajectorySet.resize(1, valueRssStateInformationBrakeTrajectorySetElement);
     324         [ +  - ]:          1 :   valueRssStateInformation.brakeTrajectorySet = valueRssStateInformationBrakeTrajectorySet;
     325                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationContinueForwardTrajectorySet;
     326                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationContinueForwardTrajectorySetElement;
     327                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementX(-1e9);
     328                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.x
     329                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementX;
     330                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementY(-1e9);
     331                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.y
     332                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementY;
     333         [ +  - ]:          1 :   valueRssStateInformationContinueForwardTrajectorySet.resize(
     334                 :            :     1, valueRssStateInformationContinueForwardTrajectorySetElement);
     335         [ +  - ]:          1 :   valueRssStateInformation.continueForwardTrajectorySet = valueRssStateInformationContinueForwardTrajectorySet;
     336         [ +  - ]:          1 :   value.rssStateInformation = valueRssStateInformation;
     337                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues valueAlphaLon;
     338                 :          1 :   ::ad::physics::Acceleration valueAlphaLonAccelMax(-1e2);
     339                 :          1 :   valueAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct
     340                 :          1 :   valueAlphaLon.accelMax = valueAlphaLonAccelMax;
     341                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMax(-1e2);
     342                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLonBrakeMax;
     343                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMin(-1e2);
     344                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLonBrakeMin;
     345                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMinCorrect(-1e2);
     346                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLonBrakeMinCorrect;
     347                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMax;
     348                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLon.brakeMin;
     349                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMinCorrect;
     350                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLon.brakeMin;
     351                 :          1 :   value.alphaLon = valueAlphaLon;
     352                 :            : 
     353                 :            :   // override member with data type value below input range minimum
     354                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues invalidInitializedMember;
     355                 :          1 :   ::ad::physics::Acceleration invalidInitializedMemberAccelMax(-1e2 * 1.1);
     356                 :          1 :   invalidInitializedMember.accelMax = invalidInitializedMemberAccelMax;
     357                 :          1 :   value.alphaLon = invalidInitializedMember;
     358   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     359                 :            : }
     360                 :            : 
     361                 :          2 : TEST(UnstructuredSceneRssStateValidInputRangeTests, testValidInputRangeAlphaLonTooBig)
     362                 :            : {
     363                 :          1 :   ::ad::rss::state::UnstructuredSceneRssState value;
     364                 :          1 :   bool valueIsSafe{true};
     365                 :          1 :   value.isSafe = valueIsSafe;
     366                 :          1 :   ::ad::rss::state::UnstructuredSceneResponse valueResponse(::ad::rss::state::UnstructuredSceneResponse::None);
     367                 :          1 :   value.response = valueResponse;
     368                 :          1 :   ::ad::rss::state::HeadingRange valueHeadingRange;
     369                 :          1 :   ::ad::physics::Angle valueHeadingRangeBegin(-6.283185308);
     370                 :          1 :   valueHeadingRange.begin = valueHeadingRangeBegin;
     371                 :          1 :   ::ad::physics::Angle valueHeadingRangeEnd(-6.283185308);
     372                 :          1 :   valueHeadingRange.end = valueHeadingRangeEnd;
     373                 :          1 :   value.headingRange = valueHeadingRange;
     374                 :          1 :   ::ad::rss::state::UnstructuredSceneStateInformation valueRssStateInformation;
     375                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationBrakeTrajectorySet;
     376                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationBrakeTrajectorySetElement;
     377                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementX(-1e9);
     378                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.x = valueRssStateInformationBrakeTrajectorySetElementX;
     379                 :          1 :   ::ad::physics::Distance valueRssStateInformationBrakeTrajectorySetElementY(-1e9);
     380                 :          1 :   valueRssStateInformationBrakeTrajectorySetElement.y = valueRssStateInformationBrakeTrajectorySetElementY;
     381         [ +  - ]:          1 :   valueRssStateInformationBrakeTrajectorySet.resize(1, valueRssStateInformationBrakeTrajectorySetElement);
     382         [ +  - ]:          1 :   valueRssStateInformation.brakeTrajectorySet = valueRssStateInformationBrakeTrajectorySet;
     383                 :          1 :   ::ad::physics::Distance2DList valueRssStateInformationContinueForwardTrajectorySet;
     384                 :          1 :   ::ad::physics::Distance2D valueRssStateInformationContinueForwardTrajectorySetElement;
     385                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementX(-1e9);
     386                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.x
     387                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementX;
     388                 :          1 :   ::ad::physics::Distance valueRssStateInformationContinueForwardTrajectorySetElementY(-1e9);
     389                 :            :   valueRssStateInformationContinueForwardTrajectorySetElement.y
     390                 :          1 :     = valueRssStateInformationContinueForwardTrajectorySetElementY;
     391         [ +  - ]:          1 :   valueRssStateInformationContinueForwardTrajectorySet.resize(
     392                 :            :     1, valueRssStateInformationContinueForwardTrajectorySetElement);
     393         [ +  - ]:          1 :   valueRssStateInformation.continueForwardTrajectorySet = valueRssStateInformationContinueForwardTrajectorySet;
     394         [ +  - ]:          1 :   value.rssStateInformation = valueRssStateInformation;
     395                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues valueAlphaLon;
     396                 :          1 :   ::ad::physics::Acceleration valueAlphaLonAccelMax(-1e2);
     397                 :          1 :   valueAlphaLonAccelMax = ::ad::physics::Acceleration(0.); // set to valid value within struct
     398                 :          1 :   valueAlphaLon.accelMax = valueAlphaLonAccelMax;
     399                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMax(-1e2);
     400                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLonBrakeMax;
     401                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMin(-1e2);
     402                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLonBrakeMin;
     403                 :          1 :   ::ad::physics::Acceleration valueAlphaLonBrakeMinCorrect(-1e2);
     404                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLonBrakeMinCorrect;
     405                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMax;
     406                 :          1 :   valueAlphaLon.brakeMinCorrect = valueAlphaLon.brakeMin;
     407                 :          1 :   valueAlphaLon.brakeMin = valueAlphaLon.brakeMinCorrect;
     408                 :          1 :   valueAlphaLon.brakeMax = valueAlphaLon.brakeMin;
     409                 :          1 :   value.alphaLon = valueAlphaLon;
     410                 :            : 
     411                 :            :   // override member with data type value above input range maximum
     412                 :          1 :   ::ad::rss::world::LongitudinalRssAccelerationValues invalidInitializedMember;
     413                 :          1 :   ::ad::physics::Acceleration invalidInitializedMemberAccelMax(1e2 * 1.1);
     414                 :          1 :   invalidInitializedMember.accelMax = invalidInitializedMemberAccelMax;
     415                 :          1 :   value.alphaLon = invalidInitializedMember;
     416   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(value));
          -  -  -  -  -  
                -  -  - ]
     417                 :            : }

Generated by: LCOV version 1.14