test_return_value = TC_FAIL;
return;
}
+ int x=10,y=11;
+ DALI_LIKELY(x==y);
+ DALI_UNLIKELY(x!=y);
+
strLocation.clear();
strCondition.clear();
DaliLog::PrintPass();
void EncodedBufferImageNewWithDataDLen();
void EncodedBufferImageDownCast();
+void EncodedBufferImageNewWithSamplingModeFittingMode();
namespace
{
enum TEST_CASES_LIST_ENCODED_BUFFER_IMAGE
{
ENCODED_BUFFER_IMAGE_NEW_WITH_DATA_DLEN,
- ENCODED_BUFFER_IMAGE_DOWNCAST
+ ENCODED_BUFFER_IMAGE_DOWNCAST,
+ ENCODED_BUFFER_IMAGE_NEW_WITH_SAMPLING_MODE_FITTING_MODE
};
struct Encoded_Buffer_Image_TestApp : public ConnectionTracker
case ENCODED_BUFFER_IMAGE_DOWNCAST:
EncodedBufferImageDownCast();
break;
+
+ case ENCODED_BUFFER_IMAGE_NEW_WITH_SAMPLING_MODE_FITTING_MODE:
+ EncodedBufferImageNewWithSamplingModeFittingMode();
+ break;
}
}
DaliLog::PrintPass();
}
+
+void EncodedBufferImageNewWithSamplingModeFittingMode()
+{
+ Image image;
+ try
+ {
+ image = EncodedBufferImage::New(sEncodedBufferImageDataPNG, LENGTH_OF_ENCODED_BUFFER_IMG_PNG_DATA,
+ ImageDimensions(), FittingMode::DEFAULT, SamplingMode::DEFAULT, Image::NEVER );
+ }
+ catch (Dali::DaliException& e)
+ {
+ LOG_E("EncodedBufferImage does not create an instance.");
+ test_return_value = TC_FAIL;
+ return;
+ }
+ DALI_CHECK_FAIL( !image , "Image::New is failed ");
+
+ ImageView imageView = ImageView::New(image);
+ DALI_CHECK_FAIL( !imageView , "Image::New is failed ");
+ Stage::GetCurrent().Add(imageView);
+ DaliLog::PrintPass();
+}
/**
* End of TC Logic Implementation Area.
return test_return_value;
}
+//& purpose: Create Encoded buffer image object using Encoded buffer image data and data size, sampling mode, fitting mode
+//& type: auto
+/**
+*@testcase ITcEncodedBufferImageNewWithSamplingModeFittingMode
+*@type Positive
+*@since_tizen 3.0
+*@description Create Encoded buffer image object using Encoded buffer image data and data size, sampling mode, fitting mode
+*@scenario Create an unitialized image instance \n
+* Create Encoded buffer image using data, data length and sampling mode, fitting mode \n
+* Assign return image to the unitialized instance \n
+* Create an initialized ImgFromView using the image instance \n
+* Add actor to stage \n
+* Get image from the stage \n
+* Remove the ImageView from Stage \n
+* @apicovered Dali::EncodedBufferImage::EncodedBufferImage New( const uint8_t* const encodedImage, std::size_t encodedImageByteCount, ImageDimensions size, FittingMode::Type fittingMode, SamplingMode::Type samplingMode, bool orientationCorrection = true )
+* @passcase if policy is equal to the initial value
+* @failcase if policy is not equal to the initial value
+* @precondition NA
+* @postcondition NA
+*/
+int ITcEncodedBufferImageNewWithSamplingModeFittingMode(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ Encoded_Buffer_Image_TestApp testApp( application, ENCODED_BUFFER_IMAGE_NEW_WITH_SAMPLING_MODE_FITTING_MODE);
+ application.MainLoop();
+ return test_return_value;
+}
/** @} */ // End of itc-encoded-buffer-image-testcases
/** @} */ // End of itc-encoded-buffer-image
/** @} */ // End of itc-dali-core
Stage::GetCurrent().Remove(g_actor_mu);
DaliLog::PrintPass();
}
+
+void MathUtilsSign()
+{
+ int array[] = {-5, 0, 5};
+ for(int index = 0; index<3; index++)
+ {
+ int ret = Sign(array[index]);
+ if(array[index] < 0)
+ {
+ DALI_CHECK_FAIL( ret != -1, "Sign should give -1 return" );
+ }
+ else if(array[index] > 0)
+ {
+ DALI_CHECK_FAIL( ret != 1, "Sign should give 1 return" );
+ }
+ else
+ {
+ DALI_CHECK_FAIL( ret != 0, "Sign should give 0 return" );
+ }
+ }
+ DaliLog::PrintPass();
+}
/** @} */ // End of itc-math-utils-testcases
/** @} */ // End of itc-math-utils
/** @} */ // End of itc-dali-core
MATH_UTILS_ROUND,
MATH_UTILS_LERP_FOR_FLOAT,
MATH_UTILS_LERP_FOR_INT,
- MATH_UTILS_EQUALS_WITH_AND_WITH_OUT_EPSILON
+ MATH_UTILS_EQUALS_WITH_AND_WITH_OUT_EPSILON,
+ MATH_UTILS_SIGN
};
struct Math_Utils_TestApp : public ConnectionTracker
case MATH_UTILS_EQUALS_WITH_AND_WITH_OUT_EPSILON:
MathUtilsEqualsWithAndWithoutEpsilon();
break;
+
+ case MATH_UTILS_SIGN:
+ MathUtilsSign();
+ break;
}
}
void VerdictTest()
{
case MATH_UTILS_EQUALS_WITH_AND_WITH_OUT_EPSILON:
switch (g_nRenderCount_MathUtils)
- {
+ {
case 0:
VTMathUtilsEqualsWithAndWithoutEpsilon001();
g_nRenderCount_MathUtils++;
}
//& purpose: Compare equality of two floating point values.
-//& type: auto
+//& type: auto
/**
* @testcase ITcMathUtilsEqualsWithAndWithoutEpsilon
return test_return_value;
}
+//& purpose: Check sign of of value
+//& type: auto
+/**
+* @testcase ITcMathUtilsSign
+* @since_tizen 3.0
+* @type Positive
+* @description Extracts the sign of a number.
+* @scenario Three different value is taken positive, negetive and zero\n
+* check the sign of the number \n
+* @apicovered Dali::Sign(T value)
+* @passcase If sign of the value detected perfectly
+* @failcase If sign of the value not detected perfectly
+* @precondition NA
+* @postcondition NA
+* @note NA
+*/
+int ITcMathUtilsSign(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ Math_Utils_TestApp testApp( application, MATH_UTILS_SIGN);
+ application.MainLoop();
+ return test_return_value;
+}
+
/** @} */ // End of itc-math-utils-testcases
/** @} */ // End of itc-math-utils
/** @} */ // End of itc-dali-core
void RadianCastOperator2();
void RadianOperatorCompareLess();
void RadianClamp();
+void RadianConstant();
namespace
{
RADIAN_CASTOPERATOR1,
RADIAN_CASTOPERATOR2,
RADIAN_OPERATOR_COMPARELESS,
- RADIAN_CLAMP
+ RADIAN_CLAMP,
+ RADIAN_CONSTANT
};
struct Radian_TestApp : public ConnectionTracker
bool Tick()
{
mTimer.Stop();
- mApplication.Quit();
+ mApplication.Quit();
return true;
}
case RADIAN_CLAMP:
RadianClamp();
break;
+
+ case RADIAN_CONSTANT:
+ RadianConstant();
+ break;
}
}
// Data
Radian radianMin(fMin - 0.25f);
clampedRad = Dali::Clamp(radianMin, fMin, fMax);
- DALI_CHECK_FAIL(clampedRad != Radian(fMin), "Dali::Clamp() is Failed: Clamped angle did not match for radian.");
+ DALI_CHECK_FAIL(clampedRad != Radian(fMin), "Dali::Clamp() is Failed: Clamped angle did not match for radian.");
Radian radianMax(fMax + 0.25f);
clampedRad = Dali::Clamp(radianMax, fMin, fMax);
DALI_CHECK_FAIL(clampedRad != Radian(fMax), "Dali::Clamp() is Failed: Clamped angle did not match for radian.");
DaliLog::PrintPass();
}
+
+void RadianConstant()
+{
+ const int degrees[] = {0, 30, 45, 60, 90, 120, 135, 180, 225, 270, 315, 360};
+ const Radian radian_cons[]={ANGLE_0, ANGLE_30, ANGLE_45, ANGLE_60, ANGLE_90, ANGLE_120, ANGLE_135, ANGLE_180, ANGLE_225, ANGLE_270, ANGLE_315, ANGLE_360};
+ const string radian_cons_str[]={"ANGLE_0", "ANGLE_30", "ANGLE_45", "ANGLE_60", "ANGLE_90", "ANGLE_120", "ANGLE_135", "ANGLE_180", "ANGLE_225", "ANGLE_270", "ANGLE_315", "ANGLE_360"};
+ for(int index = 0; index < 12; index++)
+ {
+ Degree degree(degrees[index]);
+ Radian radian(degree);
+ DALI_CHECK_FAIL(radian != radian_cons[index], "Radian value is not correct for "+radian_cons_str[index]);
+ }
+ DaliLog::PrintPass();
+}
+
/**
* End of TC Logic Implementation Area.
**/
application.MainLoop();
return test_return_value;
}
+//& purpose: Constant value of radian according to angle.
+//& type: auto
+/**
+* @testcase ITcRadianConstant
+* @type Positive
+* @since_tizen 3.0
+* @scenario Create degree from value and with that degree create radian \n
+* and checks with the constant radian value according to the angle.
+* @apicovered Radian::ANGLE_360, Radian::ANGLE_315, Radian::ANGLE_270, Radian::ANGLE_225, \n
+* Radian::ANGLE_180,Radian::ANGLE_135, Radian::ANGLE_120, Radian::ANGLE_90, \n
+* Radian::ANGLE_60, Radian::ANGLE_45,Radian::ANGLE_30, Radian::ANGLE_0
+* @passcase if constant value is matched with the radian value.
+* @failcase if constant value is not matched with the radian value.
+* @precondition NA
+* @postcondition NA
+*/
+int ITcRadianConstant(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ Radian_TestApp testApp( application, RADIAN_CONSTANT);
+ application.MainLoop();
+ return test_return_value;
+}
/** @} */
/** @} */
/** @} */
return;
}
- DaliLog::PrintPass();
+ DaliLog::PrintPass();
+}
+Vector2 g_screenSize;
+float g_screenX = 0.0;
+float g_screenY = 0.0;
+RenderTask g_task;
+RenderTaskList g_taskList;
+Actor g_actor;
+float g_actor2Size = 100.f;
+void RenderTaskWorldToViewport()
+{
+ OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
+
+ g_taskList = Stage::GetCurrent().GetRenderTaskList();
+ g_actor = Actor::New();
+ g_actor.SetSize(100.0f, 100.0f);
+ g_actor.SetPosition( Vector3(0.0, 0.0, 0.0) );
+
+ g_actor.SetParentOrigin( Vector3(0.5, 0.5, 0.5) );
+ g_actor.SetAnchorPoint( Vector3(0.5, 0.5, 0.5) );
+
+ Stage::GetCurrent().Add(g_actor);
+}
+
+void VTRenderTaskWorldToViewport001()
+{
+ g_task = g_taskList.GetTask( 0u );
+ CameraActor camera = g_task.GetCameraActor();
+ g_screenSize= g_task.GetCurrentViewportSize();
+
+ bool bRet = g_task.WorldToViewport(g_actor.GetCurrentWorldPosition(), g_screenX, g_screenY);
+ DALI_CHECK_FAIL(!bRet ,"WorldToViewport() failed.");
+
+ DALI_CHECK_FAIL((g_screenX - g_screenSize.x/2) > Math::MACHINE_EPSILON_10000, "X Value mismatch");
+ DALI_CHECK_FAIL((g_screenY - g_screenSize.y/2) > Math::MACHINE_EPSILON_10000, "Y Value mismatch");
+
+ Actor actor2 = Actor::New();
+ actor2.SetSize( g_actor2Size, g_actor2Size );
+ actor2.SetPosition( Vector3(0.0, 0.0, 0.0) );
+ actor2.SetParentOrigin( Vector3(0.5, 0.5, 0.0) );
+ actor2.SetAnchorPoint( Vector3(0.5, 0.5, 0.0) );
+ Stage::GetCurrent().Add( actor2 );
+ actor2.Add(g_actor);
+ g_actor.SetParentOrigin( Vector3(0,0,0) );
+}
+void VTRenderTaskWorldToViewport002()
+{
+ bool bRet = g_task.WorldToViewport(g_actor.GetCurrentWorldPosition(), g_screenX, g_screenY);
+ DALI_CHECK_FAIL(!bRet , "WorldToViewport() failed.");
+
+ DALI_CHECK_FAIL( g_screenX - (g_screenSize.x/2 - g_actor2Size/2) > Math::MACHINE_EPSILON_10000, "X Value mismatch");
+ DALI_CHECK_FAIL( g_screenY - (g_screenSize.y/2 - g_actor2Size/2) > Math::MACHINE_EPSILON_10000, "Y Value mismatch");
+ DaliLog::PrintPass();
+}
+void RenderTaskViewportToLocal()
+{
+ OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
+
+ g_actor = Actor::New();
+ g_actor.SetAnchorPoint(AnchorPoint::TOP_LEFT);
+ g_actor.SetSize(100.0f, 100.0f);
+ g_actor.SetPosition(10.0f, 10.0f);
+ Stage::GetCurrent().Add(g_actor);
+
+ g_taskList = Stage::GetCurrent().GetRenderTaskList();
+ g_task = g_taskList.GetTask( 0u );
+}
+void VTRenderTaskViewportToLocal001()
+{
+ float localX;
+ float localY;
+
+ float rtLocalX;
+ float rtLocalY;
+
+ float screenX = 50.0f;
+ float screenY = 50.0f;
+
+ float epsailon = 0.01f;
+
+ DALI_CHECK_FAIL( !g_actor.ScreenToLocal(localX, localY, screenX, screenY) ,"ScreenToLocal() failed");
+ DALI_CHECK_FAIL( !g_task.ViewportToLocal(g_actor, screenX, screenY, rtLocalX, rtLocalY ) ,"ViewportToLocal() failed");
+ DALI_CHECK_FAIL(localX - rtLocalX > epsailon, "Local X value mismatch");
+ DALI_CHECK_FAIL(localY - rtLocalY > epsailon, "Local Y value mismatch");
+
+ DaliLog::PrintPass();
}
-/** @} */ // end of itc-render-task-testcases
-/** @} */ // end of itc-render-task
+/** @} */ // end of itc-render-task-testcases
+/** @} */ // end of itc-render-task
/** @} */ // end of itc-dali-core
RENDER_TASK_SETGETCAMERAACTOR,
RENDER_TASK_SETISEXCLUSIVE,
RENDER_TASK_SETGETSETSCREENTOFRAMEBUFFERFUNCTIONWITHFULLSCREEN,
- RENDER_TASK_SETGETSETSCREENTOFRAMEBUFFERFUNCTIONWITHDEFAULTSCREEN
+ RENDER_TASK_SETGETSETSCREENTOFRAMEBUFFERFUNCTIONWITHDEFAULTSCREEN,
+ RENDER_TASK_WORLDTOVIEWPORT,
+ RENDER_TASK_VIEWPORTTOLOCAL
};
struct TestApp : public ConnectionTracker
case RENDER_TASK_SETGETSETSCREENTOFRAMEBUFFERFUNCTIONWITHDEFAULTSCREEN:
RenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen();
break;
+
+ case RENDER_TASK_WORLDTOVIEWPORT:
+ RenderTaskWorldToViewport();
+ break;
+
+ case RENDER_TASK_VIEWPORTTOLOCAL:
+ RenderTaskViewportToLocal();
+ break;
}
}
void VerdictTest()
break;
}
break;
+
+ case RENDER_TASK_WORLDTOVIEWPORT:
+ switch (g_nRenderCount_RenderTask)
+ {
+ case 0:
+ VTRenderTaskWorldToViewport001();
+ g_nRenderCount_RenderTask++;
+ break;
+
+ case 1:
+ VTRenderTaskWorldToViewport002();
+ mTimer.Stop();
+ mApplication.Quit();
+ break;
+ }
+ break;
+
+ case RENDER_TASK_VIEWPORTTOLOCAL:
+ switch (g_nRenderCount_RenderTask)
+ {
+ case 0:
+ VTRenderTaskViewportToLocal001();
+ mTimer.Stop();
+ mApplication.Quit();
+ break;
+ }
+ break;
+
default:
mTimer.Stop();
mApplication.Quit();
Application application = Application::New( &gArgc, &gArgv );
TestApp testApp(application, RENDER_TASK_SETGETSETSCREENTOFRAMEBUFFERFUNCTIONWITHDEFAULTSCREEN);
application.MainLoop();
- return test_return_value;
+ return test_return_value;
+}
+//& purpose: Get actor local coordinates for given viewport coordinates
+//& type: auto
+
+/**
+* @testcase ITcRenderTaskWorldtoViewport
+* @since_tizen 3.0
+* @type Positive
+* @description Get actor local coordinates for given viewport coordinates
+* @scenario Get renderTaskList from current stage \n
+* Create a RenderTask \n
+* Create a framebuffer and imageView \n
+* Set a image actor as the source actor \n
+* Set ScreenToFrameBufferFunction to RenderTask::DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION \n
+* Get ScreenToFrameBufferFunction and check with set value
+* @apicovered WorldToViewport
+* @passcase If renderTaskList is not empty and a valid CreateTask is executed successfully and \n
+ SetScreenToFrameBufferFunction is executed successfully and GetScreenToFrameBufferFunction \n
+ is executed successfully and set & get values are matched
+* @failcase If renderTaskList is empty or a valid CreateTask is not executed \n
+ successfully and SetScreenToFrameBufferFunction is not executed successfully \n
+ or GetScreenToFrameBufferFunction is not executed successfully or set & get values are mismatched
+* @precondition NA
+* @postcondition NA
+*/
+int ITcRenderTaskWorldtoViewport(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ TestApp testApp(application, RENDER_TASK_WORLDTOVIEWPORT);
+ application.MainLoop();
+ return test_return_value;
+}
+
+//& purpose: Get actor local coordinates for given viewport coordinates
+//& type: auto
+
+/**
+* @testcase ITcRenderTaskViewportToLocal
+* @since_tizen 3.0
+* @type Positive
+* @description Get actor local coordinates for given viewport coordinates
+* @scenario Get renderTaskList from current stage \n
+* Create a RenderTask \n
+* Create a framebuffer and imageView \n
+* Set a image actor as the source actor \n
+* Set ScreenToFrameBufferFunction to RenderTask::DEFAULT_SCREEN_TO_FRAMEBUFFER_FUNCTION \n
+* Get ScreenToFrameBufferFunction and check with set value
+* @apicovered WorldToViewport
+* @passcase If renderTaskList is not empty and a valid CreateTask is executed \n
+ successfully and SetScreenToFrameBufferFunction is executed successfully and \n
+ GetScreenToFrameBufferFunction is executed successfully and set & get values are matched
+@failcase If renderTaskList is empty or a valid CreateTask is not executed \n
+* successfully and SetScreenToFrameBufferFunction is not executed successfully or \n
+ GetScreenToFrameBufferFunction is not executed successfully or set & get values are mismatched
+* @precondition NA
+* @postcondition NA
+*/
+int ITcRenderTaskViewportToLocal(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ TestApp testApp(application, RENDER_TASK_VIEWPORTTOLOCAL);
+ application.MainLoop();
+ return test_return_value;
}
-/** @} */ // end of itc-render-task-testcases
-/** @} */ // end of itc-render-task
+/** @} */ // end of itc-render-task-testcases
+/** @} */ // end of itc-render-task
/** @} */ // end of itc-dali-core
extern int ITcDegreeClamp(void);
extern int ITcEncodedBufferImageNewWithDataDLen(void);
extern int ITcEncodedBufferImageDownCast(void);
+extern int ITcEncodedBufferImageNewWithSamplingModeFittingMode(void);
extern int ITcFrameBufferImageDownCast(void);
extern int ITcFrameBufferImageNewWithWidthHeightPixelFormat(void);
extern int ITcFrameBufferImageNative(void);
extern int ITcMathUtilsLerpForFloat(void);
extern int ITcMathUtilsLerpForInt(void);
extern int ITcMathUtilsEqualsWithAndWithoutEpsilon(void);
+extern int ITcMathUtilsSign(void);
extern int ITcMatrix3Magnitude(void);
extern int ITcMatrix3ScaledInverseTranspose(void);
extern int ITcMatrix3AsFloat(void);
extern int ITcRadianCastOperator2(void);
extern int ITcRadianOperatorCompareLess(void);
extern int ITcRadianClamp(void);
+extern int ITcRadianConstant(void);
extern int ITcRandomRange(void);
extern int ITcRandomAxis(void);
extern int ITcRectSet(void);
extern int ITcRenderTaskSetIsExclusive(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen(void);
+extern int ITcRenderTaskWorldtoViewport(void);
+extern int ITcRenderTaskViewportToLocal(void);
extern int ITcResourceImageGetImageSize(void);
extern int ITcResourceImageReload(void);
extern int ITcResourceImageDownCast(void);
{"ITcDegreeClamp", ITcDegreeClamp, ITs_degree_startup, ITs_degree_cleanup},
{"ITcEncodedBufferImageNewWithDataDLen", ITcEncodedBufferImageNewWithDataDLen, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcEncodedBufferImageDownCast", ITcEncodedBufferImageDownCast, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
+ {"ITcEncodedBufferImageNewWithSamplingModeFittingMode", ITcEncodedBufferImageNewWithSamplingModeFittingMode, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcFrameBufferImageDownCast", ITcFrameBufferImageDownCast, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNewWithWidthHeightPixelFormat", ITcFrameBufferImageNewWithWidthHeightPixelFormat, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNative", ITcFrameBufferImageNative, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcMathUtilsLerpForFloat", ITcMathUtilsLerpForFloat, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsLerpForInt", ITcMathUtilsLerpForInt, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsEqualsWithAndWithoutEpsilon", ITcMathUtilsEqualsWithAndWithoutEpsilon, ITs_mathutils_startup, ITs_mathutils_cleanup},
+ {"ITcMathUtilsSign", ITcMathUtilsSign, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMatrix3Magnitude", ITcMatrix3Magnitude, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3ScaledInverseTranspose", ITcMatrix3ScaledInverseTranspose, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3AsFloat", ITcMatrix3AsFloat, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcRadianCastOperator2", ITcRadianCastOperator2, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianOperatorCompareLess", ITcRadianOperatorCompareLess, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianClamp", ITcRadianClamp, ITs_radian_startup, ITs_radian_cleanup},
+ {"ITcRadianConstant", ITcRadianConstant, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRandomRange", ITcRandomRange, ITs_random_startup, ITs_random_cleanup},
{"ITcRandomAxis", ITcRandomAxis, ITs_random_startup, ITs_random_cleanup},
{"ITcRectSet", ITcRectSet, ITs_rect_startup, ITs_rect_cleanup},
{"ITcRenderTaskSetIsExclusive", ITcRenderTaskSetIsExclusive, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskWorldtoViewport", ITcRenderTaskWorldtoViewport, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskViewportToLocal", ITcRenderTaskViewportToLocal, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcResourceImageGetImageSize", ITcResourceImageGetImageSize, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageReload", ITcResourceImageReload, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageDownCast", ITcResourceImageDownCast, ITs_resource_image_startup, ITs_resource_image_cleanup},
extern int ITcDegreeClamp(void);
extern int ITcEncodedBufferImageNewWithDataDLen(void);
extern int ITcEncodedBufferImageDownCast(void);
+extern int ITcEncodedBufferImageNewWithSamplingModeFittingMode(void);
extern int ITcFrameBufferImageDownCast(void);
extern int ITcFrameBufferImageNewWithWidthHeightPixelFormat(void);
extern int ITcFrameBufferImageNative(void);
extern int ITcMathUtilsLerpForFloat(void);
extern int ITcMathUtilsLerpForInt(void);
extern int ITcMathUtilsEqualsWithAndWithoutEpsilon(void);
+extern int ITcMathUtilsSign(void);
extern int ITcMatrix3Magnitude(void);
extern int ITcMatrix3ScaledInverseTranspose(void);
extern int ITcMatrix3AsFloat(void);
extern int ITcRadianCastOperator2(void);
extern int ITcRadianOperatorCompareLess(void);
extern int ITcRadianClamp(void);
+extern int ITcRadianConstant(void);
extern int ITcRandomRange(void);
extern int ITcRandomAxis(void);
extern int ITcRectSet(void);
extern int ITcRenderTaskSetIsExclusive(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen(void);
+extern int ITcRenderTaskWorldtoViewport(void);
+extern int ITcRenderTaskViewportToLocal(void);
extern int ITcResourceImageGetImageSize(void);
extern int ITcResourceImageReload(void);
extern int ITcResourceImageDownCast(void);
{"ITcDegreeClamp", ITcDegreeClamp, ITs_degree_startup, ITs_degree_cleanup},
{"ITcEncodedBufferImageNewWithDataDLen", ITcEncodedBufferImageNewWithDataDLen, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcEncodedBufferImageDownCast", ITcEncodedBufferImageDownCast, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
+ {"ITcEncodedBufferImageNewWithSamplingModeFittingMode", ITcEncodedBufferImageNewWithSamplingModeFittingMode, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcFrameBufferImageDownCast", ITcFrameBufferImageDownCast, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNewWithWidthHeightPixelFormat", ITcFrameBufferImageNewWithWidthHeightPixelFormat, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNative", ITcFrameBufferImageNative, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcMathUtilsLerpForFloat", ITcMathUtilsLerpForFloat, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsLerpForInt", ITcMathUtilsLerpForInt, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsEqualsWithAndWithoutEpsilon", ITcMathUtilsEqualsWithAndWithoutEpsilon, ITs_mathutils_startup, ITs_mathutils_cleanup},
+ {"ITcMathUtilsSign", ITcMathUtilsSign, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMatrix3Magnitude", ITcMatrix3Magnitude, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3ScaledInverseTranspose", ITcMatrix3ScaledInverseTranspose, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3AsFloat", ITcMatrix3AsFloat, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcRadianCastOperator2", ITcRadianCastOperator2, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianOperatorCompareLess", ITcRadianOperatorCompareLess, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianClamp", ITcRadianClamp, ITs_radian_startup, ITs_radian_cleanup},
+ {"ITcRadianConstant", ITcRadianConstant, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRandomRange", ITcRandomRange, ITs_random_startup, ITs_random_cleanup},
{"ITcRandomAxis", ITcRandomAxis, ITs_random_startup, ITs_random_cleanup},
{"ITcRectSet", ITcRectSet, ITs_rect_startup, ITs_rect_cleanup},
{"ITcRenderTaskSetIsExclusive", ITcRenderTaskSetIsExclusive, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskWorldtoViewport", ITcRenderTaskWorldtoViewport, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskViewportToLocal", ITcRenderTaskViewportToLocal, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcResourceImageGetImageSize", ITcResourceImageGetImageSize, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageReload", ITcResourceImageReload, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageDownCast", ITcResourceImageDownCast, ITs_resource_image_startup, ITs_resource_image_cleanup},
extern int ITcDegreeClamp(void);
extern int ITcEncodedBufferImageNewWithDataDLen(void);
extern int ITcEncodedBufferImageDownCast(void);
+extern int ITcEncodedBufferImageNewWithSamplingModeFittingMode(void);
extern int ITcFrameBufferImageDownCast(void);
extern int ITcFrameBufferImageNewWithWidthHeightPixelFormat(void);
extern int ITcFrameBufferImageNative(void);
extern int ITcMathUtilsLerpForFloat(void);
extern int ITcMathUtilsLerpForInt(void);
extern int ITcMathUtilsEqualsWithAndWithoutEpsilon(void);
+extern int ITcMathUtilsSign(void);
extern int ITcMatrix3Magnitude(void);
extern int ITcMatrix3ScaledInverseTranspose(void);
extern int ITcMatrix3AsFloat(void);
extern int ITcRadianCastOperator2(void);
extern int ITcRadianOperatorCompareLess(void);
extern int ITcRadianClamp(void);
+extern int ITcRadianConstant(void);
extern int ITcRandomRange(void);
extern int ITcRandomAxis(void);
extern int ITcRectSet(void);
extern int ITcRenderTaskSetIsExclusive(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen(void);
+extern int ITcRenderTaskWorldtoViewport(void);
+extern int ITcRenderTaskViewportToLocal(void);
extern int ITcResourceImageGetImageSize(void);
extern int ITcResourceImageReload(void);
extern int ITcResourceImageDownCast(void);
{"ITcDegreeClamp", ITcDegreeClamp, ITs_degree_startup, ITs_degree_cleanup},
{"ITcEncodedBufferImageNewWithDataDLen", ITcEncodedBufferImageNewWithDataDLen, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcEncodedBufferImageDownCast", ITcEncodedBufferImageDownCast, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
+ {"ITcEncodedBufferImageNewWithSamplingModeFittingMode", ITcEncodedBufferImageNewWithSamplingModeFittingMode, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcFrameBufferImageDownCast", ITcFrameBufferImageDownCast, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNewWithWidthHeightPixelFormat", ITcFrameBufferImageNewWithWidthHeightPixelFormat, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNative", ITcFrameBufferImageNative, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcMathUtilsLerpForFloat", ITcMathUtilsLerpForFloat, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsLerpForInt", ITcMathUtilsLerpForInt, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsEqualsWithAndWithoutEpsilon", ITcMathUtilsEqualsWithAndWithoutEpsilon, ITs_mathutils_startup, ITs_mathutils_cleanup},
+ {"ITcMathUtilsSign", ITcMathUtilsSign, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMatrix3Magnitude", ITcMatrix3Magnitude, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3ScaledInverseTranspose", ITcMatrix3ScaledInverseTranspose, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3AsFloat", ITcMatrix3AsFloat, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcRadianCastOperator2", ITcRadianCastOperator2, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianOperatorCompareLess", ITcRadianOperatorCompareLess, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianClamp", ITcRadianClamp, ITs_radian_startup, ITs_radian_cleanup},
+ {"ITcRadianConstant", ITcRadianConstant, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRandomRange", ITcRandomRange, ITs_random_startup, ITs_random_cleanup},
{"ITcRandomAxis", ITcRandomAxis, ITs_random_startup, ITs_random_cleanup},
{"ITcRectSet", ITcRectSet, ITs_rect_startup, ITs_rect_cleanup},
{"ITcRenderTaskSetIsExclusive", ITcRenderTaskSetIsExclusive, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskWorldtoViewport", ITcRenderTaskWorldtoViewport, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskViewportToLocal", ITcRenderTaskViewportToLocal, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcResourceImageGetImageSize", ITcResourceImageGetImageSize, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageReload", ITcResourceImageReload, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageDownCast", ITcResourceImageDownCast, ITs_resource_image_startup, ITs_resource_image_cleanup},
extern int ITcDegreeClamp(void);
extern int ITcEncodedBufferImageNewWithDataDLen(void);
extern int ITcEncodedBufferImageDownCast(void);
+extern int ITcEncodedBufferImageNewWithSamplingModeFittingMode(void);
extern int ITcFrameBufferImageDownCast(void);
extern int ITcFrameBufferImageNewWithWidthHeightPixelFormat(void);
extern int ITcFrameBufferImageNative(void);
extern int ITcMathUtilsLerpForFloat(void);
extern int ITcMathUtilsLerpForInt(void);
extern int ITcMathUtilsEqualsWithAndWithoutEpsilon(void);
+extern int ITcMathUtilsSign(void);
extern int ITcMatrix3Magnitude(void);
extern int ITcMatrix3ScaledInverseTranspose(void);
extern int ITcMatrix3AsFloat(void);
extern int ITcRadianCastOperator2(void);
extern int ITcRadianOperatorCompareLess(void);
extern int ITcRadianClamp(void);
+extern int ITcRadianConstant(void);
extern int ITcRandomRange(void);
extern int ITcRandomAxis(void);
extern int ITcRectSet(void);
extern int ITcRenderTaskSetIsExclusive(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen(void);
extern int ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen(void);
+extern int ITcRenderTaskWorldtoViewport(void);
+extern int ITcRenderTaskViewportToLocal(void);
extern int ITcResourceImageGetImageSize(void);
extern int ITcResourceImageReload(void);
extern int ITcResourceImageDownCast(void);
{"ITcDegreeClamp", ITcDegreeClamp, ITs_degree_startup, ITs_degree_cleanup},
{"ITcEncodedBufferImageNewWithDataDLen", ITcEncodedBufferImageNewWithDataDLen, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcEncodedBufferImageDownCast", ITcEncodedBufferImageDownCast, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
+ {"ITcEncodedBufferImageNewWithSamplingModeFittingMode", ITcEncodedBufferImageNewWithSamplingModeFittingMode, ITs_encodedbufferimage_startup, ITs_encodedbufferimage_cleanup},
{"ITcFrameBufferImageDownCast", ITcFrameBufferImageDownCast, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNewWithWidthHeightPixelFormat", ITcFrameBufferImageNewWithWidthHeightPixelFormat, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcFrameBufferImageNative", ITcFrameBufferImageNative, ITs_framebufferimage_startup, ITs_framebufferimage_cleanup},
{"ITcMathUtilsLerpForFloat", ITcMathUtilsLerpForFloat, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsLerpForInt", ITcMathUtilsLerpForInt, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMathUtilsEqualsWithAndWithoutEpsilon", ITcMathUtilsEqualsWithAndWithoutEpsilon, ITs_mathutils_startup, ITs_mathutils_cleanup},
+ {"ITcMathUtilsSign", ITcMathUtilsSign, ITs_mathutils_startup, ITs_mathutils_cleanup},
{"ITcMatrix3Magnitude", ITcMatrix3Magnitude, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3ScaledInverseTranspose", ITcMatrix3ScaledInverseTranspose, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcMatrix3AsFloat", ITcMatrix3AsFloat, ITs_matrix3_startup, ITs_matrix3_cleanup},
{"ITcRadianCastOperator2", ITcRadianCastOperator2, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianOperatorCompareLess", ITcRadianOperatorCompareLess, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRadianClamp", ITcRadianClamp, ITs_radian_startup, ITs_radian_cleanup},
+ {"ITcRadianConstant", ITcRadianConstant, ITs_radian_startup, ITs_radian_cleanup},
{"ITcRandomRange", ITcRandomRange, ITs_random_startup, ITs_random_cleanup},
{"ITcRandomAxis", ITcRandomAxis, ITs_random_startup, ITs_random_cleanup},
{"ITcRectSet", ITcRectSet, ITs_rect_startup, ITs_rect_cleanup},
{"ITcRenderTaskSetIsExclusive", ITcRenderTaskSetIsExclusive, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithFullScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen", ITcRenderTaskSetGetSetScreenToFrameBufferFunctionWithDefaultScreen, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskWorldtoViewport", ITcRenderTaskWorldtoViewport, ITs_rendertask_startup, ITs_rendertask_cleanup},
+ {"ITcRenderTaskViewportToLocal", ITcRenderTaskViewportToLocal, ITs_rendertask_startup, ITs_rendertask_cleanup},
{"ITcResourceImageGetImageSize", ITcResourceImageGetImageSize, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageReload", ITcResourceImageReload, ITs_resource_image_startup, ITs_resource_image_cleanup},
{"ITcResourceImageDownCast", ITcResourceImageDownCast, ITs_resource_image_startup, ITs_resource_image_cleanup},
void Uint16PairOperatorLessThan();
void Uint16PairOperatorEquals();
void Uint16PairOperatorNotEquals();
+void Uint16PairSetGetX();
+void Uint16PairSetGetY();
+void Uint16PairSetHeightWidth();
+void Uint16PairOperatorAssignment();
namespace
{
UNIT16_PAIR_FROM_OPERATION_GRATTERTHAN,
UNIT16_PAIR_FROM_OPERATION_LESSTHAN,
UNIT16_PAIR_FROM_OPERATOR_EQUALS,
- UNIT16_PAIR_FROM_OPERATOR_NOT_EQUALS
+ UNIT16_PAIR_FROM_OPERATOR_NOT_EQUALS,
+ UNIT16_PAIR_SET_GET_X,
+ UNIT16_PAIR_SET_GET_Y,
+ UNIT16_PAIR_FROM_SET_HEIGHT_WIDTH,
+ UNIT16_PAIR_FROM_OPERATOR_ASSIGNMENT
};
struct Unit16Pair_TestApp : public ConnectionTracker
break;
case UNIT16_PAIR_FROM_OPERATOR_NOT_EQUALS:
Uint16PairOperatorNotEquals();
+ case UNIT16_PAIR_SET_GET_X:
+ Uint16PairSetGetX();
+ break;
+ case UNIT16_PAIR_SET_GET_Y:
+ Uint16PairSetGetY();
+ break;
+ case UNIT16_PAIR_FROM_SET_HEIGHT_WIDTH:
+ Uint16PairSetHeightWidth();
+ break;
+ case UNIT16_PAIR_FROM_OPERATOR_ASSIGNMENT:
+ Uint16PairOperatorAssignment();
+ break;
}
}
DaliLog::PrintPass();
}
+void Uint16PairSetGetX()
+{
+ Uint16Pair unitPair;
+ uint16_t x = 10;
+
+ unitPair.SetX(x);
+ DALI_CHECK_FAIL(unitPair.GetX() != x,"GetX does not give same value as setted");
+
+ DaliLog::PrintPass();
+}
+
+void Uint16PairSetGetY()
+{
+ Uint16Pair unitPair;
+ uint16_t y = 10;
+
+ unitPair.SetY(y);
+ DALI_CHECK_FAIL(unitPair.GetY() != y,"GetY does not give same value as setted");
+
+ DaliLog::PrintPass();
+}
+
+void Uint16PairSetHeightWidth()
+{
+ Uint16Pair unitPair = Uint16Pair ();
+
+ uint16_t width = 5;
+ uint16_t height = 6;
+
+ unitPair.SetWidth(width);
+ unitPair.SetHeight(height);
+
+ DALI_CHECK_FAIL(unitPair.GetWidth() != width, "SetWidth is failed.");
+ DALI_CHECK_FAIL(unitPair.GetHeight() != height, "SetHeight is failed.");
+
+ DaliLog::PrintPass();
+}
+void Uint16PairOperatorAssignment()
+{
+ Uint16Pair unitPair1 = Uint16Pair(5,5);
+ Uint16Pair unitPair2 = unitPair1;
+
+ DALI_CHECK_FAIL(unitPair1 != unitPair2,"Assignment operator is failed.");
+
+ DaliLog::PrintPass();
+}
+
/**
* End of TC Logic Implementation Area.
**/
return test_return_value;
}
+//& purpose: Checks set X of unit16 pair
+//& type: auto
+/**
+* @testcase ITcUint16PairSetGetX
+* @since_tizen 3.0
+* @type Positive
+* @description SetX sets and value of X and GetX() checks that is equal otherwise fail \n
+* @scenario Create a instance of Unit16Pair. \n
+* sets value of X and get value of X and chcks it is same as specified \n
+* Now check both object according to object initialization. \n
+* @apicovered SetX(uint16_t x), GetX()
+* @passcase If value of GetX is same as setted.
+* @failcase If value of GetX is not same as setted.
+* @precondition NA
+* @postcondition NA
+*/
+int ITcUint16PairSetGetX(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ Unit16Pair_TestApp testApp( application, UNIT16_PAIR_SET_GET_X);
+ application.MainLoop();
+ return test_return_value;
+}
+
+//& purpose: Checks set Y of unit16 pair
+//& type: auto
+/**
+* @testcase ITcUint16PairSetGetY
+* @since_tizen 3.0
+* @type Positive
+* @description SetX sets and value of Y and GetY() checks that is equal otherwise fail \n
+* @scenario Create a instance of Unit16Pair. \n
+* sets value of Y and get value of X and chcks it is same as specified \n
+* Now check both object according to object initialization. \n
+* @apicovered SetX(uint16_t Y), GetY()
+* @passcase If value of GetY is same as setted.
+* @failcase If value of GetY is not same as setted.
+* @precondition NA
+* @postcondition NA
+*/
+int ITcUint16PairSetGetY(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ Unit16Pair_TestApp testApp( application, UNIT16_PAIR_SET_GET_Y);
+ application.MainLoop();
+ return test_return_value;
+}
+
+//& purpose: Check Height and Width
+//& type: auto
+/**
+* @testcase ITcUint16PairSetHeightWidth
+* @since_tizen 3.0
+* @type Positive
+* @description Check X and Y dimention \n
+* @scenario Create an instance for Unit16Pair. \n
+* Set Height and Width with specific value . \n
+* Now check Height and Width with input values. \n
+* @apicovered SetWidth(),SetHeight()
+* @passcase If Height and Width is matched with input value
+* @failcase If Height and Width is mismatched with input value
+* @precondition NA
+* @postcondition NA
+*/
+int ITcUint16PairSetHeightWidth(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ Unit16Pair_TestApp testApp( application, UNIT16_PAIR_FROM_SET_HEIGHT_WIDTH);
+ application.MainLoop();
+ return test_return_value;
+}
+
+//& purpose: Assignment operator check for storing in collections
+//& type: auto
+/**
+* @testcase ITcUint16PairOperatorAssignment
+* @since_tizen 3.0
+* @type Positive
+* @description Assignment operator check for storing in collections\n
+* @scenario Create two instance of Unit16Pair. \n
+* Initialize one object with another object with assignment object. \n
+* Now check both objects are equal. \n
+* @apicovered Uint16Pair::operator=(const Uint16Pair& rhs)
+* @passcase If Equals comparison operator is work properly
+* @failcase If Equals comparison operator is not work properly
+* @precondition NA
+* @postcondition NA
+*/
+int ITcUint16PairOperatorAssignment(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ Unit16Pair_TestApp testApp( application, UNIT16_PAIR_FROM_OPERATOR_ASSIGNMENT);
+ application.MainLoop();
+ return test_return_value;
+}
+
/** @} */ // end of itc-unit16-pair-testcases
/** @} */ // end of itc-unit16-pair
/** @} */ // end of itc-dali-core
VectorBase::SizeType nGetSize = 0 , nSetSize = 100 , nSizeCount = 0 ;
Vector< int > intvector;
+ DALI_CHECK_FAIL( !intvector.Empty() , "Vector is not empty");
intvector.Reserve( nSetSize );
nGetSize = intvector.Capacity();
DALI_CHECK_FAIL(nSetSize != nGetSize, "Capacity is not match with reserve size ");
intvector.PushBack( 99 );
intvector.PushBack( 11 );
intvector.PushBack( 34 );
+ DALI_CHECK_FAIL( intvector.Empty() , "Vector is empty");
DALI_CHECK_FAIL(nSetSize != nGetSize, "Capacity is changed which is not expected ");
nSizeCount = intvector.Count();
DALI_CHECK_FAIL(static_cast<Dali::VectorBase::SizeType>(3) != nSizeCount, "Count is not match with expected count ");
OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
Vector< int > intVector;
VectorBase::SizeType nsizeSet =12 ;
+ VectorBase::SizeType nresizeValue =7 ;
intVector.PushBack( 1 );
intVector.PushBack( 2 );
intVector.PushBack( 3 );
intVector.PushBack( 4 );
intVector.PushBack( 5 );
+
Vector< int >::Iterator iRet;
iRet = intVector.Erase( intVector.Begin() + 1u, intVector.Begin() + 2u );
DALI_CHECK_FAIL(intVector[0] != 1 || intVector[1] != 3 || intVector[2] != 4 || intVector[3] != 5 || *iRet != 3 , "Erase is failed to Erase the range of item from the vector ");
+
intVector.Erase(iRet);
DALI_CHECK_FAIL(intVector[1] == 3, "Erase is failed to Erase the range of item from the vector ");
+
intVector.Insert( iRet , 22 );
DALI_CHECK_FAIL(*iRet != 22, "Erase is failed to Erase the range of item from the vector ");
+
+ intVector.Resize( nresizeValue );
+ DALI_CHECK_FAIL( static_cast<Dali::VectorBase::SizeType>(7) != intVector.Capacity(), "Resize is failed" );
+
intVector.Resize( nsizeSet, 123 );
DALI_CHECK_FAIL( static_cast<Dali::VectorBase::SizeType>(12) != intVector.Capacity() || intVector[ nsizeSet-1 ] !=123 , "Resize is failed to resize item ");
+
DaliLog::PrintPass();
}
void ImageViewSetGetProperty();
void VTImageViewSetGetProperty001();
+void ImageViewSetImage();
+
namespace
{
IMAGE_VIEW_ASSIGNMENT_OPERATOR,
IMAGE_VIEW_COPY_CONSTRUCTOR,
IMAGE_VIEW_NEW_WITH_MAP_PROPERTY,
- IMAGE_VIEW_SET_GET_PROPERTY
+ IMAGE_VIEW_SET_GET_PROPERTY,
+ IMAGE_VIEW_SETIMAGE
};
struct ImageView_TestApp : public ConnectionTracker
case IMAGE_VIEW_SET_GET_PROPERTY:
ImageViewSetGetProperty();
break;
+ case IMAGE_VIEW_SETIMAGE:
+ ImageViewSetImage();
+ break;
}
}
void VerdictTest()
Stage::GetCurrent().Remove( g_imageView );
DaliLog::PrintPass();
}
+
+void ImageViewSetImage()
+{
+ OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
+ string strActualPathOne=getResourceFullPath(IMAGE_FILENAME);
+ if(strActualPathOne=="")
+ {
+ LOG_E( "Unable to get resource path from app data directory." );
+ test_return_value=1;
+ return;
+ }
+
+ g_imageView = ImageView::New();
+
+ g_imageView.SetImage(strActualPathOne);
+ DALI_CHECK_FAIL( !g_imageView , "ImageView::New(image) initialization is failed " );
+ Image getImage=g_imageView.GetImage();
+ DALI_CHECK_FAIL( getImage, "ImageView::GetImage() is failed to get Image." ); //Deprecated since 3.0, DALi version 1.1.4
+ //A valid handle will be returned only if this instance was created with New(Image) or SetImage(Image) was called.
+ const ImageDimensions ImageSize = ResourceImage::GetImageSize(strActualPathOne);
+ g_imageView.SetImage (strActualPathOne, ImageSize);
+ getImage=g_imageView.GetImage();
+ DALI_CHECK_FAIL( getImage, "ImageView::GetImage() is failed to get Image." );
+
+ ImageDimensions ImageSize1(512,512);
+ g_imageView.SetImage (strActualPathOne, ImageSize1);
+ getImage=g_imageView.GetImage();
+ DALI_CHECK_FAIL( getImage, "ImageView::GetImage() is failed to get Image." );
+
+ Image image = CreateBufferImageForImageView( g_width, g_height, Vector4(1.f, 1.f, 1.f, 1.f) );
+ g_imageView = ImageView::New(image);
+ getImage=g_imageView.GetImage();
+ DALI_CHECK_FAIL( !getImage, "ImageView::GetImage() is failed to get Image." );
+
+ g_imageView = ImageView::New(strActualPathOne);
+ getImage=g_imageView.GetImage();
+ DALI_CHECK_FAIL( getImage, "ImageView::GetImage() is failed to get Image." );
+
+ const ImageDimensions ImageSize2 = ResourceImage::GetImageSize(strActualPathOne);
+ g_imageView = ImageView::New(strActualPathOne,ImageSize2);
+ getImage=g_imageView.GetImage();
+ DALI_CHECK_FAIL( getImage, "ImageView::GetImage() is failed to get Image." );
+
+ const ImageDimensions ImageSize3(512,512);
+ g_imageView = ImageView::New(strActualPathOne,ImageSize3);
+ getImage=g_imageView.GetImage();
+ DALI_CHECK_FAIL( getImage, "ImageView::GetImage() is failed to get Image." );
+
+ g_imageView.SetProperty(Dali::Toolkit::ImageView::Property::IMAGE,strActualPathOne);
+ string url=g_imageView.GetProperty<string>(Dali::Toolkit::ImageView::Property::IMAGE);
+ DALI_CHECK_FAIL( strActualPathOne != url, "ImageView Set/Get property nat match" );
+
+ DaliLog::PrintPass();
+}
/**
* End of TC Logic Implementation Area.
return test_return_value;
}
+//& purpose: To Check ImageView path is set.
+//& type: auto
+/**
+* @testcase ITcImageViewSetImage
+* @since_tizen 3.0
+* @type Positive
+* @description To Check ImageView path is set.
+* @scenario Creates a ImageView object. \n
+* SetImgae with image path.\n
+* Check the ImageView get Image handle is NULL or Not \n
+* @apicovered ImageView::New(), SetImage(const std::string & url), GetImage() ,ImageView::New(Image), SetImage( url, ImageDimentions) ,ImageView::New(url)
+* @passcase If ImageView object is not NULL.
+* @failcase Fail if ImageView object is NULL
+* @precondition NA
+* @postcondition NA
+*/
+int ITcImageViewSetImage(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+ Application application = Application::New( &gArgc, &gArgv );
+ ImageView_TestApp testApp( application, IMAGE_VIEW_SETIMAGE);
+ application.MainLoop();
+ return test_return_value;
+}
+
/** @} */
/** @} */
/** @} */
void ItemLayoutSetGetItemSize();
void ItemLayoutGetFlickSpeedFactor();
void ItemLayoutGetExtension();
+void ItemLayoutCopyConstractor();
namespace
{
ITEM_LAYOUT_GET_RESERVE_ITEM_COUNT,
ITEM_LAYOUT_SET_GET_ITEM_SIZE,
ITEM_LAYOUT_GET_FLICK_SPEED_FACTOR,
- ITEM_LAYOUT_GET_EXTENSION
+ ITEM_LAYOUT_GET_EXTENSION,
+ ITEM_LAYOUT_COPY_CONSTRUCTOR
};
struct ItemLayout_TestApp : public ConnectionTracker
case ITEM_LAYOUT_GET_EXTENSION:
ItemLayoutGetExtension();
break;
+
+ case ITEM_LAYOUT_COPY_CONSTRUCTOR:
+ ItemLayoutCopyConstractor();
+ break;
+
}
}
// Data
OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
ItemLayoutFactory itemFactory;
ItemView itemView;
- ItemLayoutPtr gridLayout;
+ ItemLayoutPtr gridLayout;
ItemLayoutPtr itemLayout;
int nTestResult = 0;
OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
ItemLayoutFactory itemFactory;
ItemView itemView;
- ItemLayoutPtr gridLayout;
+ ItemLayoutPtr gridLayout;
ItemLayoutPtr itemLayout;
DALI_CHECK_FAIL(!ItemLayoutInitialize(itemFactory, itemView, gridLayout, itemLayout), "ItemLayout Initialization is failed." );
DaliLog::PrintPass();
}
-
+void ItemLayoutCopyConstractor()
+{
+ OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
+ const int ITEM_ID = 0;
+ Vector3 vec3Target(480.0f, 800.0f, 0.0f);
+ Vector3 vec3ItemSizeTemp(0.0f, 0.0f, 0.0f);
+ Vector3 vec3ItemSize(1.0f, 1.0f, 1.0f);
+
+ ControlOrientation::Type nOrientationType = ControlOrientation::Up;
+
+ ItemLayoutFactory itemFactory;
+ ItemView itemView;
+ ItemLayoutPtr gridLayout;
+ ItemLayoutPtr itemLayout1;
+
+ DALI_CHECK_FAIL(!ItemLayoutInitialize(itemFactory, itemView, gridLayout, itemLayout1), "ItemLayout Initialization is failed." );
+
+ ItemLayoutCustomization ( itemView, itemLayout1, nOrientationType );
+ itemLayout1->SetItemSize(vec3ItemSize);
+
+ ItemLayoutPtr itemLayout2(itemLayout1);
+ itemLayout2->GetItemSize(ITEM_ID, vec3Target, vec3ItemSizeTemp);
+
+ DALI_CHECK_FAIL( vec3ItemSize != vec3ItemSizeTemp, "Itemlayout is not copied" );
+
+ DaliLog::PrintPass();
+}
/**
* End of TC Logic Implementation Area.
return test_return_value;
}
+//& purpose: To check the copy contructor Item Layout
+//& type: auto
+/**
+* @testcase ItemLayoutCopyConstractor
+* @since_tizen 3.0
+* @type Positive
+* @description To check the copy contructor Item Layout
+* @scenario Create the ItemView actor \n
+* Create a grid layout\n
+* Get/Set Item size \n
+* Adds the grid layout to itemitemView \n
+* Gets the Extension of Item Layout \n
+* Check the copy contructor is work or not
+* @apicovered SetOrientation(), GetExtension(), SetItemSize(), GetItemSize()
+* @passcase If get Extension is Null.
+* @failcase If get Extension is not Null.
+* @precondition NA
+* @postcondition NA
+*/
+int ITcItemLayoutCopyConstractor(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+
+ Application application = Application::New( &gArgc, &gArgv );
+ ItemLayout_TestApp testApp( application, ITEM_LAYOUT_COPY_CONSTRUCTOR);
+ application.MainLoop();
+
+ return test_return_value;
+}
+
/** @} */
/** @} */
/** @} */
extern int ITcImageViewCopyConstructor(void);
extern int ITcImageViewNewWithMapProperty(void);
extern int ITcImageViewSetGetProperty(void);
+extern int ITcImageViewSetImage(void);
extern int ITcItemFactoryGetNumberOfItems(void);
extern int ITcItemFactoryNewItem(void);
extern int ITcItemFactoryNew(void);
extern int ITcItemLayoutSetGetItemSize(void);
extern int ITcItemLayoutGetFlickSpeedFactor(void);
extern int ITcItemLayoutGetExtension(void);
+extern int ITcItemLayoutCopyConstractor(void);
extern int ITcItemRangeAssignmentOperator(void);
extern int ITcItemRangeCopyConstructor(void);
extern int ITcItemRangeWithin(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
extern int ITcTextFieldTextChangedSignal(void);
+extern int ITcTextFieldSetGetPropertiesAndIndex(void);
extern int ITcTextLabelNewDownCast(void);
extern int ITcTextLabelGetSetPropertiesWithAssignment(void);
extern int ITcTextLabelNewWithTextCopy(void);
{"ITcItemLayoutSetGetItemSize", ITcItemLayoutSetGetItemSize, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetFlickSpeedFactor", ITcItemLayoutGetFlickSpeedFactor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetExtension", ITcItemLayoutGetExtension, ITs_item_layout_startup, ITs_item_layout_cleanup},
+ {"ITcItemLayoutCopyConstractor", ITcItemLayoutCopyConstractor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemRangeAssignmentOperator", ITcItemRangeAssignmentOperator, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeCopyConstructor", ITcItemRangeCopyConstructor, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeWithin", ITcItemRangeWithin, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcImageViewCopyConstructor", ITcImageViewCopyConstructor, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewNewWithMapProperty", ITcImageViewNewWithMapProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewSetGetProperty", ITcImageViewSetGetProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
+ {"ITcImageViewSetImage", ITcImageViewSetImage, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcItemViewGetLayoutCount", ITcItemViewGetLayoutCount, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewGetLayout", ITcItemViewGetLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewRemoveLayout", ITcItemViewRemoveLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldTextChangedSignal", ITcTextFieldTextChangedSignal, ITs_text_field_startup, ITs_text_field_cleanup},
+ {"ITcTextFieldSetGetPropertiesAndIndex", ITcTextFieldSetGetPropertiesAndIndex, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextLabelNewDownCast", ITcTextLabelNewDownCast, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelGetSetPropertiesWithAssignment", ITcTextLabelGetSetPropertiesWithAssignment, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelNewWithTextCopy", ITcTextLabelNewWithTextCopy, ITs_text_label_startup, ITs_text_label_cleanup},
extern int ITcImageViewCopyConstructor(void);
extern int ITcImageViewNewWithMapProperty(void);
extern int ITcImageViewSetGetProperty(void);
+extern int ITcImageViewSetImage(void);
extern int ITcItemFactoryGetNumberOfItems(void);
extern int ITcItemFactoryNewItem(void);
extern int ITcItemFactoryNew(void);
extern int ITcItemLayoutSetGetItemSize(void);
extern int ITcItemLayoutGetFlickSpeedFactor(void);
extern int ITcItemLayoutGetExtension(void);
+extern int ITcItemLayoutCopyConstractor(void);
extern int ITcItemRangeAssignmentOperator(void);
extern int ITcItemRangeCopyConstructor(void);
extern int ITcItemRangeWithin(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
extern int ITcTextFieldTextChangedSignal(void);
+extern int ITcTextFieldSetGetPropertiesAndIndex(void);
extern int ITcTextLabelNewDownCast(void);
extern int ITcTextLabelGetSetPropertiesWithAssignment(void);
extern int ITcTextLabelNewWithTextCopy(void);
{"ITcItemLayoutSetGetItemSize", ITcItemLayoutSetGetItemSize, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetFlickSpeedFactor", ITcItemLayoutGetFlickSpeedFactor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetExtension", ITcItemLayoutGetExtension, ITs_item_layout_startup, ITs_item_layout_cleanup},
+ {"ITcItemLayoutCopyConstractor", ITcItemLayoutCopyConstractor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemRangeAssignmentOperator", ITcItemRangeAssignmentOperator, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeCopyConstructor", ITcItemRangeCopyConstructor, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeWithin", ITcItemRangeWithin, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcImageViewCopyConstructor", ITcImageViewCopyConstructor, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewNewWithMapProperty", ITcImageViewNewWithMapProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewSetGetProperty", ITcImageViewSetGetProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
+ {"ITcImageViewSetImage", ITcImageViewSetImage, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcItemViewGetLayoutCount", ITcItemViewGetLayoutCount, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewGetLayout", ITcItemViewGetLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewRemoveLayout", ITcItemViewRemoveLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldTextChangedSignal", ITcTextFieldTextChangedSignal, ITs_text_field_startup, ITs_text_field_cleanup},
+ {"ITcTextFieldSetGetPropertiesAndIndex", ITcTextFieldSetGetPropertiesAndIndex, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextLabelNewDownCast", ITcTextLabelNewDownCast, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelGetSetPropertiesWithAssignment", ITcTextLabelGetSetPropertiesWithAssignment, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelNewWithTextCopy", ITcTextLabelNewWithTextCopy, ITs_text_label_startup, ITs_text_label_cleanup},
extern int ITcImageViewCopyConstructor(void);
extern int ITcImageViewNewWithMapProperty(void);
extern int ITcImageViewSetGetProperty(void);
+extern int ITcImageViewSetImage(void);
extern int ITcItemFactoryGetNumberOfItems(void);
extern int ITcItemFactoryNewItem(void);
extern int ITcItemFactoryNew(void);
extern int ITcItemLayoutSetGetItemSize(void);
extern int ITcItemLayoutGetFlickSpeedFactor(void);
extern int ITcItemLayoutGetExtension(void);
+extern int ITcItemLayoutCopyConstractor(void);
extern int ITcItemRangeAssignmentOperator(void);
extern int ITcItemRangeCopyConstructor(void);
extern int ITcItemRangeWithin(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
extern int ITcTextFieldTextChangedSignal(void);
+extern int ITcTextFieldSetGetPropertiesAndIndex(void);
extern int ITcTextLabelNewDownCast(void);
extern int ITcTextLabelGetSetPropertiesWithAssignment(void);
extern int ITcTextLabelNewWithTextCopy(void);
{"ITcItemLayoutSetGetItemSize", ITcItemLayoutSetGetItemSize, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetFlickSpeedFactor", ITcItemLayoutGetFlickSpeedFactor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetExtension", ITcItemLayoutGetExtension, ITs_item_layout_startup, ITs_item_layout_cleanup},
+ {"ITcItemLayoutCopyConstractor", ITcItemLayoutCopyConstractor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemRangeAssignmentOperator", ITcItemRangeAssignmentOperator, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeCopyConstructor", ITcItemRangeCopyConstructor, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeWithin", ITcItemRangeWithin, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcImageViewCopyConstructor", ITcImageViewCopyConstructor, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewNewWithMapProperty", ITcImageViewNewWithMapProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewSetGetProperty", ITcImageViewSetGetProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
+ {"ITcImageViewSetImage", ITcImageViewSetImage, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcItemViewGetLayoutCount", ITcItemViewGetLayoutCount, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewGetLayout", ITcItemViewGetLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewRemoveLayout", ITcItemViewRemoveLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldTextChangedSignal", ITcTextFieldTextChangedSignal, ITs_text_field_startup, ITs_text_field_cleanup},
+ {"ITcTextFieldSetGetPropertiesAndIndex", ITcTextFieldSetGetPropertiesAndIndex, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextLabelNewDownCast", ITcTextLabelNewDownCast, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelGetSetPropertiesWithAssignment", ITcTextLabelGetSetPropertiesWithAssignment, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelNewWithTextCopy", ITcTextLabelNewWithTextCopy, ITs_text_label_startup, ITs_text_label_cleanup},
extern int ITcImageViewCopyConstructor(void);
extern int ITcImageViewNewWithMapProperty(void);
extern int ITcImageViewSetGetProperty(void);
+extern int ITcImageViewSetImage(void);
extern int ITcItemFactoryGetNumberOfItems(void);
extern int ITcItemFactoryNewItem(void);
extern int ITcItemFactoryNew(void);
extern int ITcItemLayoutSetGetItemSize(void);
extern int ITcItemLayoutGetFlickSpeedFactor(void);
extern int ITcItemLayoutGetExtension(void);
+extern int ITcItemLayoutCopyConstractor(void);
extern int ITcItemRangeAssignmentOperator(void);
extern int ITcItemRangeCopyConstructor(void);
extern int ITcItemRangeWithin(void);
extern int ITcTextFieldAssignment(void);
extern int ITcTextFieldCopy(void);
extern int ITcTextFieldTextChangedSignal(void);
+extern int ITcTextFieldSetGetPropertiesAndIndex(void);
extern int ITcTextLabelNewDownCast(void);
extern int ITcTextLabelGetSetPropertiesWithAssignment(void);
extern int ITcTextLabelNewWithTextCopy(void);
{"ITcItemLayoutSetGetItemSize", ITcItemLayoutSetGetItemSize, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetFlickSpeedFactor", ITcItemLayoutGetFlickSpeedFactor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemLayoutGetExtension", ITcItemLayoutGetExtension, ITs_item_layout_startup, ITs_item_layout_cleanup},
+ {"ITcItemLayoutCopyConstractor", ITcItemLayoutCopyConstractor, ITs_item_layout_startup, ITs_item_layout_cleanup},
{"ITcItemRangeAssignmentOperator", ITcItemRangeAssignmentOperator, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeCopyConstructor", ITcItemRangeCopyConstructor, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcItemRangeWithin", ITcItemRangeWithin, ITs_item_range_startup, ITs_item_range_cleanup},
{"ITcImageViewCopyConstructor", ITcImageViewCopyConstructor, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewNewWithMapProperty", ITcImageViewNewWithMapProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcImageViewSetGetProperty", ITcImageViewSetGetProperty, ITs_ImageView_startup, ITs_ImageView_cleanup},
+ {"ITcImageViewSetImage", ITcImageViewSetImage, ITs_ImageView_startup, ITs_ImageView_cleanup},
{"ITcItemViewGetLayoutCount", ITcItemViewGetLayoutCount, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewGetLayout", ITcItemViewGetLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcItemViewRemoveLayout", ITcItemViewRemoveLayout, ITs_itemView_startup, ITs_itemView_cleanup},
{"ITcTextFieldAssignment", ITcTextFieldAssignment, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldCopy", ITcTextFieldCopy, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextFieldTextChangedSignal", ITcTextFieldTextChangedSignal, ITs_text_field_startup, ITs_text_field_cleanup},
+ {"ITcTextFieldSetGetPropertiesAndIndex", ITcTextFieldSetGetPropertiesAndIndex, ITs_text_field_startup, ITs_text_field_cleanup},
{"ITcTextLabelNewDownCast", ITcTextLabelNewDownCast, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelGetSetPropertiesWithAssignment", ITcTextLabelGetSetPropertiesWithAssignment, ITs_text_label_startup, ITs_text_label_cleanup},
{"ITcTextLabelNewWithTextCopy", ITcTextLabelNewWithTextCopy, ITs_text_label_startup, ITs_text_label_cleanup},
g_bTextChangedCallback = ( textField.GetProperty< string >( TextField::Property::TEXT ) == TEXT_FIELD_STRING );
}
+const char* const PROPERTY_NAME_RENDERING_BACKEND = "renderingBackend";
+const char* const PROPERTY_NAME_TEXT = "text";
+const char* const PROPERTY_NAME_PLACEHOLDER_TEXT = "placeholderText";
+const char* const PROPERTY_NAME_PLACEHOLDER_TEXT_FOCUSED = "placeholderTextFocused";
+const char* const PROPERTY_NAME_FONT_FAMILY = "fontFamily";
+const char* const PROPERTY_NAME_FONT_STYLE = "fontStyle";
+const char* const PROPERTY_NAME_POINT_SIZE = "pointSize";
+const char* const PROPERTY_NAME_MAX_LENGTH = "maxLength";
+const char* const PROPERTY_NAME_EXCEED_POLICY = "exceedPolicy";
+const char* const PROPERTY_NAME_HORIZONTAL_ALIGNMENT = "horizontalAlignment";
+const char* const PROPERTY_NAME_VERTICAL_ALIGNMENT = "verticalAlignment";
+const char* const PROPERTY_NAME_TEXT_COLOR = "textColor";
+const char* const PROPERTY_NAME_PLACEHOLDER_TEXT_COLOR = "placeholderTextColor";
+const char* const PROPERTY_NAME_SHADOW_OFFSET = "shadowOffset";
+const char* const PROPERTY_NAME_SHADOW_COLOR = "shadowColor";
+const char* const PROPERTY_NAME_PRIMARY_CURSOR_COLOR = "primaryCursorColor";
+const char* const PROPERTY_NAME_SECONDARY_CURSOR_COLOR = "secondaryCursorColor";
+const char* const PROPERTY_NAME_ENABLE_CURSOR_BLINK = "enableCursorBlink";
+const char* const PROPERTY_NAME_CURSOR_BLINK_INTERVAL = "cursorBlinkInterval";
+const char* const PROPERTY_NAME_CURSOR_BLINK_DURATION = "cursorBlinkDuration";
+const char* const PROPERTY_NAME_CURSOR_WIDTH = "cursorWidth";
+const char* const PROPERTY_NAME_GRAB_HANDLE_IMAGE = "grabHandleImage";
+const char* const PROPERTY_NAME_GRAB_HANDLE_PRESSED_IMAGE = "grabHandlePressedImage";
+const char* const PROPERTY_NAME_SCROLL_THRESHOLD = "scrollThreshold";
+const char* const PROPERTY_NAME_SCROLL_SPEED = "scrollSpeed";
+const char* const PROPERTY_NAME_SELECTION_HANDLE_IMAGE_LEFT = "selectionHandleImageLeft";
+const char* const PROPERTY_NAME_SELECTION_HANDLE_IMAGE_RIGHT = "selectionHandleImageRight";
+const char* const PROPERTY_NAME_SELECTION_HANDLE_PRESSED_IMAGE_LEFT = "selectionHandlePressedImageLeft";
+const char* const PROPERTY_NAME_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT = "selectionHandlePressedImageRight";
+const char* const PROPERTY_NAME_SELECTION_HANDLE_MARKER_IMAGE_LEFT = "selectionHandleMarkerImageLeft";
+const char* const PROPERTY_NAME_SELECTION_HANDLE_MARKER_IMAGE_RIGHT = "selectionHandleMarkerImageRight";
+const char* const PROPERTY_NAME_SELECTION_HIGHLIGHT_COLOR = "selectionHighlightColor";
+const char* const PROPERTY_NAME_DECORATION_BOUNDING_BOX = "decorationBoundingBox";
+const char* const PROPERTY_NAME_INPUT_METHOD_SETTINGS = "inputMethodSettings";
+const char* const PROPERTY_NAME_INPUT_COLOR = "inputColor";
+const char* const PROPERTY_NAME_ENABLE_MARKUP = "enableMarkup";
+const char* const PROPERTY_NAME_INPUT_FONT_FAMILY = "inputFontFamily";
+const char* const PROPERTY_NAME_INPUT_FONT_STYLE = "inputFontStyle";
+const char* const PROPERTY_NAME_INPUT_POINT_SIZE = "inputPointSize";
+
+const char* const PROPERTY_NAME_UNDERLINE = "underline";
+const char* const PROPERTY_NAME_INPUT_UNDERLINE = "inputUnderline";
+const char* const PROPERTY_NAME_SHADOW = "shadow";
+const char* const PROPERTY_NAME_INPUT_SHADOW = "inputShadow";
+const char* const PROPERTY_NAME_EMBOSS = "emboss";
+const char* const PROPERTY_NAME_INPUT_EMBOSS = "inputEmboss";
+const char* const PROPERTY_NAME_OUTLINE = "outline";
+const char* const PROPERTY_NAME_INPUT_OUTLINE = "inputOutline";
+
/** @addtogroup itc-text-field-testcases
* @brief Integration testcases for suite text-field
void TextFieldAssignment();
void TextFieldCopy();
void TextFieldTextChangedSignal();
+void TextFieldSetGetPropertiesAndIndex();
namespace
{
TEXT_FIELD_DOWNCAST,
TEXT_FIELD_ASSIGNMENT,
TEXT_FIELD_COPY,
- TEXT_FIELD_TEXT_CHANGED_SIGNAL
+ TEXT_FIELD_TEXT_CHANGED_SIGNAL,
+ TEXT_FIELD_SET_GET_PROPRTIES_AND_INDEX
};
struct TextField_TestApp : public ConnectionTracker
bool Tick()
{
mTimer.Stop();
- mApplication.Quit();
+ mApplication.Quit();
return true;
}
TextFieldTextChangedSignal();
break;
}
+ case TEXT_FIELD_SET_GET_PROPRTIES_AND_INDEX:
+ {
+ TextFieldSetGetPropertiesAndIndex();
+ break;
+ }
}
}
DaliLog::PrintPass();
}
+bool SetPropertyMapRetrieved( TextField& field, const Property::Index property, const std::string mapKey, const std::string mapValue )
+{
+ bool result = false;
+ Property::Map imageMap;
+ imageMap[mapKey] =mapValue;
+
+ field.SetProperty( property , imageMap );
+ Property::Value propValue = field.GetProperty( property );
+ Property::Map* resultMap = propValue.GetMap();
+
+ if ( resultMap->Find( mapKey )->Get< std::string>() == mapValue )
+ {
+ result = true;
+ }
+
+ return result;
+}
+
+// Positive test case for a method
+void TextFieldSetGetPropertiesAndIndex()
+{
+ OPEN_GL_FREATURE_CHECK(SUITE_NAME,__LINE__)
+ TextField textField = TextField::New();
+ DALI_CHECK_FAIL( !textField ,"TextField::New() is failed");
+
+ Stage::GetCurrent().Add( textField );
+
+ // Check Property Indices are correct or not
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_RENDERING_BACKEND ) != TextField::Property::RENDERING_BACKEND ,"Property index not match for RENDERING_BACKEND");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_TEXT ) != TextField::Property::TEXT ,"Property index not match for TEXT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT ) != TextField::Property::PLACEHOLDER_TEXT ,"Property index not match for PLACEHOLDER_TEXT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT_FOCUSED ) != TextField::Property::PLACEHOLDER_TEXT_FOCUSED ,"Property index not match for PLACEHOLDER_TEXT_FOCUSED");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_FONT_FAMILY ) != TextField::Property::FONT_FAMILY ,"Property index not match for FONT_FAMILY");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_FONT_STYLE ) != TextField::Property::FONT_STYLE ,"Property index not match for FONT_STYLE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_POINT_SIZE ) != TextField::Property::POINT_SIZE ,"Property index not match for POINT_SIZE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_MAX_LENGTH ) != TextField::Property::MAX_LENGTH ,"Property index not match for MAX_LENGTH");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_EXCEED_POLICY ) != TextField::Property::EXCEED_POLICY ,"Property index not match for EXCEED_POLICY");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_HORIZONTAL_ALIGNMENT ) != TextField::Property::HORIZONTAL_ALIGNMENT ,"Property index not match for HORIZONTAL_ALIGNMENT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_VERTICAL_ALIGNMENT ) != TextField::Property::VERTICAL_ALIGNMENT ,"Property index not match for VERTICAL_ALIGNMENT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_TEXT_COLOR ) != TextField::Property::TEXT_COLOR ,"Property index not match for TEXT_COLOR");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_PLACEHOLDER_TEXT_COLOR ) != TextField::Property::PLACEHOLDER_TEXT_COLOR ,"Property index not match for PLACEHOLDER_TEXT_COLOR");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SHADOW_OFFSET ) != TextField::Property::SHADOW_OFFSET ,"Property index not match for SHADOW_OFFSET");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SHADOW_COLOR ) != TextField::Property::SHADOW_COLOR ,"Property index not match for SHADOW_COLOR");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_PRIMARY_CURSOR_COLOR ) != TextField::Property::PRIMARY_CURSOR_COLOR ,"Property index not match for PRIMARY_CURSOR_COLOR");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SECONDARY_CURSOR_COLOR ) != TextField::Property::SECONDARY_CURSOR_COLOR ,"Property index not match for SECONDARY_CURSOR_COLOR");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_ENABLE_CURSOR_BLINK ) != TextField::Property::ENABLE_CURSOR_BLINK ,"Property index not match for ENABLE_CURSOR_BLINK");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_CURSOR_BLINK_INTERVAL ) != TextField::Property::CURSOR_BLINK_INTERVAL ,"Property index not match for CURSOR_BLINK_INTERVAL");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_CURSOR_BLINK_DURATION ) != TextField::Property::CURSOR_BLINK_DURATION ,"Property index not match for CURSOR_BLINK_DURATION");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_CURSOR_WIDTH ) != TextField::Property::CURSOR_WIDTH ,"Property index not match for CURSOR_WIDTH");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_GRAB_HANDLE_IMAGE ) != TextField::Property::GRAB_HANDLE_IMAGE ,"Property index not match for GRAB_HANDLE_IMAGE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_GRAB_HANDLE_PRESSED_IMAGE ) != TextField::Property::GRAB_HANDLE_PRESSED_IMAGE ,"Property index not match for GRAB_HANDLE_PRESSED_IMAGE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SCROLL_THRESHOLD ) != TextField::Property::SCROLL_THRESHOLD ,"Property index not match for SCROLL_THRESHOLD");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SCROLL_SPEED ) != TextField::Property::SCROLL_SPEED ,"Property index not match for SCROLL_SPEED");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SELECTION_HANDLE_IMAGE_LEFT ) != TextField::Property::SELECTION_HANDLE_IMAGE_LEFT ,"Property index not match for SELECTION_HANDLE_IMAGE_LEFT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SELECTION_HANDLE_IMAGE_RIGHT ) != TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT ,"Property index not match for SELECTION_HANDLE_IMAGE_RIGHT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SELECTION_HANDLE_PRESSED_IMAGE_LEFT ) != TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT ,"Property index not match for SELECTION_HANDLE_PRESSED_IMAGE_LEFT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SELECTION_HANDLE_PRESSED_IMAGE_RIGHT ) != TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT ,"Property index not match for SELECTION_HANDLE_PRESSED_IMAGE_RIGHT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SELECTION_HANDLE_MARKER_IMAGE_LEFT ) != TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT ,"Property index not match for SELECTION_HANDLE_MARKER_IMAGE_LEFT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SELECTION_HANDLE_MARKER_IMAGE_RIGHT ) != TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT ,"Property index not match for SELECTION_HANDLE_MARKER_IMAGE_RIGHT");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SELECTION_HIGHLIGHT_COLOR ) != TextField::Property::SELECTION_HIGHLIGHT_COLOR ,"Property index not match for SELECTION_HIGHLIGHT_COLOR");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_DECORATION_BOUNDING_BOX ) != TextField::Property::DECORATION_BOUNDING_BOX ,"Property index not match for DECORATION_BOUNDING_BOX");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_METHOD_SETTINGS ) != TextField::Property::INPUT_METHOD_SETTINGS ,"Property index not match for INPUT_METHOD_SETTINGS");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_COLOR ) != TextField::Property::INPUT_COLOR ,"Property index not match for INPUT_COLOR");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_ENABLE_MARKUP ) != TextField::Property::ENABLE_MARKUP ,"Property index not match for ENABLE_MARKUP");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_FONT_FAMILY ) != TextField::Property::INPUT_FONT_FAMILY ,"Property index not match for INPUT_FONT_FAMILY");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_FONT_STYLE ) != TextField::Property::INPUT_FONT_STYLE ,"Property index not match for INPUT_FONT_STYLE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_POINT_SIZE ) != TextField::Property::INPUT_POINT_SIZE ,"Property index not match for INPUT_POINT_SIZE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_UNDERLINE ) != TextField::Property::UNDERLINE ,"Property index not match for UNDERLINE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_UNDERLINE ) != TextField::Property::INPUT_UNDERLINE ,"Property index not match for INPUT_UNDERLINE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_SHADOW ) != TextField::Property::SHADOW ,"Property index not match for SHADOW");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_SHADOW ) != TextField::Property::INPUT_SHADOW ,"Property index not match for INPUT_SHADOW");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_EMBOSS ) != TextField::Property::EMBOSS ,"Property index not match for EMBOSS");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_EMBOSS ) != TextField::Property::INPUT_EMBOSS ,"Property index not match for INPUT_EMBOSS");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_OUTLINE ) != TextField::Property::OUTLINE ,"Property index not match for OUTLINE");
+ DALI_CHECK_FAIL( textField.GetPropertyIndex( PROPERTY_NAME_INPUT_OUTLINE ) != TextField::Property::INPUT_OUTLINE ,"Property index not match for INPUT_OUTLINE");
+
+ //Set Get Properties
+ textField.SetProperty( TextField::Property::RENDERING_BACKEND, Text::RENDERING_SHARED_ATLAS );
+ DALI_CHECK_FAIL( (Text::RenderingType)textField.GetProperty<int>( TextField::Property::RENDERING_BACKEND ) != Text::RENDERING_SHARED_ATLAS, "Property Value not match." );
+
+ textField.SetProperty( TextField::Property::TEXT, "Setting Text" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::TEXT ) != std::string("Setting Text"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Setting Placeholder Text" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::PLACEHOLDER_TEXT ) != std::string("Setting Placeholder Text"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::PLACEHOLDER_TEXT_FOCUSED, "Setting Placeholder Text Focused" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::PLACEHOLDER_TEXT_FOCUSED ) != std::string("Setting Placeholder Text Focused"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::FONT_FAMILY, "Setting font family" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::FONT_FAMILY ) != std::string("Setting font family"), "Property value not match." );
+ textField.SetProperty( TextField::Property::FONT_STYLE, "Setting font style" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::FONT_STYLE ) != std::string("Setting font style"), "Property value not match." );
+ textField.SetProperty( TextField::Property::POINT_SIZE, 10.f );
+ DALI_CHECK_FAIL( textField.GetProperty<float>( TextField::Property::POINT_SIZE ) - 10.f> Math::MACHINE_EPSILON_1000, "Property value not match." );
+
+ const int maxNumberOfCharacters = 20;
+ textField.SetProperty( TextField::Property::MAX_LENGTH, maxNumberOfCharacters );
+ DALI_CHECK_FAIL( textField.GetProperty<int>( TextField::Property::MAX_LENGTH ) != maxNumberOfCharacters, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::HORIZONTAL_ALIGNMENT, "END" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::HORIZONTAL_ALIGNMENT ) != "END", "Property value not match." );
+ textField.SetProperty( TextField::Property::VERTICAL_ALIGNMENT, "CENTER" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::VERTICAL_ALIGNMENT ) != "CENTER", "Property value not match." );
+
+ textField.SetProperty( TextField::Property::TEXT_COLOR, Color::WHITE );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::TEXT_COLOR ) != Color::WHITE, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::PLACEHOLDER_TEXT_COLOR, Color::RED );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::PLACEHOLDER_TEXT_COLOR ) != Color::RED, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::SHADOW_OFFSET, Vector2( 1.f, 1.f ) );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector2>( TextField::Property::SHADOW_OFFSET ) != Vector2( 1.f, 1.f ), "Property value not match." );
+ textField.SetProperty( TextField::Property::SHADOW_COLOR, Color::GREEN );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::SHADOW_COLOR ) != Color::GREEN, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::PRIMARY_CURSOR_COLOR, Color::RED );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::PRIMARY_CURSOR_COLOR ) != Color::RED, "Property value not match." );
+ textField.SetProperty( TextField::Property::SECONDARY_CURSOR_COLOR, Color::BLUE );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::SECONDARY_CURSOR_COLOR ) != Color::BLUE, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::ENABLE_CURSOR_BLINK, false );
+ DALI_CHECK_FAIL( textField.GetProperty<bool>( TextField::Property::ENABLE_CURSOR_BLINK ) != false, "Property value not match." );
+ textField.SetProperty( TextField::Property::CURSOR_BLINK_INTERVAL, 1.f );
+ DALI_CHECK_FAIL( textField.GetProperty<float>( TextField::Property::CURSOR_BLINK_INTERVAL ) - 1.f > Math::MACHINE_EPSILON_1000, "Property value not match." );
+ textField.SetProperty( TextField::Property::CURSOR_BLINK_DURATION, 10.f );
+ DALI_CHECK_FAIL( textField.GetProperty<float>( TextField::Property::CURSOR_BLINK_DURATION ) - 10.f > Math::MACHINE_EPSILON_1000, "Property value not match." );
+ textField.SetProperty( TextField::Property::CURSOR_WIDTH, 1 );
+ DALI_CHECK_FAIL( textField.GetProperty<int>( TextField::Property::CURSOR_WIDTH ) != 1, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::SCROLL_THRESHOLD, 1.f );
+ DALI_CHECK_FAIL( textField.GetProperty<float>( TextField::Property::SCROLL_THRESHOLD ) - 1.f > Math::MACHINE_EPSILON_1000, "Property value not match." );
+ textField.SetProperty( TextField::Property::SCROLL_SPEED, 100.f );
+ DALI_CHECK_FAIL( textField.GetProperty<float>( TextField::Property::SCROLL_SPEED ) - 100.f > Math::MACHINE_EPSILON_1000, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::GRAB_HANDLE_IMAGE, "image1" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::GRAB_HANDLE_IMAGE ) != "image1", "Property value not match." );
+ textField.SetProperty( TextField::Property::GRAB_HANDLE_PRESSED_IMAGE, "image2" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::GRAB_HANDLE_PRESSED_IMAGE ) != "image2", "Property value not match." );
+ textField.SetProperty( TextField::Property::SELECTION_HANDLE_IMAGE_LEFT, "image3" );
+
+ DALI_CHECK_FAIL( !SetPropertyMapRetrieved( textField, TextField::Property::SELECTION_HANDLE_IMAGE_LEFT, "filename", "leftHandleImage" ) ,"Property value not match.");
+ DALI_CHECK_FAIL( !SetPropertyMapRetrieved( textField, TextField::Property::SELECTION_HANDLE_IMAGE_RIGHT, "filename", "rightHandleImage" ) ,"Property value not match.");
+ DALI_CHECK_FAIL( !SetPropertyMapRetrieved( textField, TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_LEFT, "filename", "leftHandleImagePressed" ) ,"Property value not match.");
+ DALI_CHECK_FAIL( !SetPropertyMapRetrieved( textField, TextField::Property::SELECTION_HANDLE_PRESSED_IMAGE_RIGHT, "filename", "rightHandleImagePressed" ) ,"Property value not match.");
+ DALI_CHECK_FAIL( !SetPropertyMapRetrieved( textField, TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_LEFT, "filename", "leftHandleMarkerImage" ) ,"Property value not match.");
+ DALI_CHECK_FAIL( !SetPropertyMapRetrieved( textField, TextField::Property::SELECTION_HANDLE_MARKER_IMAGE_RIGHT, "filename", "rightHandleMarkerImage" ) ,"Property value not match.");
+
+ textField.SetProperty( TextField::Property::SELECTION_HIGHLIGHT_COLOR, Color::GREEN );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::SELECTION_HIGHLIGHT_COLOR ) != Color::GREEN, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect<int>( 0, 0, 1, 1 ) );
+ DALI_CHECK_FAIL( textField.GetProperty<Rect <int > >( TextField::Property::DECORATION_BOUNDING_BOX ) != Rect<int>( 0, 0, 1, 1 ), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::INPUT_COLOR, Color::YELLOW );
+ DALI_CHECK_FAIL( textField.GetProperty<Vector4>( TextField::Property::INPUT_COLOR ) != Color::YELLOW, "Property value not match." );
+
+ DALI_CHECK_FAIL( textField.GetProperty<bool>( TextField::Property::ENABLE_MARKUP ), "Property value not match." );
+ textField.SetProperty( TextField::Property::ENABLE_MARKUP, true );
+ DALI_CHECK_FAIL( !textField.GetProperty<bool>( TextField::Property::ENABLE_MARKUP ) ,"Property value not match.");
+
+ textField.SetProperty( TextField::Property::INPUT_FONT_FAMILY, "Setting input font family" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::INPUT_FONT_FAMILY ) != "Setting input font family", "Property value not match." );
+ textField.SetProperty( TextField::Property::INPUT_FONT_STYLE, "Setting input font style" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::INPUT_FONT_STYLE ) != "Setting input font style", "Property value not match." );
+ textField.SetProperty( TextField::Property::INPUT_POINT_SIZE, 12.f );
+ DALI_CHECK_FAIL( textField.GetProperty<float>( TextField::Property::INPUT_POINT_SIZE ) - 12.f > Math::MACHINE_EPSILON_1000, "Property value not match." );
+
+ textField.SetProperty( TextField::Property::UNDERLINE, "Underline properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::UNDERLINE ) != std::string("Underline properties"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::INPUT_UNDERLINE, "Underline input properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::INPUT_UNDERLINE ) != std::string("Underline input properties"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::SHADOW, "Shadow properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::SHADOW ) != std::string("Shadow properties"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::INPUT_SHADOW, "Shadow input properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::INPUT_SHADOW ) != std::string("Shadow input properties"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::EMBOSS, "Emboss properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::EMBOSS ) != std::string("Emboss properties"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::INPUT_EMBOSS, "Emboss input properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::INPUT_EMBOSS ) != std::string("Emboss input properties"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::OUTLINE, "Outline properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::OUTLINE ) != std::string("Outline properties"), "Property value not match." );
+
+ textField.SetProperty( TextField::Property::INPUT_OUTLINE, "Outline input properties" );
+ DALI_CHECK_FAIL( textField.GetProperty<std::string>( TextField::Property::INPUT_OUTLINE ) != std::string("Outline input properties"), "Property value not match." );
+
+ Stage::GetCurrent().Remove( textField );
+ DaliLog::PrintPass();
+}
+
+
/**
* End of TC Logic Implementation Area.
**/
return test_return_value;
}
+//& purpose: To check the textfield properties set/get and index.
+//& type: auto
+/**
+* @testcase ITcTextFieldSetGetPropertiesAndIndex
+* @since_tizen 3.0
+* @type Positive
+* @description To check the textfield properties set/get and index.
+* @scenario Initialize a TextField handle \n
+* Check the textfield set/get properties\n
+* Check the textfield index properties \n
+* @apicovered TextField::New(), GetProperty(),SetProperty(),GetPropertyIndex()
+* @passcase If set/get, index property work properly.
+* @failcase If set/get, index property not work properly.
+* @precondition NA
+* @postcondition NA
+*/
+int ITcTextFieldSetGetPropertiesAndIndex(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+
+ Application application = Application::New( &gArgc, &gArgv );
+ TextField_TestApp testApp( application, TEXT_FIELD_SET_GET_PROPRTIES_AND_INDEX );
+ application.MainLoop();
+
+ return test_return_value;
+}
+
/** @} */ // end of itc-text-field-testcases
/** @} */ // end of itc-text-field