X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali%2Futc-Dali-Path.cpp;h=be13ee8216a3186bd01798d588a38232518b28c6;hb=refs%2Fchanges%2F75%2F192675%2F22;hp=c3be5fbc2cc4ce083197834775f609678c4630e7;hpb=8426283fe1942a440b1b4907141accf8eb3c6305;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/automated-tests/src/dali/utc-Dali-Path.cpp b/automated-tests/src/dali/utc-Dali-Path.cpp index c3be5fb..be13ee8 100644 --- a/automated-tests/src/dali/utc-Dali-Path.cpp +++ b/automated-tests/src/dali/utc-Dali-Path.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -472,3 +472,32 @@ int UtcDaliPathPropertyControlPoints(void) END_TEST; } + +int UtcDaliPathRegisterProperty(void) +{ + TestApplication application; + + Dali::Path path = Dali::Path::New(); + + Property::Index index = path.RegisterProperty( "sceneProperty", 0.f ); + DALI_TEST_EQUALS( index, (Property::Index)PROPERTY_CUSTOM_START_INDEX, TEST_LOCATION ); + DALI_TEST_EQUALS( path.GetProperty< float >( index ), 0.f, TEST_LOCATION ); + + path.SetProperty( index, -1 ); + DALI_TEST_EQUALS( path.GetProperty< float >( index ), -1.f, TEST_LOCATION ); + + using Dali::Animation; + Animation animation = Animation::New( 1.0f ); + animation.AnimateTo( Property( path, index ), 100.f ); + + DALI_TEST_EQUALS( path.GetProperty< float >( index ), -1.f, TEST_LOCATION ); + // Start the animation + animation.Play(); + + application.SendNotification(); + application.Render( 1000 /* 100% progress */); + DALI_TEST_EQUALS( path.GetProperty< float >( index ), 100.0f, TEST_LOCATION ); + + END_TEST; +} +