static int gTestSortFunctionCalled;
-static float TestSortFunction(const Vector3& /*position*/, float /*sortModifier*/)
+static float TestSortFunction(const Vector3& /*position*/)
{
++gTestSortFunctionCalled;
return 0.0f;
Layer actor = Layer::New();
- std::vector<Property::Index> indices ;
+ std::vector<Property::Index> indices;
indices.push_back(Layer::Property::CLIPPING_ENABLE);
indices.push_back(Layer::Property::CLIPPING_BOX);
+ indices.push_back(Layer::Property::BEHAVIOR);
DALI_TEST_CHECK(actor.GetPropertyCount() == ( Actor::New().GetPropertyCount() + indices.size() ) );
actor.SetProperty(Layer::Property::CLIPPING_BOX, Property::Value(Rect<int>(testBox)));
- DALI_TEST_CHECK(Property::RECTANGLE == actor.GetPropertyType(Layer::Property::CLIPPING_BOX)) ;
+ DALI_TEST_CHECK(Property::RECTANGLE == actor.GetPropertyType(Layer::Property::CLIPPING_BOX));
Property::Value v = actor.GetProperty(Layer::Property::CLIPPING_BOX);
DALI_TEST_CHECK( actor.GetClippingBox() == testBox );
+
+ Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
+ DALI_TEST_CHECK( std::strcmp( behavior.Get<std::string>().c_str(), "LAYER_2D") );
+
END_TEST;
}
tet_infoline("Testing Dali::Layer::SetDepthTestDisabled() ");
Layer actor = Layer::New();
+ DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
+ actor.SetBehavior( Layer::LAYER_3D );
DALI_TEST_CHECK( !actor.IsDepthTestDisabled() );
actor.SetDepthTestDisabled( true );
Property::IndexContainer indices;
layer.GetPropertyIndices( indices );
- DALI_TEST_CHECK( indices.size() > basicActor.GetPropertyCount() );
- DALI_TEST_EQUALS( indices.size(), layer.GetPropertyCount(), TEST_LOCATION );
+ DALI_TEST_CHECK( indices.Size() > basicActor.GetPropertyCount() );
+ DALI_TEST_EQUALS( indices.Size(), layer.GetPropertyCount(), TEST_LOCATION );
END_TEST;
}
DALI_TEST_EQUALS( testBox.height, glScissorParams.height, TEST_LOCATION );
END_TEST;
}
+
+int UtcDaliLayerBehaviour(void)
+{
+ TestApplication application;
+ Layer layer = Layer::New();
+
+ DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_2D, TEST_LOCATION );
+ layer.SetBehavior( Dali::Layer::LAYER_3D );
+ DALI_TEST_EQUALS( layer.GetBehavior(), Dali::Layer::LAYER_3D, TEST_LOCATION );
+ END_TEST;
+}