LCOV - code coverage report
Current view: top level - tests/generated/ad/map/match - ObjectReferencePointsTests.cpp (source / functions) Hit Total Coverage
Test: ad_map_access Lines: 42 42 100.0 %
Date: 2022-10-04 09:48:07 Functions: 6 6 100.0 %
Branches: 83 296 28.0 %

           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                 :            : #if defined(__clang__) && (__clang_major__ >= 7)
      16                 :            : #pragma GCC diagnostic push
      17                 :            : #pragma GCC diagnostic ignored "-Wself-assign-overloaded"
      18                 :            : #endif
      19                 :            : 
      20                 :            : #include <gtest/gtest.h>
      21                 :            : #include <limits>
      22                 :            : #include "ad/map/match/ObjectReferencePoints.hpp"
      23                 :            : 
      24                 :          2 : TEST(ObjectReferencePointsTests, testFromString)
      25                 :            : {
      26   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("FrontLeft"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      27                 :            :             ::ad::map::match::ObjectReferencePoints::FrontLeft);
      28   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("::ad::map::match::ObjectReferencePoints::FrontLeft"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      29                 :            :             ::ad::map::match::ObjectReferencePoints::FrontLeft);
      30                 :            : 
      31   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("FrontRight"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      32                 :            :             ::ad::map::match::ObjectReferencePoints::FrontRight);
      33   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("::ad::map::match::ObjectReferencePoints::FrontRight"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      34                 :            :             ::ad::map::match::ObjectReferencePoints::FrontRight);
      35                 :            : 
      36   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("RearLeft"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      37                 :            :             ::ad::map::match::ObjectReferencePoints::RearLeft);
      38   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("::ad::map::match::ObjectReferencePoints::RearLeft"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      39                 :            :             ::ad::map::match::ObjectReferencePoints::RearLeft);
      40                 :            : 
      41   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("RearRight"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      42                 :            :             ::ad::map::match::ObjectReferencePoints::RearRight);
      43   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("::ad::map::match::ObjectReferencePoints::RearRight"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      44                 :            :             ::ad::map::match::ObjectReferencePoints::RearRight);
      45                 :            : 
      46   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("Center"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      47                 :            :             ::ad::map::match::ObjectReferencePoints::Center);
      48   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("::ad::map::match::ObjectReferencePoints::Center"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      49                 :            :             ::ad::map::match::ObjectReferencePoints::Center);
      50                 :            : 
      51   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("NumPoints"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      52                 :            :             ::ad::map::match::ObjectReferencePoints::NumPoints);
      53   [ +  -  +  -  :          1 :   ASSERT_EQ(fromString<::ad::map::match::ObjectReferencePoints>("::ad::map::match::ObjectReferencePoints::NumPoints"),
          +  -  -  +  -  
             -  -  -  -  
                      - ]
      54                 :            :             ::ad::map::match::ObjectReferencePoints::NumPoints);
      55                 :            : 
      56   [ +  -  +  -  :          4 :   EXPECT_ANY_THROW({ fromString<::ad::map::match::ObjectReferencePoints>("NOT A VALID ENUM LITERAL"); });
          +  -  +  -  -  
          +  -  +  -  -  
                   -  - ]
      57                 :            : }
      58                 :            : 
      59                 :          2 : TEST(ObjectReferencePointsTests, testToString)
      60                 :            : {
      61                 :          1 :   int32_t minValue = std::numeric_limits<int32_t>::max();
      62                 :          1 :   int32_t maxValue = std::numeric_limits<int32_t>::min();
      63                 :            : 
      64   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(::ad::map::match::ObjectReferencePoints::FrontLeft),
          -  +  -  -  -  
                -  -  - ]
      65                 :            :             "::ad::map::match::ObjectReferencePoints::FrontLeft");
      66                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::FrontLeft));
      67                 :          1 :   maxValue = std::max(maxValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::FrontLeft));
      68                 :            : 
      69   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(::ad::map::match::ObjectReferencePoints::FrontRight),
          -  +  -  -  -  
                -  -  - ]
      70                 :            :             "::ad::map::match::ObjectReferencePoints::FrontRight");
      71                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::FrontRight));
      72                 :          1 :   maxValue = std::max(maxValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::FrontRight));
      73                 :            : 
      74   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(::ad::map::match::ObjectReferencePoints::RearLeft),
          -  +  -  -  -  
                -  -  - ]
      75                 :            :             "::ad::map::match::ObjectReferencePoints::RearLeft");
      76                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::RearLeft));
      77                 :          1 :   maxValue = std::max(maxValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::RearLeft));
      78                 :            : 
      79   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(::ad::map::match::ObjectReferencePoints::RearRight),
          -  +  -  -  -  
                -  -  - ]
      80                 :            :             "::ad::map::match::ObjectReferencePoints::RearRight");
      81                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::RearRight));
      82                 :          1 :   maxValue = std::max(maxValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::RearRight));
      83                 :            : 
      84   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(::ad::map::match::ObjectReferencePoints::Center),
          -  +  -  -  -  
                -  -  - ]
      85                 :            :             "::ad::map::match::ObjectReferencePoints::Center");
      86                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::Center));
      87                 :          1 :   maxValue = std::max(maxValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::Center));
      88                 :            : 
      89   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(::ad::map::match::ObjectReferencePoints::NumPoints),
          -  +  -  -  -  
                -  -  - ]
      90                 :            :             "::ad::map::match::ObjectReferencePoints::NumPoints");
      91                 :          1 :   minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::NumPoints));
      92                 :          1 :   maxValue = std::max(maxValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::NumPoints));
      93                 :            : 
      94   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(static_cast<::ad::map::match::ObjectReferencePoints>(minValue - 1)), "UNKNOWN ENUM VALUE");
          -  +  -  -  -  
                -  -  - ]
      95   [ +  -  +  -  :          2 :   ASSERT_EQ(toString(static_cast<::ad::map::match::ObjectReferencePoints>(maxValue + 1)), "UNKNOWN ENUM VALUE");
          -  +  -  -  -  
                -  -  - ]
      96                 :            : }
      97                 :            : 
      98                 :          2 : TEST(ObjectReferencePointsTests, ostreamOperatorTest)
      99                 :            : {
     100         [ +  - ]:          1 :   std::stringstream stream;
     101                 :          1 :   ::ad::map::match::ObjectReferencePoints value(::ad::map::match::ObjectReferencePoints::FrontLeft);
     102         [ +  - ]:          1 :   stream << value;
     103   [ +  -  +  -  :          1 :   ASSERT_GT(stream.str().size(), 0u);
          -  +  -  -  -  
                -  -  - ]
     104                 :            : }
     105                 :            : 
     106                 :            : #if defined(__clang__) && (__clang_major__ >= 7)
     107                 :            : #pragma GCC diagnostic pop
     108                 :            : #endif

Generated by: LCOV version 1.14