From 70a3dd067de492ab29afd587a0e2fa7379358124 Mon Sep 17 00:00:00 2001 From: Kimmo Hoikka Date: Tue, 21 Apr 2015 11:52:36 +0100 Subject: [PATCH] Remove unnecessary stream operators from radian and degree as well as unnecessary Degree constructor from AngleAxis Change-Id: Id66962adac73b95435587d3abcf63fef47c38dd3 --- .../dali-test-suite-utils.cpp | 24 ++++++++++++++++------ .../dali-test-suite-utils/dali-test-suite-utils.h | 11 +++++++--- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.cpp b/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.cpp index 469fa87..9137f3d 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.cpp +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 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. @@ -15,17 +15,17 @@ * */ -// HEADER +// CLASS HEADER #include "dali-test-suite-utils.h" -// EXTERNAL INCLDUES +// EXTERNAL INCLUDES +#include #include #include // INTERNAL INCLUDES #include - using namespace Dali; int test_return_value = TET_UNDEF; @@ -77,9 +77,21 @@ bool operator==(TimePeriod a, TimePeriod b) return Equals(a.durationSeconds, b.durationSeconds) && Equals(a.delaySeconds, b.delaySeconds) ; } -std::ostream& operator<< (std::ostream& o, const TimePeriod value) +std::ostream& operator<<( std::ostream& ostream, TimePeriod value ) +{ + return ostream << "( Duration:" << value.durationSeconds << " Delay:" << value.delaySeconds << ")"; +} + +std::ostream& operator<<( std::ostream& ostream, Radian angle ) +{ + ostream << angle.radian; + return ostream; +} + +std::ostream& operator<<( std::ostream& ostream, Degree angle ) { - return o << "( Duration:" << value.durationSeconds << " Delay:" << value.delaySeconds << ")"; + ostream << angle.degree; + return ostream; } void DALI_TEST_EQUALS( const Matrix3& matrix1, const Matrix3& matrix2, const char* location) diff --git a/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.h b/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.h index 450c366..37f698c 100644 --- a/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.h +++ b/automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.h @@ -2,7 +2,7 @@ #define __DALI_TEST_SUITE_UTILS_H__ /* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Copyright (c) 2015 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. @@ -18,9 +18,12 @@ * */ +// EXTERNAL INCLUDES +#include +#include + // INTERNAL INCLUDES #include -#include void tet_infoline(const char*str); void tet_printf(const char *format, ...); @@ -149,7 +152,9 @@ inline bool CompareType(Degree q1, Degree q2, float epsilon) } bool operator==(TimePeriod a, TimePeriod b); -std::ostream& operator<< (std::ostream& o, const TimePeriod value); +std::ostream& operator<<( std::ostream& ostream, TimePeriod value ); +std::ostream& operator<<( std::ostream& ostream, Radian angle ); +std::ostream& operator<<( std::ostream& ostream, Degree angle ); /** * Test whether two values are equal. -- 2.7.4