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/physics/Distance3DListValidInputRange.hpp" 20 : : 21 : 2 : TEST(Distance3DListValidInputRangeTests, testValidInputRangeValidInputRangeMin) 22 : : { 23 : 1 : ::ad::physics::Distance3DList value; 24 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(value)); - - - - - - - - ] 25 : : } 26 : : 27 : 2 : TEST(Distance3DListValidInputRangeTests, testValidInputRangeElementValid) 28 : : { 29 : 1 : ::ad::physics::Distance3DList value; 30 : 1 : ::ad::physics::Distance3D element; 31 : 1 : ::ad::physics::Distance elementX(-1e9); 32 : 1 : element.x = elementX; 33 : 1 : ::ad::physics::Distance elementY(-1e9); 34 : 1 : element.y = elementY; 35 : 1 : ::ad::physics::Distance elementZ(-1e9); 36 : 1 : element.z = elementZ; 37 [ + - ]: 1 : value.push_back(element); 38 [ + - - + : 1 : ASSERT_TRUE(withinValidInputRange(value)); - - - - - - - - ] 39 : : } 40 : : 41 : 2 : TEST(Distance3DListValidInputRangeTests, testValidInputRangeElementInvalid) 42 : : { 43 : 1 : ::ad::physics::Distance3DList value; 44 : 1 : ::ad::physics::Distance3D element; 45 : 1 : ::ad::physics::Distance elementX(-1e9 * 1.1); 46 : 1 : element.x = elementX; 47 [ + - ]: 1 : value.push_back(element); 48 [ + - - + : 1 : ASSERT_FALSE(withinValidInputRange(value)); - - - - - - - - ] 49 : : }