LCOV - code coverage report
Current view: top level - tests/generated/ad/map/lane - ContactLocationValidInputRangeTests.cpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 18 18 100.0 %
Date: 2022-10-04 09:48:07 Functions: 4 4 100.0 %
Branches: 16 96 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: MIT
       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/map/lane/ContactLocationValidInputRange.hpp"
      20                 :            : 
      21                 :          2 : TEST(ContactLocationValidInputRangeTests, testValidInputRangeValid)
      22                 :            : {
      23   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactLocation::INVALID));
          -  -  -  -  -  
                -  -  - ]
      24   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactLocation::UNKNOWN));
          -  -  -  -  -  
                -  -  - ]
      25   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactLocation::LEFT));
          -  -  -  -  -  
                -  -  - ]
      26   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactLocation::RIGHT));
          -  -  -  -  -  
                -  -  - ]
      27   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactLocation::SUCCESSOR));
          -  -  -  -  -  
                -  -  - ]
      28   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactLocation::PREDECESSOR));
          -  -  -  -  -  
                -  -  - ]
      29   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::map::lane::ContactLocation::OVERLAP));
          -  -  -  -  -  
                -  -  - ]
      30                 :            : }
      31                 :            : 
      32                 :          2 : TEST(ContactLocationValidInputRangeTests, testValidInputRangeInvalid)
      33                 :            : {
      34                 :          1 :   int32_t minValue = std::numeric_limits<int32_t>::max();
      35                 :            : 
      36                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactLocation::INVALID));
      37                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactLocation::UNKNOWN));
      38                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactLocation::LEFT));
      39                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactLocation::RIGHT));
      40                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactLocation::SUCCESSOR));
      41                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactLocation::PREDECESSOR));
      42                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::lane::ContactLocation::OVERLAP));
      43                 :            : 
      44   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(static_cast<::ad::map::lane::ContactLocation>(minValue - 1)));
          -  -  -  -  -  
                -  -  - ]
      45                 :            : }

Generated by: LCOV version 1.14