[3.0] Remove/move experimental features
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-AngleAxis.cpp
index 06d0a0f..515ead5 100644 (file)
@@ -1,22 +1,23 @@
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 #include <iostream>
 #include <stdlib.h>
-#include <dali/dali.h>
+#include <dali/public-api/dali-core.h>
 #include <dali-test-suite-utils.h>
 
 void utc_dali_angle_axis_startup(void)
@@ -50,7 +51,7 @@ int UtcDaliAngleAxisNew02(void)
   Degree d(75.0f);
   AngleAxis a(d, Vector3::XAXIS);
 
-  DALI_TEST_EQUALS(a.angle, d, 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS(a.angle, Radian(d), 0.001f, TEST_LOCATION);
   DALI_TEST_EQUALS(a.axis, Vector3::XAXIS, 0.001f, TEST_LOCATION);
   END_TEST;
 }
@@ -64,7 +65,7 @@ int UtcDaliAngleAxisNew03(void)
   AngleAxis a(r, Vector3::ZAXIS);
 
   // AngleAxis stores its angle as a degree, so should only do degree comparison.
-  DALI_TEST_EQUALS(a.angle, Degree(Radian(Math::PI_2)), 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS(a.angle, Radian(Math::PI_2), 0.001f, TEST_LOCATION);
   DALI_TEST_EQUALS(a.axis, Vector3::ZAXIS, 0.001f, TEST_LOCATION);
   END_TEST;
 }
@@ -79,7 +80,7 @@ int UtcDaliAngleAxisAssign(void)
   AngleAxis b = a;
 
   // AngleAxis stores its angle as a degree, so should only do degree comparison.
-  DALI_TEST_EQUALS(b.angle, Degree(Radian(Math::PI_2)), 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS(b.angle, Radian(Math::PI_2), 0.001f, TEST_LOCATION);
   DALI_TEST_EQUALS(b.axis, Vector3::ZAXIS, 0.001f, TEST_LOCATION);
   END_TEST;
 }
@@ -93,7 +94,22 @@ int UtcDaliAngleAxisCopy(void)
   AngleAxis b(a);
 
   // AngleAxis stores its angle as a degree, so should only do degree comparison.
-  DALI_TEST_EQUALS(b.angle, Degree(Radian(Math::PI_2)), 0.001f, TEST_LOCATION);
+  DALI_TEST_EQUALS(b.angle, Radian(Math::PI_2), 0.001f, TEST_LOCATION);
   DALI_TEST_EQUALS(b.axis, Vector3::ZAXIS, 0.001f, TEST_LOCATION);
   END_TEST;
 }
+
+int UtcDaliAngleAxisEqual(void)
+{
+  TestApplication application;
+
+  Radian r(Math::PI_2);
+  AngleAxis a(r, Vector3::ZAXIS);
+  AngleAxis b(a);
+
+  tet_result((a == b) ? TET_PASS : TET_FAIL);
+
+  b.axis = Vector3::YAXIS;
+  tet_result(!(a == b) ? TET_PASS : TET_FAIL);
+  END_TEST;
+}