try
{
float& w = testVector[4];
- if(w==0.0f);
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)
try
{
const float& w = testVector2[4];
- if(w==0.0f);
+ (void)w; // Suppress unused variable warning
tet_result(TET_FAIL);
}
catch (Dali::DaliException& e)
END_TEST;
}
-int UtcDaliVector3FitKeepAspectRatioP(void)
-{
- TestApplication application;
- Vector3 target(10.0f, 20.0f, 30.0f);
- Vector3 source1(1.0f, 2.0f, 3.0f);
- Vector3 source2(1.0f, 1.0f, 1.0f);
-
- DALI_TEST_EQUALS( FitKeepAspectRatio( target, target ), Vector3(1.0f, 1.0f, 1.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FitKeepAspectRatio( target, source1 ), Vector3(10.0f, 10.0f, 10.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FitKeepAspectRatio( target, source2 ), Vector3(10.0f, 10.0f, 10.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FitKeepAspectRatio( source2, target ), Vector3(0.0333f, 0.0333f, 0.0333f), 0.001, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliVector3FillKeepAspectRatioP(void)
-{
- TestApplication application;
- Vector3 target(10.0f, 20.0f, 30.0f);
- Vector3 source1(1.0f, 2.0f, 3.0f);
- Vector3 source2(1.0f, 1.0f, 1.0f);
-
- DALI_TEST_EQUALS( FillKeepAspectRatio( target, target ), Vector3(1.0f, 1.0f, 1.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FillKeepAspectRatio( target, source1 ), Vector3(10.0f, 10.0f, 10.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FillKeepAspectRatio( target, source2 ), Vector3(30.0f, 30.0f, 30.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FillKeepAspectRatio( source2, target ), Vector3(0.1f, 0.1f, 0.1f), 0.001, TEST_LOCATION );
-
- END_TEST;
-}
-
-int UtcDaliVector3FillXYKeepAspectRatioP(void)
-{
- TestApplication application;
- Vector3 target(10.0f, 20.0f, 30.0f);
- Vector3 source1(1.0f, 2.0f, 3.0f);
- Vector3 source2(1.0f, 1.0f, 1.0f);
-
- DALI_TEST_EQUALS( FillXYKeepAspectRatio( target, target ), Vector3(1.0f, 1.0f, 1.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FillXYKeepAspectRatio( target, source1 ), Vector3(10.0f, 10.0f, 10.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FillXYKeepAspectRatio( target, source2 ), Vector3(20.0f, 20.0f, 20.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( FillXYKeepAspectRatio( source2, target ), Vector3(0.1f, 0.1f, 0.1f), 0.001, TEST_LOCATION );
-
- END_TEST;
-}
-
-int UtcDaliVector3ShrinkInsideKeepAspectRatioP(void)
-{
- TestApplication application;
- Vector3 target(1.0f, 2.0f, 3.0f);
- Vector3 source1(10.0f, 20.0f, 30.0f);
- Vector3 source2(10.0f, 10.0f, 10.0f);
-
- DALI_TEST_EQUALS( ShrinkInsideKeepAspectRatio( target, target ), Vector3(1.0f, 1.0f, 1.0f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( ShrinkInsideKeepAspectRatio( target, source1 ), Vector3(0.1f, 0.1f, 0.1f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( ShrinkInsideKeepAspectRatio( target, source2 ), Vector3(0.1f, 0.1f, 0.1f), 0.001, TEST_LOCATION );
- DALI_TEST_EQUALS( ShrinkInsideKeepAspectRatio( source2, target ), Vector3::ONE, 0.001, TEST_LOCATION );
- END_TEST;
-}
-
-int UtcDaliVector3ShrinkInsideKeepAspectRatioN(void)
-{
- TestApplication application;
- Vector3 target(-1.0f, -1.0f, -1.0f);
- Vector3 source(0.0f, 0.0f, 0.0f);
-
- Vector3 shrink = ShrinkInsideKeepAspectRatio( target, source );
-
- DALI_TEST_EQUALS( false, std::isfinite(shrink.y), TEST_LOCATION );
- END_TEST;
-}
-
int UtcDaliVector3ConstantsP(void)
{
TestApplication application;