Fixed false utc Layer test case which would always pass.
This seems better in js code:
before: layer.behavior = "Dali::Layer::LAYER_3D";
after: layer.behavior = "LAYER_3D";
Change-Id: I84109f55d32f6cdb00f10f763439bc6420235678
Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
- DALI_TEST_CHECK( std::strcmp( behavior.Get<std::string>().c_str(), "LAYER_2D") );
+ DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_2D", TEST_LOCATION );
END_TEST;
}
DALI_TEST_CHECK( actor.IsDepthTestDisabled() );
actor.SetBehavior( Layer::LAYER_3D );
+
+ Property::Value behavior = actor.GetProperty(Layer::Property::BEHAVIOR);
+ DALI_TEST_EQUALS(behavior.Get<std::string>().c_str(), "LAYER_3D", TEST_LOCATION );
DALI_TEST_CHECK( !actor.IsDepthTestDisabled() );
actor.SetDepthTestDisabled( true );
namespace
{
-typedef Dali::Layer::Behavior Behavior;
+
+typedef Layer::Behavior Behavior;
DALI_ENUM_TO_STRING_TABLE_BEGIN( Behavior )
-DALI_ENUM_TO_STRING( Dali::Layer::LAYER_2D )
-DALI_ENUM_TO_STRING( Dali::Layer::LAYER_3D )
+DALI_ENUM_TO_STRING_INSIDE_CLASS( Layer, LAYER_2D )
+DALI_ENUM_TO_STRING_INSIDE_CLASS( Layer, LAYER_3D )
DALI_ENUM_TO_STRING_TABLE_END( Behavior )
+
} // namespace
namespace Internal
#define DALI_ENUM_TO_STRING_TABLE_END( t ) }; const unsigned int t##TableCount = sizeof( t##Table ) / sizeof( t##Table[0] );
#define DALI_ENUM_TO_STRING( s ) { #s, s },
+/**
+ * DALI_ENUM_TO_STRING_INSIDE_CLASS
+ * Example converts ( Layer, LAYER_2D) to ( "LAYER_2D", Layer::Layer2D)
+ */
+#define DALI_ENUM_TO_STRING_INSIDE_CLASS( className, enumName) { #enumName, className::enumName },
+
} // namespace Internal