(Control Renderers) Change renderer type values to uppercase
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ControlRenderer.cpp
index fdb576e..80608a1 100644 (file)
@@ -52,7 +52,7 @@ int UtcDaliControlRendererCopyAndAssignment(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -85,7 +85,7 @@ int UtcDaliControlRendererSetGetDepthIndex(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -119,7 +119,7 @@ int UtcDaliControlRendererSize(void)
 
   // color renderer
   Dali::Property::Map map;
-  map[ "rendererType" ] = "color";
+  map[ "rendererType" ] = "COLOR";
   map[ "mixColor" ] = Color::MAGENTA;
   ControlRenderer colorRenderer = factory.CreateControlRenderer( map );
   colorRenderer.SetSize( rendererSize );
@@ -149,7 +149,7 @@ int UtcDaliControlRendererSize(void)
   // border renderer
   float borderSize = 5.f;
   map.Clear();
-  map[ "rendererType" ] = "border";
+  map[ "rendererType" ] = "BORDER";
   map[ "borderColor"  ] = Color::RED;
   map[ "borderSize"   ] = borderSize;
   ControlRenderer borderRenderer = factory.CreateControlRenderer( map );
@@ -160,7 +160,7 @@ int UtcDaliControlRendererSize(void)
 
   // gradient renderer
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
   propertyMap.Insert("startPosition",   start);
@@ -196,7 +196,7 @@ int UtcDaliControlRendererSetOnOffStage(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer controlRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -269,7 +269,7 @@ int UtcDaliControlRendererGetPropertyMap1(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "color");
+  propertyMap.Insert("rendererType",  "COLOR");
   propertyMap.Insert("mixColor",  Color::BLUE);
   ControlRenderer colorRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -278,7 +278,7 @@ int UtcDaliControlRendererGetPropertyMap1(void)
 
   Property::Value* typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "color" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "COLOR" );
 
   Property::Value* colorValue = resultMap.Find( "mixColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
@@ -305,7 +305,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "border");
+  propertyMap.Insert("rendererType",  "BORDER");
   propertyMap.Insert("borderColor",  Color::BLUE);
   propertyMap.Insert("borderSize",  5.f);
   ControlRenderer borderRenderer = factory.CreateControlRenderer( propertyMap );
@@ -316,7 +316,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
   // check the property values from the returned map from control renderer
   Property::Value* typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "BORDER" );
 
   Property::Value* colorValue = resultMap.Find( "borderColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
@@ -327,7 +327,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
   DALI_TEST_CHECK( sizeValue->Get<float>() == 5.f );
 
   Property::Map propertyMap1;
-  propertyMap1[ "rendererType" ] = "border";
+  propertyMap1[ "rendererType" ] = "BORDER";
   propertyMap1[ "borderColor"  ] = Color::CYAN;
   propertyMap1[ "borderSize"   ] = 10.0f;
   borderRenderer = factory.CreateControlRenderer( propertyMap1 );
@@ -335,7 +335,7 @@ int UtcDaliControlRendererGetPropertyMap2(void)
 
   typeValue = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( typeValue );
-  DALI_TEST_CHECK( typeValue->Get<std::string>() == "border" );
+  DALI_TEST_CHECK( typeValue->Get<std::string>() == "BORDER" );
 
   colorValue = resultMap.Find( "borderColor",  Property::VECTOR4 );
   DALI_TEST_CHECK( colorValue );
@@ -357,7 +357,7 @@ int UtcDaliControlRendererGetPropertyMap3(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
 
   Vector2 start(-1.f, -1.f);
   Vector2 end(1.f, 1.f);
@@ -380,7 +380,7 @@ int UtcDaliControlRendererGetPropertyMap3(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "GRADIENT" );
 
   value = resultMap.Find( "units",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -424,7 +424,7 @@ int UtcDaliControlRendererGetPropertyMap4(void)
   DALI_TEST_CHECK( factory );
 
   Property::Map propertyMap;
-  propertyMap.Insert("rendererType",  "gradient");
+  propertyMap.Insert("rendererType",  "GRADIENT");
 
   Vector2 center(100.f, 100.f);
   float radius = 100.f;
@@ -448,7 +448,7 @@ int UtcDaliControlRendererGetPropertyMap4(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "gradient" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "GRADIENT" );
 
   value = resultMap.Find( "units",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -493,7 +493,7 @@ int UtcDaliControlRendererGetPropertyMap5(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_IMAGE_FILE_NAME );
   propertyMap.Insert( "desiredWidth",   20 );
   propertyMap.Insert( "desiredHeight",   30 );
@@ -510,7 +510,7 @@ int UtcDaliControlRendererGetPropertyMap5(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -543,7 +543,7 @@ int UtcDaliControlRendererGetPropertyMap5(void)
 
   value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -579,7 +579,7 @@ int UtcDaliControlRendererGetPropertyMap6(void)
 
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_NPATCH_FILE_NAME );
   propertyMap.Insert( "borderOnly",  true );
   ControlRenderer nPatchRenderer = factory.CreateControlRenderer( propertyMap );
@@ -590,7 +590,7 @@ int UtcDaliControlRendererGetPropertyMap6(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -611,7 +611,7 @@ int UtcDaliControlRendererGetPropertyMap7(void)
   // request SvgRenderer with a property map
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType",  "image" );
+  propertyMap.Insert( "rendererType",  "IMAGE" );
   propertyMap.Insert( "url",  TEST_SVG_FILE_NAME );
   ControlRenderer svgRenderer = factory.CreateControlRenderer( propertyMap );
 
@@ -620,7 +620,7 @@ int UtcDaliControlRendererGetPropertyMap7(void)
   // check the property values from the returned map from control renderer
   Property::Value* value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -633,7 +633,7 @@ int UtcDaliControlRendererGetPropertyMap7(void)
   // check the property values from the returned map from control renderer
   value = resultMap.Find( "rendererType",  Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "image" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "IMAGE" );
 
   value = resultMap.Find( "url",  Property::STRING );
   DALI_TEST_CHECK( value );
@@ -651,7 +651,7 @@ int UtcDaliControlRendererGetPropertyMap8(void)
   //Request MeshRenderer using a property map.
   RendererFactory factory = RendererFactory::Get();
   Property::Map propertyMap;
-  propertyMap.Insert( "rendererType", "mesh" );
+  propertyMap.Insert( "rendererType", "MESH" );
   propertyMap.Insert( "objectUrl", TEST_OBJ_FILE_NAME );
   propertyMap.Insert( "materialUrl", TEST_MTL_FILE_NAME );
   propertyMap.Insert( "texturesPath", TEST_RESOURCE_LOCATION );
@@ -664,7 +664,7 @@ int UtcDaliControlRendererGetPropertyMap8(void)
   //Check values in the result map are identical to the initial map's values.
   Property::Value* value = resultMap.Find( "rendererType", Property::STRING );
   DALI_TEST_CHECK( value );
-  DALI_TEST_CHECK( value->Get<std::string>() == "mesh" );
+  DALI_TEST_CHECK( value->Get<std::string>() == "MESH" );
 
   value = resultMap.Find( "objectUrl", Property::STRING );
   DALI_TEST_CHECK( value );