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/match/ObjectReferencePointsValidInputRange.hpp" 20 : : 21 : 2 : TEST(ObjectReferencePointsValidInputRangeTests, testValidInputRangeValid) 22 : : { 23 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::match::ObjectReferencePoints::FrontLeft)); - - - - - - - - ] 24 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::match::ObjectReferencePoints::FrontRight)); - - - - - - - - ] 25 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::match::ObjectReferencePoints::RearLeft)); - - - - - - - - ] 26 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::match::ObjectReferencePoints::RearRight)); - - - - - - - - ] 27 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::match::ObjectReferencePoints::Center)); - - - - - - - - ] 28 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(::ad::map::match::ObjectReferencePoints::NumPoints)); - - - - - - - - ] 29 : : } 30 : : 31 : 2 : TEST(ObjectReferencePointsValidInputRangeTests, testValidInputRangeInvalid) 32 : : { 33 : 1 : int32_t minValue = std::numeric_limits<int32_t>::max(); 34 : : 35 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::FrontLeft)); 36 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::FrontRight)); 37 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::RearLeft)); 38 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::RearRight)); 39 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::Center)); 40 : 1 : minValue = std::min(minValue, static_cast<int32_t>(::ad::map::match::ObjectReferencePoints::NumPoints)); 41 : : 42 [ + - - + : 1 : ASSERT_FALSE(withinValidInputRange(static_cast<::ad::map::match::ObjectReferencePoints>(minValue - 1))); - - - - - - - - ] 43 : : }