LCOV - code coverage report
Current view: top level - tests/intersection - IntersectionYieldTests.cpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 259 259 100.0 %
Date: 2022-10-04 09:48:07 Functions: 93 93 100.0 %
Branches: 136 272 50.0 %

           Branch data     Line data    Source code
       1                 :            : // ----------------- BEGIN LICENSE BLOCK ---------------------------------
       2                 :            : //
       3                 :            : // Copyright (C) 2018-2021 Intel Corporation
       4                 :            : //
       5                 :            : // SPDX-License-Identifier: MIT
       6                 :            : //
       7                 :            : // ----------------- END LICENSE BLOCK -----------------------------------
       8                 :            : 
       9                 :            : #include "IntersectionYieldTests.hpp"
      10                 :            : #include "MapSetup.hpp"
      11                 :            : 
      12                 :            : namespace ad {
      13                 :            : namespace map {
      14                 :            : 
      15                 :         12 : void IntersectionYieldTest::prepareMap() const
      16                 :            : {
      17                 :         12 :   ::map_setup::prepareMapBasicYield();
      18                 :         12 : }
      19                 :            : 
      20                 :          3 : lane::LaneId IntersectionYieldFromWestTest::getRouteStart() const
      21                 :            : {
      22                 :          3 :   return mFromWest;
      23                 :            : }
      24                 :            : 
      25                 :          3 : intersection::IntersectionType IntersectionYieldFromWestTest::expectedIntersectionType() const
      26                 :            : {
      27                 :          3 :   return intersection::IntersectionType::Yield;
      28                 :            : }
      29                 :            : 
      30                 :          1 : lane::LaneId IntersectionYieldWestToNorthTest::getRouteEnd() const
      31                 :            : {
      32                 :          1 :   return mToNorth;
      33                 :            : }
      34                 :            : 
      35                 :          2 : lane::LaneIdSet IntersectionYieldWestToNorthTest::expectedIncomingLanesWithHigherPriority() const
      36                 :            : {
      37   [ +  -  +  -  :          8 :   return createUnorderedLaneIdSet({getIncomingLanesNorth(), getIncomingLanesSouth(), getIncomingLanesEast()});
             +  +  -  - ]
      38                 :            : }
      39                 :            : 
      40                 :          2 : lane::LaneIdSet IntersectionYieldWestToNorthTest::expectedIncomingLanesWithLowerPriority() const
      41                 :            : {
      42                 :          2 :   return lane::LaneIdSet();
      43                 :            : }
      44                 :            : 
      45                 :          1 : lane::LaneIdSet IntersectionYieldWestToNorthTest::expectedInternalLanesWithHigherPriority() const
      46                 :            : {
      47                 :          1 :   return createUnorderedLaneIdSet({mNorthToWest.mInternalLanes,
      48                 :          1 :                                    mNorthToEast.mInternalLanes,
      49                 :          1 :                                    mNorthToSouth.mInternalLanes,
      50                 :          1 :                                    mSouthToEast.mInternalLanes,
      51                 :          1 :                                    mSouthToNorth.mInternalLanes,
      52                 :          1 :                                    mSouthToWest.mInternalLanes,
      53                 :          1 :                                    mEastToNorth.mInternalLanes,
      54                 :          1 :                                    mEastToWest.mInternalLanes,
      55   [ +  -  +  -  :         10 :                                    mEastToSouth.mInternalLanes});
             +  +  -  - ]
      56                 :            : }
      57                 :            : 
      58                 :          1 : lane::LaneIdSet IntersectionYieldWestToNorthTest::expectedCrossingLanes() const
      59                 :            : {
      60                 :          1 :   return createUnorderedLaneIdSet({mNorthToEast.mInternalLanes,
      61                 :          1 :                                    mNorthToSouth.mInternalLanes,
      62                 :          1 :                                    mSouthToEast.mInternalLanes,
      63                 :          1 :                                    mSouthToNorth.mInternalLanes,
      64                 :          1 :                                    mSouthToWest.mInternalLanes,
      65                 :          1 :                                    mEastToNorth.mInternalLanes,
      66                 :          1 :                                    mEastToWest.mInternalLanes,
      67   [ +  -  +  -  :          9 :                                    mEastToSouth.mInternalLanes});
             +  +  -  - ]
      68                 :            : }
      69                 :            : 
      70                 :          2 : TEST_F(IntersectionYieldWestToNorthTest, basic_checks)
      71                 :            : {
      72                 :          1 :   performBasicChecks();
      73                 :          1 : }
      74                 :            : 
      75                 :          1 : lane::LaneId IntersectionYieldWestToEastTest::getRouteEnd() const
      76                 :            : {
      77                 :          1 :   return mToEast;
      78                 :            : }
      79                 :            : 
      80                 :          2 : lane::LaneIdSet IntersectionYieldWestToEastTest::expectedIncomingLanesWithHigherPriority() const
      81                 :            : {
      82   [ +  -  +  -  :          6 :   return createUnorderedLaneIdSet({getIncomingLanesNorth(), getIncomingLanesSouth()});
             +  +  -  - ]
      83                 :            : }
      84                 :            : 
      85                 :          2 : lane::LaneIdSet IntersectionYieldWestToEastTest::expectedIncomingLanesWithLowerPriority() const
      86                 :            : {
      87                 :          2 :   return getIncomingLanesEast();
      88                 :            : }
      89                 :            : 
      90                 :          1 : lane::LaneIdSet IntersectionYieldWestToEastTest::expectedInternalLanesWithHigherPriority() const
      91                 :            : {
      92                 :          1 :   return createUnorderedLaneIdSet({mNorthToWest.mInternalLanes,
      93                 :          1 :                                    mNorthToEast.mInternalLanes,
      94                 :          1 :                                    mNorthToSouth.mInternalLanes,
      95                 :          1 :                                    mSouthToEast.mInternalLanes,
      96                 :          1 :                                    mSouthToNorth.mInternalLanes,
      97   [ +  -  +  -  :          7 :                                    mSouthToWest.mInternalLanes});
             +  +  -  - ]
      98                 :            : }
      99                 :            : 
     100                 :          1 : lane::LaneIdSet IntersectionYieldWestToEastTest::expectedCrossingLanes() const
     101                 :            : {
     102                 :          1 :   return createUnorderedLaneIdSet({mNorthToEast.mInternalLanes,
     103                 :          1 :                                    mNorthToSouth.mInternalLanes,
     104                 :          1 :                                    mSouthToEast.mInternalLanes,
     105                 :          1 :                                    mSouthToNorth.mInternalLanes,
     106                 :          1 :                                    mSouthToWest.mInternalLanes,
     107   [ +  -  +  -  :          7 :                                    mEastToSouth.mInternalLanes});
             +  +  -  - ]
     108                 :            : }
     109                 :            : 
     110                 :          2 : TEST_F(IntersectionYieldWestToEastTest, basic_checks)
     111                 :            : {
     112                 :          1 :   performBasicChecks();
     113                 :          1 : }
     114                 :            : 
     115                 :          1 : lane::LaneId IntersectionYieldWestToSouthTest::getRouteEnd() const
     116                 :            : {
     117                 :          1 :   return mToSouth;
     118                 :            : }
     119                 :            : 
     120                 :          2 : lane::LaneIdSet IntersectionYieldWestToSouthTest::expectedIncomingLanesWithHigherPriority() const
     121                 :            : {
     122   [ +  -  +  -  :          6 :   return createUnorderedLaneIdSet({getIncomingLanesNorth(), getIncomingLanesSouth()});
             +  +  -  - ]
     123                 :            : }
     124                 :            : 
     125                 :          2 : lane::LaneIdSet IntersectionYieldWestToSouthTest::expectedIncomingLanesWithLowerPriority() const
     126                 :            : {
     127   [ +  -  +  -  :          4 :   return createUnorderedLaneIdSet({getIncomingLanesEast()});
             +  +  -  - ]
     128                 :            : }
     129                 :            : 
     130                 :          1 : lane::LaneIdSet IntersectionYieldWestToSouthTest::expectedInternalLanesWithHigherPriority() const
     131                 :            : {
     132                 :          1 :   return createUnorderedLaneIdSet({mNorthToWest.mInternalLanes,
     133                 :          1 :                                    mNorthToEast.mInternalLanes,
     134                 :          1 :                                    mNorthToSouth.mInternalLanes,
     135                 :          1 :                                    mSouthToEast.mInternalLanes,
     136                 :          1 :                                    mSouthToNorth.mInternalLanes,
     137   [ +  -  +  -  :          7 :                                    mSouthToWest.mInternalLanes});
             +  +  -  - ]
     138                 :            : }
     139                 :            : 
     140                 :          1 : lane::LaneIdSet IntersectionYieldWestToSouthTest::expectedCrossingLanes() const
     141                 :            : {
     142                 :            :   return createUnorderedLaneIdSet(
     143   [ +  -  +  -  :          4 :     {mNorthToEast.mInternalLanes, mNorthToSouth.mInternalLanes, mEastToSouth.mInternalLanes});
             +  +  -  - ]
     144                 :            : }
     145                 :            : 
     146                 :          2 : TEST_F(IntersectionYieldWestToSouthTest, basic_checks)
     147                 :            : {
     148                 :          1 :   performBasicChecks();
     149                 :          1 : }
     150                 :            : 
     151                 :          4 : lane::LaneId IntersectionYieldFromEastTest::getRouteStart() const
     152                 :            : {
     153                 :          4 :   return mFromEast;
     154                 :            : }
     155                 :            : 
     156                 :          4 : intersection::IntersectionType IntersectionYieldFromEastTest::expectedIntersectionType() const
     157                 :            : {
     158                 :          4 :   return intersection::IntersectionType::Yield;
     159                 :            : }
     160                 :            : 
     161                 :          1 : lane::LaneId IntersectionYieldEastToNorthTest::getRouteEnd() const
     162                 :            : {
     163                 :          1 :   return mToNorth;
     164                 :            : }
     165                 :            : 
     166                 :          2 : lane::LaneIdSet IntersectionYieldEastToNorthTest::expectedIncomingLanesWithHigherPriority() const
     167                 :            : {
     168   [ +  -  +  -  :          6 :   return createUnorderedLaneIdSet({getIncomingLanesNorth(), getIncomingLanesSouth()});
             +  +  -  - ]
     169                 :            : }
     170                 :            : 
     171                 :          2 : lane::LaneIdSet IntersectionYieldEastToNorthTest::expectedIncomingLanesWithLowerPriority() const
     172                 :            : {
     173   [ +  -  +  -  :          4 :   return createUnorderedLaneIdSet({getIncomingLanesWest()});
             +  +  -  - ]
     174                 :            : }
     175                 :            : 
     176                 :          1 : lane::LaneIdSet IntersectionYieldEastToNorthTest::expectedInternalLanesWithHigherPriority() const
     177                 :            : {
     178                 :          1 :   return createUnorderedLaneIdSet({mNorthToWest.mInternalLanes,
     179                 :          1 :                                    mNorthToEast.mInternalLanes,
     180                 :          1 :                                    mNorthToSouth.mInternalLanes,
     181                 :          1 :                                    mSouthToEast.mInternalLanes,
     182                 :          1 :                                    mSouthToNorth.mInternalLanes,
     183   [ +  -  +  -  :          7 :                                    mSouthToWest.mInternalLanes});
             +  +  -  - ]
     184                 :            : }
     185                 :            : 
     186                 :          1 : lane::LaneIdSet IntersectionYieldEastToNorthTest::expectedCrossingLanes() const
     187                 :            : {
     188                 :            :   return createUnorderedLaneIdSet(
     189   [ +  -  +  -  :          4 :     {mWestToNorth.mInternalLanes, mSouthToNorth.mInternalLanes, mSouthToWest.mInternalLanes});
             +  +  -  - ]
     190                 :            : }
     191                 :            : 
     192                 :          2 : TEST_F(IntersectionYieldEastToNorthTest, basic_checks)
     193                 :            : {
     194                 :          1 :   performBasicChecks();
     195                 :          1 : }
     196                 :            : 
     197                 :          1 : lane::LaneId IntersectionYieldEastToWestTest::getRouteEnd() const
     198                 :            : {
     199                 :          1 :   return mToWest;
     200                 :            : }
     201                 :            : 
     202                 :          2 : lane::LaneIdSet IntersectionYieldEastToWestTest::expectedIncomingLanesWithHigherPriority() const
     203                 :            : {
     204   [ +  -  +  -  :          6 :   return createUnorderedLaneIdSet({getIncomingLanesNorth(), getIncomingLanesSouth()});
             +  +  -  - ]
     205                 :            : }
     206                 :            : 
     207                 :          2 : lane::LaneIdSet IntersectionYieldEastToWestTest::expectedIncomingLanesWithLowerPriority() const
     208                 :            : {
     209                 :          2 :   return getIncomingLanesWest();
     210                 :            : }
     211                 :            : 
     212                 :          1 : lane::LaneIdSet IntersectionYieldEastToWestTest::expectedInternalLanesWithHigherPriority() const
     213                 :            : {
     214                 :          1 :   return createUnorderedLaneIdSet({mNorthToWest.mInternalLanes,
     215                 :          1 :                                    mNorthToEast.mInternalLanes,
     216                 :          1 :                                    mNorthToSouth.mInternalLanes,
     217                 :          1 :                                    mSouthToEast.mInternalLanes,
     218                 :          1 :                                    mSouthToNorth.mInternalLanes,
     219   [ +  -  +  -  :          7 :                                    mSouthToWest.mInternalLanes});
             +  +  -  - ]
     220                 :            : }
     221                 :            : 
     222                 :          1 : lane::LaneIdSet IntersectionYieldEastToWestTest::expectedCrossingLanes() const
     223                 :            : {
     224                 :          1 :   return createUnorderedLaneIdSet({mWestToNorth.mInternalLanes,
     225                 :          1 :                                    mNorthToEast.mInternalLanes,
     226                 :          1 :                                    mNorthToSouth.mInternalLanes,
     227                 :          1 :                                    mNorthToWest.mInternalLanes,
     228                 :          1 :                                    mSouthToNorth.mInternalLanes,
     229   [ +  -  +  -  :          7 :                                    mSouthToWest.mInternalLanes});
             +  +  -  - ]
     230                 :            : }
     231                 :            : 
     232                 :          2 : TEST_F(IntersectionYieldEastToWestTest, basic_checks)
     233                 :            : {
     234                 :          1 :   performBasicChecks();
     235                 :          1 : }
     236                 :            : 
     237                 :          2 : lane::LaneId IntersectionYieldEastToSouthTest::getRouteEnd() const
     238                 :            : {
     239                 :          2 :   return mToSouth;
     240                 :            : }
     241                 :            : 
     242                 :          4 : lane::LaneIdSet IntersectionYieldEastToSouthTest::expectedIncomingLanesWithHigherPriority() const
     243                 :            : {
     244   [ +  -  +  -  :         16 :   return createUnorderedLaneIdSet({getIncomingLanesNorth(), getIncomingLanesSouth(), getIncomingLanesWest()});
             +  +  -  - ]
     245                 :            : }
     246                 :            : 
     247                 :          4 : lane::LaneIdSet IntersectionYieldEastToSouthTest::expectedIncomingLanesWithLowerPriority() const
     248                 :            : {
     249                 :          4 :   return lane::LaneIdSet();
     250                 :            : }
     251                 :            : 
     252                 :          2 : lane::LaneIdSet IntersectionYieldEastToSouthTest::expectedInternalLanesWithHigherPriority() const
     253                 :            : {
     254                 :          2 :   return createUnorderedLaneIdSet({mNorthToWest.mInternalLanes,
     255                 :          2 :                                    mNorthToEast.mInternalLanes,
     256                 :          2 :                                    mNorthToSouth.mInternalLanes,
     257                 :          2 :                                    mSouthToEast.mInternalLanes,
     258                 :          2 :                                    mSouthToNorth.mInternalLanes,
     259                 :          2 :                                    mSouthToWest.mInternalLanes,
     260                 :          2 :                                    mWestToSouth.mInternalLanes,
     261                 :          2 :                                    mWestToEast.mInternalLanes,
     262   [ +  -  +  -  :         20 :                                    mWestToNorth.mInternalLanes});
             +  +  -  - ]
     263                 :            : }
     264                 :            : 
     265                 :          2 : lane::LaneIdSet IntersectionYieldEastToSouthTest::expectedCrossingLanes() const
     266                 :            : {
     267                 :          2 :   return createUnorderedLaneIdSet({mNorthToEast.mInternalLanes,
     268                 :          2 :                                    mNorthToWest.mInternalLanes,
     269                 :          2 :                                    mNorthToSouth.mInternalLanes,
     270                 :          2 :                                    mSouthToWest.mInternalLanes,
     271                 :          2 :                                    mSouthToNorth.mInternalLanes,
     272                 :          2 :                                    mWestToSouth.mInternalLanes,
     273                 :          2 :                                    mWestToEast.mInternalLanes,
     274   [ +  -  +  -  :         18 :                                    mWestToNorth.mInternalLanes});
             +  +  -  - ]
     275                 :            : }
     276                 :            : 
     277                 :          2 : TEST_F(IntersectionYieldEastToSouthTest, basic_checks)
     278                 :            : {
     279                 :          1 :   performBasicChecks();
     280                 :          1 : }
     281                 :            : 
     282                 :         13 : lane::LaneId IntersectionYieldFromNorthTest::getRouteStart() const
     283                 :            : {
     284                 :         13 :   return mFromNorth;
     285                 :            : }
     286                 :            : 
     287                 :         13 : intersection::IntersectionType IntersectionYieldFromNorthTest::expectedIntersectionType() const
     288                 :            : {
     289                 :         13 :   return intersection::IntersectionType::HasWay;
     290                 :            : }
     291                 :            : 
     292                 :          1 : lane::LaneId IntersectionYieldNorthToEastTest::getRouteEnd() const
     293                 :            : {
     294                 :          1 :   return mToEast;
     295                 :            : }
     296                 :            : 
     297                 :          2 : lane::LaneIdSet IntersectionYieldNorthToEastTest::expectedIncomingLanesWithHigherPriority() const
     298                 :            : {
     299                 :          2 :   return getIncomingLanesSouth();
     300                 :            : }
     301                 :            : 
     302                 :          2 : lane::LaneIdSet IntersectionYieldNorthToEastTest::expectedIncomingLanesWithLowerPriority() const
     303                 :            : {
     304   [ +  -  +  -  :          6 :   return createUnorderedLaneIdSet({getIncomingLanesWest(), getIncomingLanesEast()});
             +  +  -  - ]
     305                 :            : }
     306                 :            : 
     307                 :          1 : lane::LaneIdSet IntersectionYieldNorthToEastTest::expectedInternalLanesWithHigherPriority() const
     308                 :            : {
     309                 :            :   return createUnorderedLaneIdSet(
     310   [ +  -  +  -  :          4 :     {mSouthToEast.mInternalLanes, mSouthToNorth.mInternalLanes, mSouthToWest.mInternalLanes});
             +  +  -  - ]
     311                 :            : }
     312                 :            : 
     313                 :          1 : lane::LaneIdSet IntersectionYieldNorthToEastTest::expectedCrossingLanes() const
     314                 :            : {
     315                 :          1 :   return createUnorderedLaneIdSet({mWestToNorth.mInternalLanes,
     316                 :          1 :                                    mWestToSouth.mInternalLanes,
     317                 :          1 :                                    mWestToEast.mInternalLanes,
     318                 :          1 :                                    mEastToSouth.mInternalLanes,
     319                 :          1 :                                    mEastToWest.mInternalLanes,
     320                 :          1 :                                    mSouthToEast.mInternalLanes,
     321                 :          1 :                                    mSouthToNorth.mInternalLanes,
     322   [ +  -  +  -  :          9 :                                    mSouthToWest.mInternalLanes});
             +  +  -  - ]
     323                 :            : }
     324                 :            : 
     325                 :          2 : TEST_F(IntersectionYieldNorthToEastTest, basic_checks)
     326                 :            : {
     327                 :          1 :   performBasicChecks();
     328                 :          1 : }
     329                 :            : 
     330                 :          1 : lane::LaneId IntersectionYieldNorthToWestTest::getRouteEnd() const
     331                 :            : {
     332                 :          1 :   return mToWest;
     333                 :            : }
     334                 :            : 
     335                 :          2 : lane::LaneIdSet IntersectionYieldNorthToWestTest::expectedIncomingLanesWithHigherPriority() const
     336                 :            : {
     337                 :          2 :   return lane::LaneIdSet();
     338                 :            : }
     339                 :            : 
     340                 :          2 : lane::LaneIdSet IntersectionYieldNorthToWestTest::expectedIncomingLanesWithLowerPriority() const
     341                 :            : {
     342   [ +  -  +  -  :          8 :   return createUnorderedLaneIdSet({getIncomingLanesWest(), getIncomingLanesEast(), getIncomingLanesSouth()});
             +  +  -  - ]
     343                 :            : }
     344                 :            : 
     345                 :          1 : lane::LaneIdSet IntersectionYieldNorthToWestTest::expectedInternalLanesWithHigherPriority() const
     346                 :            : {
     347                 :          1 :   return lane::LaneIdSet();
     348                 :            : }
     349                 :            : 
     350                 :          1 : lane::LaneIdSet IntersectionYieldNorthToWestTest::expectedCrossingLanes() const
     351                 :            : {
     352                 :            :   return createUnorderedLaneIdSet(
     353   [ +  -  +  -  :          4 :     {mSouthToWest.mInternalLanes, mEastToSouth.mInternalLanes, mEastToWest.mInternalLanes});
             +  +  -  - ]
     354                 :            : }
     355                 :            : 
     356                 :          2 : TEST_F(IntersectionYieldNorthToWestTest, basic_checks)
     357                 :            : {
     358                 :          1 :   performBasicChecks();
     359                 :          1 : }
     360                 :            : 
     361                 :         11 : lane::LaneId IntersectionYieldNorthToSouthTest::getRouteEnd() const
     362                 :            : {
     363                 :         11 :   return mToSouth;
     364                 :            : }
     365                 :            : 
     366                 :         22 : lane::LaneIdSet IntersectionYieldNorthToSouthTest::expectedIncomingLanesWithHigherPriority() const
     367                 :            : {
     368                 :         22 :   return lane::LaneIdSet();
     369                 :            : }
     370                 :            : 
     371                 :         22 : lane::LaneIdSet IntersectionYieldNorthToSouthTest::expectedIncomingLanesWithLowerPriority() const
     372                 :            : {
     373   [ +  -  +  -  :         88 :   return createUnorderedLaneIdSet({getIncomingLanesWest(), getIncomingLanesEast(), getIncomingLanesSouth()});
             +  +  -  - ]
     374                 :            : }
     375                 :            : 
     376                 :         11 : lane::LaneIdSet IntersectionYieldNorthToSouthTest::expectedInternalLanesWithHigherPriority() const
     377                 :            : {
     378                 :         11 :   return lane::LaneIdSet();
     379                 :            : }
     380                 :            : 
     381                 :         11 : lane::LaneIdSet IntersectionYieldNorthToSouthTest::expectedCrossingLanes() const
     382                 :            : {
     383                 :         11 :   return createUnorderedLaneIdSet({mSouthToWest.mInternalLanes,
     384                 :         11 :                                    mWestToNorth.mInternalLanes,
     385                 :         11 :                                    mWestToSouth.mInternalLanes,
     386                 :         11 :                                    mWestToEast.mInternalLanes,
     387                 :         11 :                                    mEastToSouth.mInternalLanes,
     388   [ +  -  +  -  :         77 :                                    mEastToWest.mInternalLanes});
             +  +  -  - ]
     389                 :            : }
     390                 :            : 
     391                 :          2 : TEST_F(IntersectionYieldNorthToSouthTest, basic_checks)
     392                 :            : {
     393                 :          1 :   performBasicChecks();
     394                 :          1 : }
     395                 :            : 
     396                 :          3 : lane::LaneId IntersectionYieldFromSouthTest::getRouteStart() const
     397                 :            : {
     398                 :          3 :   return mFromSouth;
     399                 :            : }
     400                 :            : 
     401                 :          3 : intersection::IntersectionType IntersectionYieldFromSouthTest::expectedIntersectionType() const
     402                 :            : {
     403                 :          3 :   return intersection::IntersectionType::HasWay;
     404                 :            : }
     405                 :            : 
     406                 :          1 : lane::LaneId IntersectionYieldSouthToEastTest::getRouteEnd() const
     407                 :            : {
     408                 :          1 :   return mToEast;
     409                 :            : }
     410                 :            : 
     411                 :          2 : lane::LaneIdSet IntersectionYieldSouthToEastTest::expectedIncomingLanesWithHigherPriority() const
     412                 :            : {
     413                 :          2 :   return lane::LaneIdSet();
     414                 :            : }
     415                 :            : 
     416                 :          2 : lane::LaneIdSet IntersectionYieldSouthToEastTest::expectedIncomingLanesWithLowerPriority() const
     417                 :            : {
     418   [ +  -  +  -  :          8 :   return createUnorderedLaneIdSet({getIncomingLanesWest(), getIncomingLanesEast(), getIncomingLanesNorth()});
             +  +  -  - ]
     419                 :            : }
     420                 :            : 
     421                 :          1 : lane::LaneIdSet IntersectionYieldSouthToEastTest::expectedInternalLanesWithHigherPriority() const
     422                 :            : {
     423                 :          1 :   return lane::LaneIdSet();
     424                 :            : }
     425                 :            : 
     426                 :          1 : lane::LaneIdSet IntersectionYieldSouthToEastTest::expectedCrossingLanes() const
     427                 :            : {
     428                 :            :   return createUnorderedLaneIdSet(
     429   [ +  -  +  -  :          4 :     {mNorthToEast.mInternalLanes, mWestToEast.mInternalLanes, mWestToNorth.mInternalLanes});
             +  +  -  - ]
     430                 :            : }
     431                 :            : 
     432                 :          2 : TEST_F(IntersectionYieldSouthToEastTest, basic_checks)
     433                 :            : {
     434                 :          1 :   performBasicChecks();
     435                 :          1 : }
     436                 :            : 
     437                 :          1 : lane::LaneId IntersectionYieldSouthToWestTest::getRouteEnd() const
     438                 :            : {
     439                 :          1 :   return mToWest;
     440                 :            : }
     441                 :            : 
     442                 :          2 : lane::LaneIdSet IntersectionYieldSouthToWestTest::expectedIncomingLanesWithHigherPriority() const
     443                 :            : {
     444                 :          2 :   return getIncomingLanesNorth();
     445                 :            : }
     446                 :            : 
     447                 :          2 : lane::LaneIdSet IntersectionYieldSouthToWestTest::expectedIncomingLanesWithLowerPriority() const
     448                 :            : {
     449   [ +  -  +  -  :          6 :   return createUnorderedLaneIdSet({getIncomingLanesWest(), getIncomingLanesEast()});
             +  +  -  - ]
     450                 :            : }
     451                 :            : 
     452                 :          1 : lane::LaneIdSet IntersectionYieldSouthToWestTest::expectedInternalLanesWithHigherPriority() const
     453                 :            : {
     454                 :            :   return createUnorderedLaneIdSet(
     455   [ +  -  +  -  :          4 :     {mNorthToWest.mInternalLanes, mNorthToEast.mInternalLanes, mNorthToSouth.mInternalLanes});
             +  +  -  - ]
     456                 :            : }
     457                 :            : 
     458                 :          1 : lane::LaneIdSet IntersectionYieldSouthToWestTest::expectedCrossingLanes() const
     459                 :            : {
     460                 :          1 :   return createUnorderedLaneIdSet({mWestToNorth.mInternalLanes,
     461                 :          1 :                                    mWestToEast.mInternalLanes,
     462                 :          1 :                                    mEastToNorth.mInternalLanes,
     463                 :          1 :                                    mEastToSouth.mInternalLanes,
     464                 :          1 :                                    mEastToWest.mInternalLanes,
     465                 :          1 :                                    mNorthToWest.mInternalLanes,
     466                 :          1 :                                    mNorthToEast.mInternalLanes,
     467   [ +  -  +  -  :          9 :                                    mNorthToSouth.mInternalLanes});
             +  +  -  - ]
     468                 :            : }
     469                 :            : 
     470                 :          2 : TEST_F(IntersectionYieldSouthToWestTest, basic_checks)
     471                 :            : {
     472                 :          1 :   performBasicChecks();
     473                 :          1 : }
     474                 :            : 
     475                 :          1 : lane::LaneId IntersectionYieldSouthToNorthTest::getRouteEnd() const
     476                 :            : {
     477                 :          1 :   return mToNorth;
     478                 :            : }
     479                 :            : 
     480                 :          2 : lane::LaneIdSet IntersectionYieldSouthToNorthTest::expectedIncomingLanesWithHigherPriority() const
     481                 :            : {
     482                 :          2 :   return lane::LaneIdSet();
     483                 :            : }
     484                 :            : 
     485                 :          2 : lane::LaneIdSet IntersectionYieldSouthToNorthTest::expectedIncomingLanesWithLowerPriority() const
     486                 :            : {
     487   [ +  -  +  -  :          8 :   return createUnorderedLaneIdSet({getIncomingLanesWest(), getIncomingLanesEast(), getIncomingLanesNorth()});
             +  +  -  - ]
     488                 :            : }
     489                 :            : 
     490                 :          1 : lane::LaneIdSet IntersectionYieldSouthToNorthTest::expectedInternalLanesWithHigherPriority() const
     491                 :            : {
     492                 :          1 :   return lane::LaneIdSet();
     493                 :            : }
     494                 :            : 
     495                 :          1 : lane::LaneIdSet IntersectionYieldSouthToNorthTest::expectedCrossingLanes() const
     496                 :            : {
     497                 :          1 :   return createUnorderedLaneIdSet({mNorthToEast.mInternalLanes,
     498                 :          1 :                                    mWestToNorth.mInternalLanes,
     499                 :          1 :                                    mWestToEast.mInternalLanes,
     500                 :          1 :                                    mEastToNorth.mInternalLanes,
     501                 :          1 :                                    mEastToSouth.mInternalLanes,
     502   [ +  -  +  -  :          7 :                                    mEastToWest.mInternalLanes});
             +  +  -  - ]
     503                 :            : }
     504                 :            : 
     505                 :          2 : TEST_F(IntersectionYieldSouthToNorthTest, basic_checks)
     506                 :            : {
     507                 :          1 :   performBasicChecks();
     508                 :          1 : }
     509                 :            : 
     510                 :            : } // namespace map
     511                 :            : } // namespace ad

Generated by: LCOV version 1.14