/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
#include <dali-test-suite-utils.h>
#include <dali/integration-api/events/hover-event-integ.h>
#include <dali/integration-api/events/touch-event-integ.h>
+#include <dali/internal/common/const-string.h>
#include <dali/internal/event/common/type-info-impl.h>
#include <dali/public-api/dali-core.h>
#include <stdlib.h>
unsigned int customActorIndices = indices.Size();
DALI_TEST_EQUALS(actorIndices + 3u, customActorIndices, TEST_LOCATION); // Custom property + registered property
+ application.GetScene().Add(customActor);
+
// Attempt to animate component property, it should not crash
Animation animation = Animation::New(1.0f);
animation.AnimateTo(Property(customActor, animatablePropertyComponentIndex1), 200.0f);
BaseHandle handle = typeInfo.CreateInstance();
DALI_TEST_CHECK(handle);
Actor customActor = Actor::DownCast(handle);
+ application.GetScene().Add(customActor);
DALI_TEST_CHECK(customActor);
const unsigned int index = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX;
BaseHandle handle = typeInfo.CreateInstance();
DALI_TEST_CHECK(handle);
Actor customActor = Actor::DownCast(handle);
+ application.GetScene().Add(customActor);
DALI_TEST_CHECK(customActor);
const unsigned int index = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX;
BaseHandle handle = typeInfo.CreateInstance();
DALI_TEST_CHECK(handle);
Actor customActor = Actor::DownCast(handle);
+ application.GetScene().Add(customActor);
DALI_TEST_CHECK(customActor);
const unsigned int index = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX;
// check the child property type
Internal::TypeInfo& typeInfoImpl = GetImplementation(typeInfo);
- Property::Type type = typeInfoImpl.GetChildPropertyType(typeInfoImpl.GetChildPropertyIndex("childProp4"));
+ Property::Type type = typeInfoImpl.GetChildPropertyType(typeInfoImpl.GetChildPropertyIndex(Dali::Internal::ConstString("childProp4")));
DALI_TEST_EQUALS(type, Property::INTEGER, TEST_LOCATION);
std::string unRegisteredChildName(typeInfoImpl.GetChildPropertyName(CHILD_PROPERTY_REGISTRATION_START_INDEX + 4));
}
catch(DaliException& e)
{
- DALI_TEST_ASSERT(e, "! \"GetProperty", TEST_LOCATION);
+ DALI_TEST_ASSERT(e, "!\"GetProperty", TEST_LOCATION);
}
END_TEST;
}
}
catch(DaliException& e)
{
- DALI_TEST_ASSERT(e, "! \"Property index already added", TEST_LOCATION);
+ DALI_TEST_ASSERT(e, "!\"Property index already added", TEST_LOCATION);
}
int animatablePropertyIndex = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 100;
}
catch(DaliException& e)
{
- DALI_TEST_ASSERT(e, "! \"Property index already added", TEST_LOCATION);
+ DALI_TEST_ASSERT(e, "!\"Property index already added", TEST_LOCATION);
}
END_TEST;
}