X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Futc-Dali-ShaderEffects.cpp;h=336efb5dba2c25c8ad7ac9b9bfafacdd219fa747;hp=01926d461fa3a180590951e34eb5e2d77ff66954;hb=3fe7030fe503879c909bf28c4a953fd19fee2a3b;hpb=11ed6421771d05113ae1a6510167d8c2557ac20e diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp index 01926d4..336efb5 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ShaderEffects.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,29 +21,11 @@ #include #include -#include -#include -#include -#include -#include #include -#include #include #include -#include -#include -#include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include using namespace Dali; using namespace Dali::Toolkit; @@ -55,7 +37,7 @@ int UtcDaliCreateAlphaDiscardEffect(void) Property::Map effect = Toolkit::CreateAlphaDiscardEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -83,71 +65,6 @@ int UtcDaliCreateAlphaDiscardEffect(void) END_TEST; } -int UtcDaliCreateBendyEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateBendyEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateBlindEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateBlindEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateBouncingEffect(void) -{ - ToolkitTestApplication application; - - Vector4 color(1.0f,1.0f,1.0f,1.0f); - - ShaderEffect effect = Toolkit::CreateBouncingEffect(color); - DALI_TEST_CHECK( effect ); - - Property::Value value = effect.GetProperty( effect.GetPropertyIndex("uAssignedColor")); - DALI_TEST_EQUALS( value.Get(), color, TEST_LOCATION ); - - END_TEST; -} - -int UtcDaliCreateCarouselEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateCarouselEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateDisplacementEffectDisplaced(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateDisplacementEffect(Toolkit::DISPLACEMENT_EFFECT_DISPLACED); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateDisplacementEffectFixed(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateDisplacementEffect(Toolkit::DISPLACEMENT_EFFECT_FIXED); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - int UtcDaliCreateDissolveEffect( bool highPrecision ) { ToolkitTestApplication application; @@ -155,7 +72,7 @@ int UtcDaliCreateDissolveEffect( bool highPrecision ) Property::Map effect = Toolkit::CreateDissolveEffect( highPrecision ); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -213,16 +130,6 @@ int UtcDaliCreateDissolveEffectMediumPrecision(void) return UtcDaliCreateDissolveEffect(false); } -int UtcDaliCreateDissolveLocalEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateDissolveLocalEffect(0); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - int UtcDaliCreateDissolveEffect(void) { ToolkitTestApplication application; @@ -230,7 +137,7 @@ int UtcDaliCreateDissolveEffect(void) Property::Map effect = Toolkit::CreateDistanceFieldEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -266,7 +173,7 @@ int UtcDaliCreateImageRegionEffect(void) Property::Map effect = Toolkit::CreateImageRegionEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -294,38 +201,6 @@ int UtcDaliCreateImageRegionEffect(void) END_TEST; } -int UtcDaliCreateIrisEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateIrisEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateMaskEffect(void) -{ - ToolkitTestApplication application; - - BufferImage image = CreateBufferImage(); - ShaderEffect effect = Toolkit::CreateMaskEffect(image); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateMirrorEffect(void) -{ - ToolkitTestApplication application; - - BufferImage image = CreateBufferImage(); - ShaderEffect effect = Toolkit::CreateMirrorEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - int UtcDaliCreateMotionBlurEffect(void) { ToolkitTestApplication application; @@ -333,7 +208,7 @@ int UtcDaliCreateMotionBlurEffect(void) Property::Map effect = Toolkit::CreateMotionBlurEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -396,7 +271,7 @@ int UtcDaliCreateMotionStretchEffect(void) Property::Map effect = Toolkit::CreateMotionStretchEffect(); DALI_TEST_CHECK( !effect.Empty() ); - Property::Value* customShaderValue = effect.Find( Visual::Property::SHADER ); + Property::Value* customShaderValue = effect.Find( Toolkit::Visual::Property::SHADER ); DALI_TEST_CHECK( customShaderValue ); Property::Map customShader; @@ -448,134 +323,3 @@ int UtcDaliCreateMotionStretchEffect(void) END_TEST; } - -int UtcDaliCreateOverlayEffect(void) -{ - ToolkitTestApplication application; - - BufferImage image = CreateBufferImage(); - ShaderEffect effect = Toolkit::CreateOverlayEffect(image); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateQuadraticBezier(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateQuadraticBezier(3,false); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateQuadraticBezierFilled(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateQuadraticBezier(3,true); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateRipple2DEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateRipple2DEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateRippleEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateRippleEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateShearEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateShearEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliSoftButtonEffectElliptical(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateSoftButtonEffect(Toolkit::SOFT_BUTTON_ELLIPTICAL); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliSoftButtonEffectRectangular(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateSoftButtonEffect(Toolkit::SOFT_BUTTON_RECTANGULAR); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliSoftButtonEffectFixed(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateSoftButtonEffect(Toolkit::SOFT_BUTTON_FIXED); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateSpotEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateSpotEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliCreateSquareDissolveEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateSquareDissolveEffect(); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliSwirlEffect(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateSwirlEffect(false); - DALI_TEST_CHECK( effect ); - - END_TEST; -} - -int UtcDaliSwirlEffectWrap(void) -{ - ToolkitTestApplication application; - - ShaderEffect effect = Toolkit::CreateSwirlEffect(true); - DALI_TEST_CHECK( effect ); - - END_TEST; -}