Remove unnecessary stream operators from radian and degree as well as unnecessary... 95/38495/1
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 21 Apr 2015 10:52:36 +0000 (11:52 +0100)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 21 Apr 2015 10:52:36 +0000 (11:52 +0100)
Change-Id: Id66962adac73b95435587d3abcf63fef47c38dd3

automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/dali-test-suite-utils.h

index 469fa87..9137f3d 100644 (file)
@@ -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.
  *
  */
 
-// HEADER
+// CLASS HEADER
 #include "dali-test-suite-utils.h"
 
-// EXTERNAL INCLDUES
+// EXTERNAL INCLUDES
+#include <ostream>
 #include <cstdio>
 #include <cstdarg>
 
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-core.h>
 
-
 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)
index 450c366..37f698c 100644 (file)
@@ -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.
  *
  */
 
+// EXTERNAL INCLUDES
+#include <cstdarg>
+#include <iosfwd>
+
 // INTERNAL INCLUDES
 #include <dali/public-api/dali-core.h>
-#include <stdarg.h>
 
 void tet_infoline(const char*str);
 void tet_printf(const char *format, ...);
@@ -149,7 +152,9 @@ inline bool CompareType<Degree>(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.