}
static std::string lastActionCustom;
-bool DoActionCustom(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes)
+bool DoActionCustom(BaseObject* object, const std::string& actionName, const Property::Map& /*attributes*/)
{
lastActionCustom = actionName;
return true;
END_TEST;
}
-int UtcDaliTypeRegistryGetTypeNamesP(void)
+int UtcDaliTypeRegistryGetTypeNameCountP(void)
{
TestApplication application;
-
+ TypeRegistry typeRegistry = TypeRegistry::Get();
TypeInfo type;
- TypeRegistry::NameContainer names = TypeRegistry::Get().GetTypeNames();
-
- for(TypeRegistry::NameContainer::iterator iter = names.begin();
- iter != names.end(); ++iter)
+ for(size_t i = 0; i < typeRegistry.GetTypeNameCount(); i++)
{
- type = TypeRegistry::Get().GetTypeInfo( *iter );
+ type = typeRegistry.GetTypeInfo( typeRegistry.GetTypeName(i) );
DALI_TEST_CHECK( type );
}
END_TEST;
}
-int UtcDaliTypeRegistryGetTypeNamesN(void)
+
+int UtcDaliTypeRegistryGetTypeNamesP(void)
{
TestApplication application;
-
+ TypeRegistry typeRegistry = TypeRegistry::Get();
TypeInfo type;
- TypeRegistry::NameContainer names = TypeRegistry::Get().GetTypeNames();
-
- for(TypeRegistry::NameContainer::iterator iter = names.begin();
- iter != names.end(); ++iter)
+ for(size_t i = 0; i < typeRegistry.GetTypeNameCount(); i++)
{
- type = TypeRegistry::Get().GetTypeInfo( *iter );
- DALI_TEST_CHECK( type.GetName() != "MyDummyActor" );
+ type = typeRegistry.GetTypeInfo( typeRegistry.GetTypeName(i) );
+ DALI_TEST_CHECK( type );
}
END_TEST;
}
+
// Note: No negative test case for UtcDaliTypeRegistryTypeRegistration can be implemented.
int UtcDaliTypeRegistryTypeRegistrationNotCallingCreateOnInitP(void)
{
MyTestCustomActor customHandle = MyTestCustomActor::DownCast( handle );
DALI_TEST_CHECK( customHandle );
- TypeInfo::NameContainer names;
- type.GetActions(names);
- TypeInfo::NameContainer baseNames;
- baseType.GetActions(baseNames);
- DALI_TEST_EQUALS( names.size(), TEST_ACTION_COUNT + baseNames.size(), TEST_LOCATION );
-
- names.clear();
- type.GetSignals(names);
-
- baseNames.clear();
- baseType.GetSignals(baseNames);
+ DALI_TEST_EQUALS( type.GetActionCount(), TEST_ACTION_COUNT + baseType.GetActionCount(), TEST_LOCATION );
- DALI_TEST_EQUALS( names.size(), TEST_SIGNAL_COUNT + baseNames.size(), TEST_LOCATION );
+ DALI_TEST_EQUALS( type.GetSignalCount(), TEST_SIGNAL_COUNT + baseType.GetSignalCount(), TEST_LOCATION );
{
TestConnectionTracker tracker;
DALI_TEST_EQUALS( CustomTestFunctor::mTotalInstanceCount, 2/*temporary copy + FunctorDelegate copy*/, TEST_LOCATION );
DALI_TEST_EQUALS( CustomTestFunctor::mCurrentInstanceCount, 0, TEST_LOCATION );
- std::vector<Property::Value> attributes;
+ Property::Map attributes;
handle.DoAction("act1", attributes);
DALI_TEST_CHECK( lastActionCustom == "act1" );
END_TEST;
MyTestCustomActor customHandle = MyTestCustomActor::DownCast( handle );
DALI_TEST_CHECK( customHandle );
- TypeInfo::NameContainer names;
- TypeInfo::NameContainer baseNames;
-
- type.GetActions(names);
- baseType.GetActions(baseNames);
-
- DALI_TEST_EQUALS( names.size(), TEST_ACTION_COUNT + baseNames.size(), TEST_LOCATION );
-
- names.clear();
- baseNames.clear();
-
- type.GetSignals(names);
- baseType.GetSignals(baseNames);
+ DALI_TEST_EQUALS( type.GetActionCount(), TEST_ACTION_COUNT + baseType.GetActionCount(), TEST_LOCATION );
- DALI_TEST_EQUALS( names.size(), TEST_SIGNAL_COUNT + baseNames.size(), TEST_LOCATION );
+ DALI_TEST_EQUALS( type.GetSignalCount(), TEST_SIGNAL_COUNT + baseType.GetSignalCount(), TEST_LOCATION );
{
TestConnectionTracker tracker;
BaseHandle handle = type.CreateInstance();
DALI_TEST_CHECK( handle );
- std::vector<Property::Value> attributes;
+ Property::Map attributes;
DALI_TEST_CHECK( handle.DoAction("act1", attributes) );
DALI_TEST_CHECK( lastActionCustom == "act1" );
BaseHandle handle = type.CreateInstance();
DALI_TEST_CHECK( handle );
- std::vector<Property::Value> attributes;
+ Property::Map attributes;
DALI_TEST_CHECK( !handle.DoAction( "unknown-action", attributes ) );
END_TEST;
// Check property count of type-info is 1
Property::IndexContainer indices;
typeInfo.GetPropertyIndices( indices );
- DALI_TEST_EQUALS( indices.size(), 1u, TEST_LOCATION );
+ DALI_TEST_EQUALS( indices.Size(), 1u, TEST_LOCATION );
// check property name count
- TypeInfo::NameContainer names;
- typeInfo.GetProperties(names);
- DALI_TEST_CHECK( 1 == names.size() );
+ DALI_TEST_CHECK( 1 == typeInfo.GetPropertyCount() );
// Ensure indices returned from actor and customActor differ by two
Actor actor = Actor::New();
actor.GetPropertyIndices( indices );
- unsigned int actorIndices = indices.size();
+ unsigned int actorIndices = indices.Size();
customActor.GetPropertyIndices( indices );
- unsigned int customActorIndices = indices.size();
+ unsigned int customActorIndices = indices.Size();
DALI_TEST_EQUALS( actorIndices + 2u, customActorIndices, TEST_LOCATION ); // Custom property + registered property
END_TEST;
}
// Check property count of type-info is 1
Property::IndexContainer indices;
typeInfo.GetPropertyIndices( indices );
- DALI_TEST_EQUALS( indices.size(), 1u, TEST_LOCATION );
+ DALI_TEST_EQUALS( indices.Size(), 1u, TEST_LOCATION );
// Ensure indices returned from actor and customActor differ by one
Actor actor = Actor::New();
actor.GetPropertyIndices( indices );
- unsigned int actorIndices = indices.size();
+ unsigned int actorIndices = indices.Size();
customActor.GetPropertyIndices( indices );
- unsigned int customActorIndices = indices.size();
+ unsigned int customActorIndices = indices.Size();
DALI_TEST_EQUALS( actorIndices + 1u, customActorIndices, TEST_LOCATION ); // Custom property + registered property
END_TEST;
// Check property count of type-info is 1
Property::IndexContainer indices;
typeInfo.GetPropertyIndices( indices );
- DALI_TEST_EQUALS( indices.size(), 1u, TEST_LOCATION );
+ DALI_TEST_EQUALS( indices.Size(), 1u, TEST_LOCATION );
// Register animatable property components
std::string animatablePropertyComponentName1( "animatable-prop-1-x" );
// Ensure indices returned from actor and customActor differ by three
Actor actor = Actor::New();
actor.GetPropertyIndices( indices );
- unsigned int actorIndices = indices.size();
+ unsigned int actorIndices = indices.Size();
customActor.GetPropertyIndices( indices );
- unsigned int customActorIndices = indices.size();
+ unsigned int customActorIndices = indices.Size();
DALI_TEST_EQUALS( actorIndices + 3u, customActorIndices, TEST_LOCATION ); // Custom property + registered property
END_TEST;
application.Render(0);
DALI_TEST_CHECK(!a.IsVisible());
- std::vector<Property::Value> attributes;
+ Property::Map attributes;
DALI_TEST_CHECK(hdl.DoAction("show", attributes));