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-Builder.cpp;h=511d2ef7495d470b44187cde2458ff2e425bc999;hp=aa37715ebc892f7d234aab34e42472ae2a222793;hb=5e351965bad7e1de2e94027548b022bac692603c;hpb=53faacaf9bc394044776677e5a4d9f14dd35e05a diff --git a/automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp b/automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp index aa37715..511d2ef 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-Builder.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-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. @@ -75,14 +75,6 @@ Dali::PropertyRegistration propertyNone( typeRegistration, "noneProperty", namespace { -std::string ReplaceQuotes(const std::string &in_s) -{ - std::string s(in_s); - // wrong as no embedded quote but had regex link problems - std::replace(s.begin(), s.end(), '\'', '"'); - return s; -} - struct BuilderFunctor { BuilderFunctor( bool& called ) : mCalled( called ) @@ -284,7 +276,7 @@ int UtcDaliBuilderAnimationP(void) " \"name\": \"greeting\"," " \"type\": \"TextLabel\"," " \"text\": \"Touch me\"," - " \"styles\": [\"basicText\"]," + " \"inherit\": [\"basicText\"]," " \"position\": [0, -120, 0]," " \"size\": [200, 200, 1]," " \"orientation\": [0, 0, 30]," @@ -408,7 +400,7 @@ int UtcDaliBuilderAnimationN(void) " \"name\": \"greeting\"," " \"type\": \"TextLabel\"," " \"text\": \"Touch me\"," - " \"styles\": [\"basicText\"]," + " \"inherit\": [\"basicText\"]," " \"position\": [0, -120, 0]," " \"size\": [200, 200, 1]," " \"orientation\": [0, 0, 30]," @@ -1735,7 +1727,8 @@ int UtcDaliBuilderTypeCasts(void) "\"sensitive\": { \"typeCast\":\"boolean\", \"value\":false }," "\"orientation\": { \"typeCast\":\"rotation\", \"value\":[10,10,10,10] }," "\"colorMode\": { \"typeCast\":\"string\", \"value\":\"USE_OWN_MULTIPLY_PARENT_COLOR\" }," - "\"clippingBox\": { \"typeCast\":\"rect\", \"value\":[10,10,10,10] }" + "\"clippingBox\": { \"typeCast\":\"rect\", \"value\":[10,10,10,10] }," + "\"padding\": { \"typeCast\":\"extents\", \"value\":[10,10,10,10] }" "}]" "}" ); @@ -1828,3 +1821,33 @@ int UtcDaliBuilderActionsWithParams(void) END_TEST; } + +int UtcDaliBuilderConfigurationP(void) +{ + ToolkitTestApplication application; + + // JSON with a quit event when the actor is touched + std::string json( + "{\n" + " \"config\":\n" + " {\n" + " \"alwaysShowFocus\":true\n" + " }\n" + "}\n" + ); + + Builder builder = Builder::New(); + builder.LoadFromString( json ); + + Property::Map map = builder.GetConfigurations(); + + Dali::Property::Value* pValue = map.Find( "alwaysShowFocus" ); + + DALI_TEST_CHECK( pValue ); + + bool value = pValue->Get(); + + DALI_TEST_CHECK( value ); + + END_TEST; +}