Merge "C# CustomView Implementation (C++ wrappers, manual bindings, C# wrappers)...
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / utc-Dali-ItemLayout.cpp
index 4ee76fb..aa51150 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -72,7 +72,7 @@ public: // From ItemFactory
    */
   virtual Actor NewItem(unsigned int itemId)
   {
-    // Create an image actor for this item
+    // Create a renderable actor for this item
     Image image = ResourceImage::New( TEST_IMAGE_FILE_NAME );
     Actor actor = CreateRenderableActor(image);
 
@@ -291,6 +291,9 @@ int UtcDaliItemLayoutSetAndGetOrientation(void)
 
   DALI_TEST_CHECK(flickSpeedFactor != 0.0f);
 
+  // White box test here: -( itemId / NoOfItemsPerRow(default 4) ) * NoOfItemsPerRow
+  DALI_TEST_EQUALS( -1.0f, gridLayout->GetItemScrollToPosition( 1 ), TEST_LOCATION );
+
   ItemLayoutPtr depthLayout = DefaultItemLayout::New( DefaultItemLayout::DEPTH );
   view.AddLayout(*depthLayout);