LCOV - code coverage report
Current view: top level - tests/generated/ad/rss/state - UnstructuredSceneResponseValidInputRangeTests.cpp (source / functions) Hit Total Coverage
Test: ad_rss Lines: 12 12 100.0 %
Date: 2024-12-17 12:06:18 Functions: 4 4 100.0 %
Branches: 10 60 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: 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/UnstructuredSceneResponseValidInputRange.hpp"
      20                 :            : 
      21                 :          2 : TEST(UnstructuredSceneResponseValidInputRangeTests, testValidInputRangeValid)
      22                 :            : {
      23   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::rss::state::UnstructuredSceneResponse::None));
          -  -  -  -  -  
                -  -  - ]
      24   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::rss::state::UnstructuredSceneResponse::ContinueForward));
          -  -  -  -  -  
                -  -  - ]
      25   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::rss::state::UnstructuredSceneResponse::DriveAway));
          -  -  -  -  -  
                -  -  - ]
      26   [ +  -  -  +  :          1 :   ASSERT_TRUE(withinValidInputRange(::ad::rss::state::UnstructuredSceneResponse::Brake));
          -  -  -  -  -  
                -  -  - ]
      27                 :            : }
      28                 :            : 
      29                 :          2 : TEST(UnstructuredSceneResponseValidInputRangeTests, testValidInputRangeInvalid)
      30                 :            : {
      31                 :          1 :   int32_t minValue = std::numeric_limits<int32_t>::max();
      32                 :            : 
      33                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::rss::state::UnstructuredSceneResponse::None));
      34                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::rss::state::UnstructuredSceneResponse::ContinueForward));
      35                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::rss::state::UnstructuredSceneResponse::DriveAway));
      36                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::rss::state::UnstructuredSceneResponse::Brake));
      37                 :            : 
      38   [ +  -  -  +  :          1 :   ASSERT_FALSE(withinValidInputRange(static_cast<::ad::rss::state::UnstructuredSceneResponse>(minValue - 1)));
          -  -  -  -  -  
                -  -  - ]
      39                 :            : }

Generated by: LCOV version 1.14