LCOV - code coverage report
Current view: top level - generated/include/ad/rss/world - LaneDrivingDirectionValidInputRange.hpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 8 8 100.0 %
Date: 2024-05-02 12:32:33 Functions: 1 1 100.0 %
Branches: 10 12 83.3 %

           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/world/LaneDrivingDirection.hpp"
      23                 :            : #include "spdlog/fmt/ostr.h"
      24                 :            : #include "spdlog/spdlog.h"
      25                 :            : 
      26                 :            : /*!
      27                 :            :  * \brief check if the given LaneDrivingDirection is within valid input range
      28                 :            :  *
      29                 :            :  * \param[in] input the LaneDrivingDirection as an input value
      30                 :            :  * \param[in] logErrors enables error logging
      31                 :            :  *
      32                 :            :  * \returns \c true if LaneDrivingDirection 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                 :     135080 : inline bool withinValidInputRange(::ad::rss::world::LaneDrivingDirection const &input, bool const logErrors = true)
      37                 :            : {
      38                 :     270160 :   bool inValidInputRange = (input == ::ad::rss::world::LaneDrivingDirection::Bidirectional)
      39         [ +  + ]:     128140 :     || (input == ::ad::rss::world::LaneDrivingDirection::Positive)
      40   [ +  +  +  + ]:     263220 :     || (input == ::ad::rss::world::LaneDrivingDirection::Negative);
      41   [ +  +  +  - ]:     135080 :   if (!inValidInputRange && logErrors)
      42                 :            :   {
      43         [ +  - ]:          3 :     spdlog::error("withinValidInputRange(::ad::rss::world::LaneDrivingDirection)>> {}, raw value: {} ",
      44                 :            :                   input,
      45                 :          6 :                   static_cast<int32_t>(input)); // LCOV_EXCL_BR_LINE
      46                 :            :   }
      47                 :     135080 :   return inValidInputRange;
      48                 :            : }

Generated by: LCOV version 1.14