nativeImage.CreateGlTexture();
}
+void NativeImageCustomFragmentPrefixP()
+{
+ const int WIDTH = 10, HEIGHT = 15;
+ NativeImageImplementedPointer nativeImageImplemented = NativeImageImplemented::New( WIDTH, HEIGHT );
+ DALI_CHECK_INSTANCE( nativeImageImplemented, "NativeImageImplemented instance is not created." );
+
+ NativeImage nativeImage = NativeImage::New(*(nativeImageImplemented.Get()));
+ DALI_CHECK_INSTANCE( nativeImage, "NativeImage::New is failed" );
+
+ DALI_CHECK_FAIL( nativeImage.GetCustomFragmentPreFix() != NULL, "NativeImageImplemented doesn't have Extension, so GetCustomFragmentPreFix() should be NULL" );
+ DaliLog::PrintPass();
+}
+
+void NativeImageCustomSamplerTypenameP()
+{
+ const int WIDTH = 10, HEIGHT = 15;
+ NativeImageImplementedPointer nativeImageImplemented = NativeImageImplemented::New( WIDTH, HEIGHT );
+ DALI_CHECK_INSTANCE( nativeImageImplemented, "NativeImageImplemented instance is not created." );
+
+ NativeImage nativeImage = NativeImage::New(*(nativeImageImplemented.Get()));
+ DALI_CHECK_INSTANCE( nativeImage, "NativeImage::New is failed" );
+
+ DALI_CHECK_FAIL( nativeImage.GetCustomSamplerTypename() != NULL, "NativeImageImplemented doesn't have Extension, so GetCustomSamplerTypename() should be NULL" );
+ DaliLog::PrintPass();
+}
+
void VTNativeImageCreateGlTexture001()
{
bool bCreateGlTextureStatus = false;
NATIVE_IMAGE_DOWNCAST_N,
NATIVE_IMAGE_COPY_CONSTRUCTOR_P,
NATIVE_IMAGE_OPERATOR_ASSIGNMENT_P,
- NATIVE_IMAGE_CREATE_GL_TEXTURE_P
+ NATIVE_IMAGE_CREATE_GL_TEXTURE_P,
+ NATIVE_IMAGE_CUSTOM_FRAGMENT_PREFIX_P,
+ NATIVE_IMAGE_CUSTOM_SAMPLER_TYPENAME_P
};
struct NativeImage_TestApp : public ConnectionTracker
case NATIVE_IMAGE_CREATE_GL_TEXTURE_P:
NativeImageCreateGlTextureP();
break;
+
+ case NATIVE_IMAGE_CUSTOM_FRAGMENT_PREFIX_P:
+ NativeImageCustomFragmentPrefixP();
+ break;
+
+ case NATIVE_IMAGE_CUSTOM_SAMPLER_TYPENAME_P:
+ NativeImageCustomSamplerTypenameP();
+ break;
}
}
void VerdictTest()
return test_return_value;
}
+/**
+ * @testcase UtcDaliNativeImageCustomFragmentPrefixP
+ * @since_tizen 3.0
+ * @description check if CustomFragmentPrefix api works or not.
+ */
+
+int UtcDaliNativeImageCustomFragmentPrefixP(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ NativeImage_TestApp testApp( application, NATIVE_IMAGE_CUSTOM_FRAGMENT_PREFIX_P );
+ application.MainLoop();
+
+ return test_return_value;
+}
+
+/**
+ * @testcase UtcDaliNativeImageCustomSamplerTypenameP
+ * @since_tizen 3.0
+ * @description check if CustomSamplerTypename api works or not.
+ */
+
+int UtcDaliNativeImageCustomSamplerTypenameP(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ NativeImage_TestApp testApp( application, NATIVE_IMAGE_CUSTOM_SAMPLER_TYPENAME_P );
+ application.MainLoop();
+
+ return test_return_value;
+}
+
DaliLog::PrintPass();
}
+
void PropertyMapConstSquareOperatorP()
{
const Property::Index indexMapFirst = 10;
extern int UtcDaliNativeImageCopyConstructorP(void);
extern int UtcDaliNativeImageOperatorAssignmentP(void);
extern int UtcDaliNativeImageCreateGlTextureP(void);
+extern int UtcDaliNativeImageCustomFragmentPrefixP(void);
+extern int UtcDaliNativeImageCustomSamplerTypenameP(void);
extern int UtcDaliObjectRegistryObjectCreatedSignalP(void);
extern int UtcDaliObjectRegistryObjectDestroyedSignalP(void);
extern int UtcDaliObjectRegistryOperatorAssignmentP(void);
{"UtcDaliNativeImageCopyConstructorP", UtcDaliNativeImageCopyConstructorP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageOperatorAssignmentP", UtcDaliNativeImageOperatorAssignmentP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageCreateGlTextureP", UtcDaliNativeImageCreateGlTextureP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomFragmentPrefixP", UtcDaliNativeImageCustomFragmentPrefixP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomSamplerTypenameP", UtcDaliNativeImageCustomSamplerTypenameP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliObjectRegistryObjectCreatedSignalP", UtcDaliObjectRegistryObjectCreatedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryObjectDestroyedSignalP", UtcDaliObjectRegistryObjectDestroyedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryOperatorAssignmentP", UtcDaliObjectRegistryOperatorAssignmentP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
extern int UtcDaliNativeImageCopyConstructorP(void);
extern int UtcDaliNativeImageOperatorAssignmentP(void);
extern int UtcDaliNativeImageCreateGlTextureP(void);
+extern int UtcDaliNativeImageCustomFragmentPrefixP(void);
+extern int UtcDaliNativeImageCustomSamplerTypenameP(void);
extern int UtcDaliObjectRegistryObjectCreatedSignalP(void);
extern int UtcDaliObjectRegistryObjectDestroyedSignalP(void);
extern int UtcDaliObjectRegistryOperatorAssignmentP(void);
{"UtcDaliNativeImageCopyConstructorP", UtcDaliNativeImageCopyConstructorP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageOperatorAssignmentP", UtcDaliNativeImageOperatorAssignmentP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageCreateGlTextureP", UtcDaliNativeImageCreateGlTextureP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomFragmentPrefixP", UtcDaliNativeImageCustomFragmentPrefixP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomSamplerTypenameP", UtcDaliNativeImageCustomSamplerTypenameP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliObjectRegistryObjectCreatedSignalP", UtcDaliObjectRegistryObjectCreatedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryObjectDestroyedSignalP", UtcDaliObjectRegistryObjectDestroyedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryOperatorAssignmentP", UtcDaliObjectRegistryOperatorAssignmentP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
extern int UtcDaliNativeImageCopyConstructorP(void);
extern int UtcDaliNativeImageOperatorAssignmentP(void);
extern int UtcDaliNativeImageCreateGlTextureP(void);
+extern int UtcDaliNativeImageCustomFragmentPrefixP(void);
+extern int UtcDaliNativeImageCustomSamplerTypenameP(void);
extern int UtcDaliObjectRegistryObjectCreatedSignalP(void);
extern int UtcDaliObjectRegistryObjectDestroyedSignalP(void);
extern int UtcDaliObjectRegistryOperatorAssignmentP(void);
{"UtcDaliNativeImageCopyConstructorP", UtcDaliNativeImageCopyConstructorP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageOperatorAssignmentP", UtcDaliNativeImageOperatorAssignmentP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageCreateGlTextureP", UtcDaliNativeImageCreateGlTextureP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomFragmentPrefixP", UtcDaliNativeImageCustomFragmentPrefixP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomSamplerTypenameP", UtcDaliNativeImageCustomSamplerTypenameP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliObjectRegistryObjectCreatedSignalP", UtcDaliObjectRegistryObjectCreatedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryObjectDestroyedSignalP", UtcDaliObjectRegistryObjectDestroyedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryOperatorAssignmentP", UtcDaliObjectRegistryOperatorAssignmentP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
extern int UtcDaliNativeImageCopyConstructorP(void);
extern int UtcDaliNativeImageOperatorAssignmentP(void);
extern int UtcDaliNativeImageCreateGlTextureP(void);
+extern int UtcDaliNativeImageCustomFragmentPrefixP(void);
+extern int UtcDaliNativeImageCustomSamplerTypenameP(void);
extern int UtcDaliObjectRegistryObjectCreatedSignalP(void);
extern int UtcDaliObjectRegistryObjectDestroyedSignalP(void);
extern int UtcDaliObjectRegistryOperatorAssignmentP(void);
{"UtcDaliNativeImageCopyConstructorP", UtcDaliNativeImageCopyConstructorP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageOperatorAssignmentP", UtcDaliNativeImageOperatorAssignmentP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliNativeImageCreateGlTextureP", UtcDaliNativeImageCreateGlTextureP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomFragmentPrefixP", UtcDaliNativeImageCustomFragmentPrefixP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
+ {"UtcDaliNativeImageCustomSamplerTypenameP", UtcDaliNativeImageCustomSamplerTypenameP, utc_Dali_NativeImage_startup, utc_Dali_NativeImage_cleanup},
{"UtcDaliObjectRegistryObjectCreatedSignalP", UtcDaliObjectRegistryObjectCreatedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryObjectDestroyedSignalP", UtcDaliObjectRegistryObjectDestroyedSignalP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
{"UtcDaliObjectRegistryOperatorAssignmentP", UtcDaliObjectRegistryOperatorAssignmentP, utc_Dali_ObjectRegistry_startup, utc_Dali_ObjectRegistry_cleanup},
void ImageViewDownCastN();
void ImageViewSetAndGetImageP();
void ImageViewSetAndGetImageP2();
+void ImageViewSetAndGetImageP3();
void ImageViewSetAndGetPropertyImage();
void ImageViewSetAndGetPropertyResourceUrl();
IMAGE_VIEW_DOWNCAST_N,
IMAGE_VIEW_SET_GET_IMAGE_P,
IMAGE_VIEW_SET_GET_IMAGE_P2,
+ IMAGE_VIEW_SET_GET_IMAGE_P3,
IMAGE_VIEW_SET_GET_PROPERTY_IMAGE,
IMAGE_VIEW_SET_GET_PROPERTY_RESOURCE_URL
};
case IMAGE_VIEW_SET_GET_IMAGE_P2:
ImageViewSetAndGetImageP2();
break;
+ case IMAGE_VIEW_SET_GET_IMAGE_P3:
+ ImageViewSetAndGetImageP3();
+ break;
case IMAGE_VIEW_SET_GET_PROPERTY_IMAGE:
ImageViewSetAndGetPropertyImage();
break;
imageView.SetImage( image1 );
Image image2 = imageView.GetImage();
DALI_CHECK_FAIL( image1.GetWidth() != image2.GetWidth(), "ImageView Set Get Image is failed." );
+
DaliLog::PrintPass();
}
TestUrl( imageView, TEST_IMAGE_FILE_NAME );
}
+void ImageViewSetAndGetImageP3()
+{
+ ImageView imageView = ImageView::New();
+ DALI_CHECK_FAIL(!imageView, "Image handle is empty." );
+
+ imageView.SetImage(TEST_IMAGE_FILE_NAME, ImageDimensions( 34, 34 ) );
+
+ TestUrl( imageView, TEST_IMAGE_FILE_NAME );
+}
+
void ImageViewSetAndGetPropertyImage()
{
ImageView imageView = ImageView::New();
}
/**
+ * @testcase UtcDaliImageViewSetAndGetImageP3
+ * @since_tizen 3.0
+ * @description Set and Get the Image with actor
+ */
+
+int UtcDaliImageViewSetAndGetImageP3(void)
+{
+ DaliLog::PrintExecStarted(SUITE_NAME, __FUNCTION__);
+
+ Application application = Application::New( &gArgc, &gArgv );
+ CHECK_GL;
+ ImageView_TestApp testApp( application, IMAGE_VIEW_SET_GET_IMAGE_P3);
+ application.MainLoop();
+
+ return test_return_value;
+}
+
+/**
* @testcase UtcDaliImageViewSetGetPropertyImage
* @since_tizen 2.4
* @description Checks set and get property Image
extern int UtcDaliImageViewDownCastN(void);
extern int UtcDaliImageViewSetAndGetImageP(void);
extern int UtcDaliImageViewSetAndGetImageP2(void);
+extern int UtcDaliImageViewSetAndGetImageP3(void);
extern int UtcDaliImageViewSetGetPropertyImage(void);
extern int UtcDaliImageViewSetGetPropertyResourceUrl(void);
extern int UtcDaliItemFactoryConstructorP(void);
{"UtcDaliImageViewDownCastN", UtcDaliImageViewDownCastN, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP", UtcDaliImageViewSetAndGetImageP, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP2", UtcDaliImageViewSetAndGetImageP2, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
+ {"UtcDaliImageViewSetAndGetImageP3", UtcDaliImageViewSetAndGetImageP3, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyImage", UtcDaliImageViewSetGetPropertyImage, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyResourceUrl", UtcDaliImageViewSetGetPropertyResourceUrl, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliItemFactoryConstructorP", UtcDaliItemFactoryConstructorP, utc_Dali_ItemFactory_startup, utc_Dali_ItemFactory_cleanup},
extern int UtcDaliImageViewDownCastN(void);
extern int UtcDaliImageViewSetAndGetImageP(void);
extern int UtcDaliImageViewSetAndGetImageP2(void);
+extern int UtcDaliImageViewSetAndGetImageP3(void);
extern int UtcDaliImageViewSetGetPropertyImage(void);
extern int UtcDaliImageViewSetGetPropertyResourceUrl(void);
extern int UtcDaliItemFactoryConstructorP(void);
{"UtcDaliImageViewDownCastN", UtcDaliImageViewDownCastN, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP", UtcDaliImageViewSetAndGetImageP, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP2", UtcDaliImageViewSetAndGetImageP2, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
+ {"UtcDaliImageViewSetAndGetImageP3", UtcDaliImageViewSetAndGetImageP3, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyImage", UtcDaliImageViewSetGetPropertyImage, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyResourceUrl", UtcDaliImageViewSetGetPropertyResourceUrl, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliItemFactoryConstructorP", UtcDaliItemFactoryConstructorP, utc_Dali_ItemFactory_startup, utc_Dali_ItemFactory_cleanup},
extern int UtcDaliImageViewDownCastN(void);
extern int UtcDaliImageViewSetAndGetImageP(void);
extern int UtcDaliImageViewSetAndGetImageP2(void);
+extern int UtcDaliImageViewSetAndGetImageP3(void);
extern int UtcDaliImageViewSetGetPropertyImage(void);
extern int UtcDaliImageViewSetGetPropertyResourceUrl(void);
extern int UtcDaliItemFactoryConstructorP(void);
{"UtcDaliImageViewDownCastN", UtcDaliImageViewDownCastN, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP", UtcDaliImageViewSetAndGetImageP, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP2", UtcDaliImageViewSetAndGetImageP2, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
+ {"UtcDaliImageViewSetAndGetImageP3", UtcDaliImageViewSetAndGetImageP3, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyImage", UtcDaliImageViewSetGetPropertyImage, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyResourceUrl", UtcDaliImageViewSetGetPropertyResourceUrl, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliItemFactoryConstructorP", UtcDaliItemFactoryConstructorP, utc_Dali_ItemFactory_startup, utc_Dali_ItemFactory_cleanup},
extern int UtcDaliImageViewDownCastN(void);
extern int UtcDaliImageViewSetAndGetImageP(void);
extern int UtcDaliImageViewSetAndGetImageP2(void);
+extern int UtcDaliImageViewSetAndGetImageP3(void);
extern int UtcDaliImageViewSetGetPropertyImage(void);
extern int UtcDaliImageViewSetGetPropertyResourceUrl(void);
extern int UtcDaliItemFactoryConstructorP(void);
{"UtcDaliImageViewDownCastN", UtcDaliImageViewDownCastN, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP", UtcDaliImageViewSetAndGetImageP, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetAndGetImageP2", UtcDaliImageViewSetAndGetImageP2, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
+ {"UtcDaliImageViewSetAndGetImageP3", UtcDaliImageViewSetAndGetImageP3, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyImage", UtcDaliImageViewSetGetPropertyImage, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliImageViewSetGetPropertyResourceUrl", UtcDaliImageViewSetGetPropertyResourceUrl, utc_Dali_ImageView_startup, utc_Dali_ImageView_cleanup},
{"UtcDaliItemFactoryConstructorP", UtcDaliItemFactoryConstructorP, utc_Dali_ItemFactory_startup, utc_Dali_ItemFactory_cleanup},