/*
- * 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.
* limitations under the License.
*
*/
+// CLASS HEADER
+#include "dali-test-suite-utils.h"
+
+// EXTERNAL INCLUDES
+#include <ostream>
// INTERNAL INCLUDES
#include <dali/public-api/dali-core.h>
-#include <stdarg.h>
-
-#include "dali-test-suite-utils.h"
using namespace Dali;
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, const 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)
#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>
}
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.
Dali::Vector3 axis;
Radian angle;
value.Get<Dali::Quaternion>().ToAxisAngle( axis, angle );
- value = Dali::Quaternion( Radian( Degree( asFloat ) ), axis );
+ value = Dali::Quaternion( Degree( asFloat ), axis );
}
else
{
if( length > 3 )
{
- Dali::AngleAxis axis( Degree( v[0] ), Vector3(v[1], v[2], v[3]) );
+ const Dali::AngleAxis axis( Degree( v[0] ), Vector3(v[1], v[2], v[3]) );
object = WrapDaliProperty( isolate, Dali::Property::Value( axis ) );
}
else if( length > 2 )
{
- object = WrapDaliProperty( isolate, Dali::Property::Value( Dali::Quaternion( Radian( Degree(v[0]) ), Radian( Degree(v[1]) ), Radian( Degree(v[2]) ) ) ) );
+ object = WrapDaliProperty( isolate, Dali::Quaternion( Degree(v[0]), Degree(v[1]), Degree(v[2]) ) );
}
else
{
- Dali::Quaternion quaternion( Dali::Quaternion( Dali::ANGLE_0, Dali::Vector3::YAXIS));
- object = WrapDaliProperty( isolate, Dali::Property::Value( quaternion ) );
+ const Dali::Quaternion quaternion( Dali::Quaternion( Dali::ANGLE_0, Dali::Vector3::YAXIS));
+ object = WrapDaliProperty( isolate, quaternion );
}
args.GetReturnValue().Set( object );