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/restriction/SpeedLimitListValidInputRange.hpp" 20 : : 21 : 2 : TEST(SpeedLimitListValidInputRangeTests, testValidInputRangeValidInputRangeMin) 22 : : { 23 : 1 : ::ad::map::restriction::SpeedLimitList value; 24 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(value)); - - - - - - - - ] 25 : : } 26 : : 27 : 2 : TEST(SpeedLimitListValidInputRangeTests, testValidInputRangeElementValid) 28 : : { 29 : 1 : ::ad::map::restriction::SpeedLimitList value; 30 : 1 : ::ad::map::restriction::SpeedLimit element; 31 : 1 : ::ad::physics::Speed elementSpeedLimit(-100.); 32 : 1 : element.speedLimit = elementSpeedLimit; 33 : 1 : ::ad::physics::ParametricRange elementLanePiece; 34 : 1 : ::ad::physics::ParametricValue elementLanePieceMinimum(0.); 35 : 1 : elementLanePiece.minimum = elementLanePieceMinimum; 36 : 1 : ::ad::physics::ParametricValue elementLanePieceMaximum(0.); 37 : 1 : elementLanePiece.maximum = elementLanePieceMaximum; 38 : 1 : elementLanePiece.maximum = elementLanePiece.minimum; 39 : 1 : elementLanePiece.minimum = elementLanePiece.maximum; 40 : 1 : element.lanePiece = elementLanePiece; 41 [ + - ]: 1 : value.push_back(element); 42 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(value)); - - - - - - - - ] 43 : : } 44 : : 45 : 2 : TEST(SpeedLimitListValidInputRangeTests, testValidInputRangeElementInvalid) 46 : : { 47 : 1 : ::ad::map::restriction::SpeedLimitList value; 48 : 1 : ::ad::map::restriction::SpeedLimit element; 49 : 1 : ::ad::physics::Speed elementSpeedLimit(-100. * 1.1); 50 : 1 : element.speedLimit = elementSpeedLimit; 51 [ + - ]: 1 : value.push_back(element); 52 [ + - - + : 1 : ASSERT_FALSE(withinValidInputRange(value)); - - - - - - - - ] 53 : : }