X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftest-compare-types.h;h=fcadd6fa5f65156795822b7e9612ec44ccd19e74;hp=d917107aba831aa178199357cb03a628bf9b733f;hb=e9918a6cbefb626531bee6e41ac77b9625b11343;hpb=cb7cc9ab6f5f23df170d03dac7ebfaf114f5f4a2 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-compare-types.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-compare-types.h index d917107..fcadd6f 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-compare-types.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-compare-types.h @@ -2,7 +2,7 @@ #define DALI_TEST_COMPARE_TYPES_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -111,109 +111,4 @@ inline bool CompareType(Extents extents1, Extents extents2, float epsil (extents1.bottom == extents2.bottom); } -template<> -inline bool CompareType(Property::Value q1, Property::Value q2, float epsilon) -{ - Property::Type type = q1.GetType(); - if(type != q2.GetType()) - { - return false; - } - - bool result = false; - switch(type) - { - case Property::BOOLEAN: - { - bool a, b; - q1.Get(a); - q2.Get(b); - result = a == b; - break; - } - case Property::INTEGER: - { - int a, b; - q1.Get(a); - q2.Get(b); - result = a == b; - break; - } - case Property::FLOAT: - { - float a, b; - q1.Get(a); - q2.Get(b); - result = CompareType(a, b, epsilon); - break; - } - case Property::VECTOR2: - { - Vector2 a, b; - q1.Get(a); - q2.Get(b); - result = CompareType(a, b, epsilon); - break; - } - case Property::VECTOR3: - { - Vector3 a, b; - q1.Get(a); - q2.Get(b); - result = CompareType(a, b, epsilon); - break; - } - case Property::RECTANGLE: - case Property::VECTOR4: - { - Vector4 a, b; - q1.Get(a); - q2.Get(b); - result = CompareType(a, b, epsilon); - break; - } - case Property::ROTATION: - { - Quaternion a, b; - q1.Get(a); - q2.Get(b); - result = CompareType(a, b, epsilon); - break; - } - case Property::STRING: - { - std::string a, b; - q1.Get(a); - q2.Get(b); - result = (a.compare(b) == 0); - break; - } - case Property::MATRIX: - case Property::MATRIX3: - case Property::ARRAY: - case Property::MAP: - { - //TODO: Implement this? - DALI_ASSERT_ALWAYS(0 && "Not implemented"); - result = false; - break; - } - case Property::EXTENTS: - { - Extents a, b; - q1.Get(a); - q2.Get(b); - result = CompareType(a, b, epsilon); - break; - } - case Property::NONE: - { - result = false; - break; - } - } - - return result; -} - #endif