2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <dali-toolkit-test-suite-utils.h>
21 #include <dali-toolkit/dali-toolkit.h>
22 #include <dali-toolkit/devel-api/shader-effects/soft-button-effect.h>
25 using namespace Dali::Toolkit;
27 void soft_button_effect_startup(void)
29 test_return_value = TET_UNDEF;
32 void soft_button_effect_cleanup(void)
34 test_return_value = TET_PASS;
37 // Negative test case for a method
38 int UtcDaliSoftButtonEffectUninitialized(void)
40 ToolkitTestApplication application;
41 tet_infoline("UtcDaliSoftButtonEffectUninitialized");
43 Toolkit::SoftButtonEffect effect;
45 // New() must be called to create a SoftButtonEffect or it wont be valid.
47 DALI_TEST_CHECK(!effect);
51 // Positive test case for a method
52 int UtcDaliSoftButtonEffectNew(void)
54 ToolkitTestApplication application;
55 tet_infoline("UtcDaliGaussianBlurViewNew");
57 Toolkit::SoftButtonEffect effect = Toolkit::SoftButtonEffect::New(Toolkit::SoftButtonEffect::ELLIPTICAL);
58 DALI_TEST_CHECK( effect );
62 // Positive test case for a method
63 int UtcDaliSoftButtonEffectPropertyNames(void)
65 ToolkitTestApplication application;
66 tet_infoline("UtcDaliSoftButtonEffectPropertyNames");
68 Toolkit::SoftButtonEffect effect = Toolkit::SoftButtonEffect::New(Toolkit::SoftButtonEffect::ELLIPTICAL);
69 DALI_TEST_CHECK( effect );
71 // Check the names, this names are used in the shader code,
72 // if they change in the shader code, then it has to be updated here.
73 DALI_TEST_EQUALS( effect.GetLightingIndentationAmountPropertyName(), "uLightingIndentationAmount", TEST_LOCATION );
74 DALI_TEST_EQUALS( effect.GetTextureDistortionAmountPropertyName(), "uTextureDistortAmount", TEST_LOCATION );
75 DALI_TEST_EQUALS( effect.GetAmbientLightAmountPropertyName(), "uAmbientLight", TEST_LOCATION );
76 DALI_TEST_EQUALS( effect.GetDiffuseLightPropertyName(), "uDiffuseLight", TEST_LOCATION );
77 DALI_TEST_EQUALS( effect.GetLightingMultiplierPropertyName(), "uLightMultiplier", TEST_LOCATION );
78 DALI_TEST_EQUALS( effect.GetInsideShapeSizeScalePropertyName(), "uInsideCircleSizeScale", TEST_LOCATION );
79 DALI_TEST_EQUALS( effect.GetOutsideShapeDepthPropertyName(), "uOutsideCircleDepth", TEST_LOCATION );
80 DALI_TEST_EQUALS( effect.GetEffectPixelAreaPropertyName(), "uEffectRegion", TEST_LOCATION );
81 DALI_TEST_EQUALS( effect.GetRectangleSizeScalePropertyName(), "uRectangleSizeScale", TEST_LOCATION );