#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)
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;
}
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;
}
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;
}
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;
+}