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-TableView.cpp;h=3a8ce2038b3b6875d3057e9b6d0fe77b85abeae7;hp=708fa3cb5123d06c6d3c22ea4a46bf54c17b66c3;hb=5e351965bad7e1de2e94027548b022bac692603c;hpb=4bf366c7c657eacb5cf150fa52e34263ca16218f diff --git a/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp b/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp index 708fa3c..3a8ce20 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-TableView.cpp @@ -188,6 +188,23 @@ int UtcDaliTableViewMetricsFit(void) DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION ); DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION ); DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION ); + + tableView.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::RIGHT_TO_LEFT ); + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(90.0f, 0.0f, 0.0f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(80.0f, 0.0f, 0.0f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(90.0f, 10.0f, 0.0f), TEST_LOCATION ); + + tableView.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, Dali::LayoutDirection::LEFT_TO_RIGHT ); + application.SendNotification(); + application.Render(); + + DALI_TEST_EQUALS( actor1.GetCurrentPosition(), Vector3(0.0f, 0.0f, 0.0f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor2.GetCurrentPosition(), Vector3(10.0f, 0.0f, 0.0f), TEST_LOCATION ); + DALI_TEST_EQUALS( actor3.GetCurrentPosition(), Vector3(0.0f, 10.0f, 0.0f), TEST_LOCATION ); + END_TEST; } @@ -686,10 +703,10 @@ int UtcDaliTableViewSetGetProperty(void) END_TEST; } -int UtcDaliTableViewCustomProperties(void) +int UtcDaliTableViewChildProperties(void) { ToolkitTestApplication application; - tet_infoline("UtcDaliTableViewCustomProperties"); + tet_infoline("UtcDaliTableViewChildProperties"); // Create a 10x10 table-view TableView tableView = TableView::New(10,10); @@ -700,7 +717,7 @@ int UtcDaliTableViewCustomProperties(void) // Create a child actor with the custom properties Actor child1 = Actor::New(); - child1.RegisterProperty( "cellIndex", Vector2( 3, 4 ), Property::READ_WRITE ); + child1.SetProperty( TableView::ChildProperty::CELL_INDEX, Vector2( 3, 4 ) ); tableView.Add( child1 ); // Check for actors at actual positions. DALI_TEST_CHECK( tableView.GetChildAt(TableView::CellPosition(3,4)) == child1); @@ -709,9 +726,9 @@ int UtcDaliTableViewCustomProperties(void) Actor child2 = Actor::New(); float rowSpan = 3.f; float columnSpan = 2.f; - child2.RegisterProperty( "cellIndex", Vector2( 6, 1 ), Property::READ_WRITE ); - child2.RegisterProperty( "rowSpan", rowSpan, Property::READ_WRITE ); - child2.RegisterProperty( "columnSpan", columnSpan, Property::READ_WRITE ); + child2.SetProperty( TableView::ChildProperty::CELL_INDEX, Vector2( 6, 1 ) ); + child2.SetProperty( TableView::ChildProperty::ROW_SPAN, rowSpan ); + child2.SetProperty( TableView::ChildProperty::COLUMN_SPAN, columnSpan ); tableView.Add( child2 ); // Check for actors at actual positions. for( int i=0; i