LCOV - code coverage report
Current view: top level - generated/include/ad/rss/situation - LateralRelativePositionValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 10 10 100.0 %
Date: 2024-04-16 14:13:10 Functions: 1 1 100.0 %
Branches: 14 16 87.5 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * ----------------- BEGIN LICENSE BLOCK ---------------------------------
       3                 :            :  *
       4                 :            :  * Copyright (C) 2018-2020 Intel Corporation
       5                 :            :  *
       6                 :            :  * SPDX-License-Identifier: LGPL-2.1-only
       7                 :            :  *
       8                 :            :  * ----------------- END LICENSE BLOCK -----------------------------------
       9                 :            :  */
      10                 :            : 
      11                 :            : /**
      12                 :            :  * Generated file
      13                 :            :  * @file
      14                 :            :  *
      15                 :            :  * Generator Version : 11.0.0-1997
      16                 :            :  */
      17                 :            : 
      18                 :            : #pragma once
      19                 :            : 
      20                 :            : #include <cmath>
      21                 :            : #include <limits>
      22                 :            : #include "ad/rss/situation/LateralRelativePosition.hpp"
      23                 :            : #include "spdlog/fmt/ostr.h"
      24                 :            : #include "spdlog/spdlog.h"
      25                 :            : 
      26                 :            : /*!
      27                 :            :  * \brief check if the given LateralRelativePosition is within valid input range
      28                 :            :  *
      29                 :            :  * \param[in] input the LateralRelativePosition as an input value
      30                 :            :  * \param[in] logErrors enables error logging
      31                 :            :  *
      32                 :            :  * \returns \c true if LateralRelativePosition is considered to be within the specified input range
      33                 :            :  *
      34                 :            :  * \note the specified input range is defined by the valid enum literals.
      35                 :            :  */
      36                 :      56139 : inline bool withinValidInputRange(::ad::rss::situation::LateralRelativePosition const &input,
      37                 :            :                                   bool const logErrors = true)
      38                 :            : {
      39                 :     112278 :   bool inValidInputRange = (input == ::ad::rss::situation::LateralRelativePosition::AtLeft)
      40         [ +  + ]:      54224 :     || (input == ::ad::rss::situation::LateralRelativePosition::OverlapLeft)
      41         [ +  + ]:      54122 :     || (input == ::ad::rss::situation::LateralRelativePosition::Overlap)
      42         [ +  + ]:       1195 :     || (input == ::ad::rss::situation::LateralRelativePosition::OverlapRight)
      43   [ +  +  +  + ]:     110363 :     || (input == ::ad::rss::situation::LateralRelativePosition::AtRight);
      44   [ +  +  +  - ]:      56139 :   if (!inValidInputRange && logErrors)
      45                 :            :   {
      46         [ +  - ]:          3 :     spdlog::error("withinValidInputRange(::ad::rss::situation::LateralRelativePosition)>> {}, raw value: {} ",
      47                 :            :                   input,
      48                 :          6 :                   static_cast<int32_t>(input)); // LCOV_EXCL_BR_LINE
      49                 :            :   }
      50                 :      56139 :   return inValidInputRange;
      51                 :            : }

Generated by: LCOV version 1.14