+int UtcDaliTableViewMetricsFit(void)
+{
+ ToolkitTestApplication application;
+
+ tet_infoline("UtcDaliTableViewMetricsFit");
+
+ TableView tableView;
+ Actor actor1;
+ Actor actor2;
+ Actor actor3;
+
+ SetupTableViewAndActors(tableView, actor1, actor2, actor3);
+ application.SendNotification();
+ application.Render();
+
+ // 1. check that with no fixed width/heights, actors are in default position.
+ 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 );
+
+ // 2. check that with a fixed width & height, actors to the right and below are offsetted.
+ tableView.SetFitHeight(0);
+ tableView.SetFitWidth(0);
+ DALI_TEST_EQUALS( tableView.IsFitHeight(0), true, TEST_LOCATION );
+ DALI_TEST_EQUALS( tableView.IsFitWidth(0), true, TEST_LOCATION );
+
+ 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;
+}
+
+// Test adjusting the metric values for the cell.