X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-internal%2Futc-Dali-Control-internal.cpp;h=c7e8c399dfafe501122cb0099845fd410a18d668;hp=09e28739b6aaa57adec33b8c9b87db216292d4be;hb=fd55ca84ccaf0d809359e09af55034ec58188b9d;hpb=eb3fbe24a0d2d2b65673e6bc29f3021bb8648387 diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp index 09e2873..c7e8c39 100644 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Control-internal.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. @@ -25,6 +25,8 @@ #include #include <../dali-toolkit/dali-toolkit-test-utils/dummy-control.h> #include +#include + using namespace Dali; using namespace Toolkit; @@ -67,3 +69,25 @@ int UtcDaliControlActionOnVisual(void) END_TEST; } + +int UtcDaliControlDebugHierarchy(void) +{ + ToolkitTestApplication application; + tet_infoline( "Create a control hierarchy, and test that the debug produces output" ); + + auto tableView = Toolkit::TableView::New(1, 2); + tableView.AddChild( ImageView::New( TEST_RESOURCE_DIR "/gallery-small-1.jpg" ), TableView::CellPosition( 1, 1 ) ); + tableView.AddChild( TextLabel::New("Stuff"), TableView::CellPosition( 1, 2 ) ); + + Stage::GetCurrent().Add( tableView ); + + Property::Value v(Matrix3::IDENTITY); + tableView.RegisterProperty( "SomeMatrix3", v); + + std::ostringstream oss; + Dali::Toolkit::Internal::DumpControlHierarchy( oss, Stage::GetCurrent().GetRootLayer() ); + DALI_TEST_CHECK( oss.str().length() != 0 ); + tet_printf("Control hierarchy: \n%s\n", oss.str().c_str() ); + + END_TEST; +}