X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-unmanaged%2Futc-Dali-TableView.cpp;h=fe75b1ddad6188b3f171a438806e4f8773e64ebb;hp=a50ffc9169b6d0aa9a16c2cdec904e77b7b4a99a;hb=93fb6a1d3dc8872275bde30ef6a05407a67d694c;hpb=998d982768c7f211d948cfd7921ec27ff739ce49 diff --git a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TableView.cpp b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TableView.cpp index a50ffc9..fe75b1d 100644 --- a/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TableView.cpp +++ b/automated-tests/src/dali-toolkit-unmanaged/utc-Dali-TableView.cpp @@ -595,12 +595,12 @@ int UtcDaliTableViewSetGetProperty(void) //{ "policy": "fixed", "value": 30.0 }, Property::Map item1; - item1.push_back( Property::StringValuePair( "policy", "fixed" ) ); - item1.push_back( Property::StringValuePair( "value", 30.f) ); + item1[ "policy" ] = "fixed"; + item1[ "value" ] = 30.f; //{ "policy": "relative", "value": 0.2 }, Property::Map item2; - item2.push_back( Property::StringValuePair( "policy", "relative" ) ); - item2.push_back( Property::StringValuePair( "value", 0.2f ) ); + item2[ "policy" ] = "relative"; + item2[ "value" ] = 0.2f; // Test "layout-rows" property DALI_TEST_CHECK( tableView.GetPropertyIndex(PROPERTY_NAME_LAYOUT_ROWS) == TableView::PROPERTY_LAYOUT_ROWS ); @@ -613,20 +613,20 @@ int UtcDaliTableViewSetGetProperty(void) * } */ Property::Map layoutRows; - layoutRows.push_back( Property::StringValuePair("1", item1) ); - layoutRows.push_back( Property::StringValuePair("3", item2) ); + layoutRows[ "1" ] = item1; + layoutRows[ "3" ] = item2; tableView.SetProperty( TableView::PROPERTY_LAYOUT_ROWS, layoutRows ); DALI_TEST_EQUALS( tableView.GetFixedHeight( 1u ), 30.f, TEST_LOCATION ); DALI_TEST_EQUALS( tableView.GetRelativeHeight( 3u ), 0.2f, TEST_LOCATION ); Property::Map layoutRowsGet = tableView.GetProperty(TableView::PROPERTY_LAYOUT_ROWS).Get(); - DALI_TEST_CHECK( layoutRowsGet[0].first.compare(layoutRows[0].first) == 0 ); - DALI_TEST_CHECK( layoutRowsGet[0].second.GetValue( "policy" ).Get().compare(layoutRows[0].second.GetValue( "policy" ).Get()) == 0 ); - DALI_TEST_EQUALS( layoutRowsGet[0].second.GetValue( "value" ).Get(),layoutRows[0].second.GetValue( "value" ).Get(), TEST_LOCATION ); - DALI_TEST_CHECK( layoutRowsGet[1].first.compare(layoutRows[1].first) == 0 ); - DALI_TEST_CHECK( layoutRowsGet[1].second.GetValue( "policy" ).Get().compare(layoutRows[1].second.GetValue( "policy" ).Get()) == 0 ); - DALI_TEST_EQUALS( layoutRowsGet[1].second.GetValue( "value" ).Get(),layoutRows[1].second.GetValue( "value" ).Get(), TEST_LOCATION ); + DALI_TEST_CHECK( layoutRowsGet.GetKey(0).compare(layoutRows.GetKey(0)) == 0 ); + DALI_TEST_CHECK( layoutRowsGet.GetValue(0).GetValue( "policy" ).Get().compare(layoutRows.GetValue(0).GetValue( "policy" ).Get()) == 0 ); + DALI_TEST_EQUALS( layoutRowsGet.GetValue(0).GetValue( "value" ).Get(),layoutRows.GetValue(0).GetValue( "value" ).Get(), TEST_LOCATION ); + DALI_TEST_CHECK( layoutRowsGet.GetKey(1).compare(layoutRows.GetKey(1)) == 0 ); + DALI_TEST_CHECK( layoutRowsGet.GetValue(1).GetValue( "policy" ).Get().compare(layoutRows.GetValue(1).GetValue( "policy" ).Get()) == 0 ); + DALI_TEST_EQUALS( layoutRowsGet.GetValue(1).GetValue( "value" ).Get(),layoutRows.GetValue(1).GetValue( "value" ).Get(), TEST_LOCATION ); // Test "layout-columns" property DALI_TEST_CHECK( tableView.GetPropertyIndex( PROPERTY_NAME_LAYOUT_COLUMNS ) == TableView::PROPERTY_LAYOUT_COLUMNS ); @@ -639,20 +639,20 @@ int UtcDaliTableViewSetGetProperty(void) * } */ Property::Map layoutColumns; - layoutColumns.push_back( Property::StringValuePair("2", item2) ); - layoutColumns.push_back( Property::StringValuePair("3", item1) ); + layoutColumns[ "2" ] = item2; + layoutColumns[ "3" ] = item1; tableView.SetProperty( TableView::PROPERTY_LAYOUT_COLUMNS, layoutColumns ); DALI_TEST_EQUALS( tableView.GetRelativeWidth( 2u ), 0.2f, TEST_LOCATION ); DALI_TEST_EQUALS( tableView.GetFixedWidth( 3u ), 30.f, TEST_LOCATION ); Property::Map layoutColumnsGet = tableView.GetProperty(TableView::PROPERTY_LAYOUT_COLUMNS).Get(); - DALI_TEST_CHECK( layoutColumnsGet[0].first.compare(layoutColumns[0].first) == 0 ); - DALI_TEST_CHECK( layoutColumnsGet[0].second.GetValue( "policy" ).Get().compare(layoutColumns[0].second.GetValue( "policy" ).Get()) == 0 ); - DALI_TEST_EQUALS( layoutColumnsGet[0].second.GetValue( "value" ).Get(),layoutColumns[0].second.GetValue( "value" ).Get(), TEST_LOCATION ); - DALI_TEST_CHECK( layoutColumnsGet[1].first.compare(layoutColumns[1].first) == 0 ); - DALI_TEST_CHECK( layoutColumnsGet[1].second.GetValue( "policy" ).Get().compare(layoutColumns[1].second.GetValue( "policy" ).Get()) == 0 ); - DALI_TEST_EQUALS( layoutColumnsGet[1].second.GetValue( "value" ).Get(),layoutColumns[1].second.GetValue( "value" ).Get(), TEST_LOCATION ); + DALI_TEST_CHECK( layoutColumnsGet.GetKey(0).compare(layoutColumns.GetKey(0)) == 0 ); + DALI_TEST_CHECK( layoutColumnsGet.GetValue(0).GetValue( "policy" ).Get().compare(layoutColumns.GetValue(0).GetValue( "policy" ).Get()) == 0 ); + DALI_TEST_EQUALS( layoutColumnsGet.GetValue(0).GetValue( "value" ).Get(),layoutColumns.GetValue(0).GetValue( "value" ).Get(), TEST_LOCATION ); + DALI_TEST_CHECK( layoutColumnsGet.GetKey(1).compare(layoutColumns.GetKey(1)) == 0 ); + DALI_TEST_CHECK( layoutColumnsGet.GetValue(1).GetValue( "policy" ).Get().compare(layoutColumns.GetValue(1).GetValue( "policy" ).Get()) == 0 ); + DALI_TEST_EQUALS( layoutColumnsGet.GetValue(1).GetValue( "value" ).Get(),layoutColumns.GetValue(1).GetValue( "value" ).Get(), TEST_LOCATION ); END_TEST; }