projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "fix issue with text size with negative line spacing" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
automated-tests
/
src
/
dali-toolkit
/
utc-Dali-EffectsView.cpp
diff --git
a/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp
b/automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp
index
d597f7a
..
fbaa3de
100644
(file)
--- a/
automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp
+++ b/
automated-tests/src/dali-toolkit/utc-Dali-EffectsView.cpp
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 20
17
Samsung Electronics Co., Ltd.
+ * Copyright (c) 20
20
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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-45,7
+45,7
@@
int UtcDaliEffectsViewNew(void)
view = EffectsView::New( EffectsView::DROP_SHADOW );
DALI_TEST_CHECK( view );
view = EffectsView::New( EffectsView::DROP_SHADOW );
DALI_TEST_CHECK( view );
-
Stage::GetCurrent
().Add( view );
+
application.GetScene
().Add( view );
view.Reset();
view = EffectsView::New( EffectsView::EMBOSS );
view.Reset();
view = EffectsView::New( EffectsView::EMBOSS );
@@
-106,21
+106,21
@@
int UtcDaliEffectsViewAddRemoveDropShadow(void)
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
DALI_TEST_CHECK( view );
Actor actor = Actor::New();
- DALI_TEST_CHECK( !actor.
OnStage(
) );
+ DALI_TEST_CHECK( !actor.
GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE
) );
- view.SetP
arentOrigin(
ParentOrigin::CENTER);
- view.Set
Size(Stage::GetCurrent
().GetSize());
+ view.SetP
roperty( Actor::Property::PARENT_ORIGIN,
ParentOrigin::CENTER);
+ view.Set
Property( Actor::Property::SIZE, application.GetScene
().GetSize());
view.Add(actor);
view.Add(actor);
-
Stage::GetCurrent
().Add(view);
+
application.GetScene
().Add(view);
- DALI_TEST_CHECK( actor.
OnStage(
) );
+ DALI_TEST_CHECK( actor.
GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE
) );
DALI_TEST_CHECK( actor.GetParent() );
DALI_TEST_CHECK( actor.GetParent() != view );
view.Remove(actor);
DALI_TEST_CHECK( actor.GetParent() );
DALI_TEST_CHECK( actor.GetParent() != view );
view.Remove(actor);
- DALI_TEST_CHECK( !actor.
OnStage(
) );
+ DALI_TEST_CHECK( !actor.
GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE
) );
END_TEST;
}
END_TEST;
}
@@
-133,7
+133,7
@@
int UtcDaliEffectsViewAddRemoveEmboss(void)
tet_infoline("Checking number of render tasks = 1");
application.SendNotification();
application.Render();
tet_infoline("Checking number of render tasks = 1");
application.SendNotification();
application.Render();
-
Stage stage = Stage::GetCurrent
();
+
Integration::Scene stage = application.GetScene
();
DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION );
tet_infoline("Create effects view");
DALI_TEST_EQUALS( stage.GetRenderTaskList().GetTaskCount(), 1, TEST_LOCATION );
tet_infoline("Create effects view");
@@
-153,16
+153,16
@@
int UtcDaliEffectsViewAddRemoveEmboss(void)
Actor actor = Actor::New();
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
Actor actor = Actor::New();
actor.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
- DALI_TEST_CHECK( !actor.
OnStage(
) );
+ DALI_TEST_CHECK( !actor.
GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE
) );
- view.SetP
arentOrigin(
ParentOrigin::CENTER);
+ view.SetP
roperty( Actor::Property::PARENT_ORIGIN,
ParentOrigin::CENTER);
view.Add(actor);
view.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
stage.Add(view);
view.Add(actor);
view.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
stage.Add(view);
- DALI_TEST_CHECK( actor.
OnStage(
) );
+ DALI_TEST_CHECK( actor.
GetProperty< bool >( Actor::Property::CONNECTED_TO_SCENE
) );
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
@@
-207,8
+207,8
@@
int UtcDaliEffectsViewOnStage(void)
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
- view.Set
Size(100.f, 100.f
);
-
Stage stage = Stage::GetCurrent
();
+ view.Set
Property( Actor::Property::SIZE, Vector2(100.f, 100.f)
);
+
Integration::Scene stage = application.GetScene
();
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
@@
-224,8
+224,8
@@
int UtcDaliEffectsViewOffStage(void)
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.Set
Size(100.f, 100.f
);
-
Stage stage = Stage::GetCurrent
();
+ view.Set
Property( Actor::Property::SIZE, Vector2(100.f, 100.f)
);
+
Integration::Scene stage = application.GetScene
();
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
DALI_TEST_CHECK( stage.GetRenderTaskList().GetTaskCount() == 1 );
stage.Add( view );
@@
-336,7
+336,7
@@
int UtcDaliEffectsViewOffsetProperty(void)
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::EMBOSS );
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::EMBOSS );
-
Stage::GetCurrent
().Add( view );
+
application.GetScene
().Add( view );
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET );
Vector3 offsetValue;
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_OFFSET );
Vector3 offsetValue;
@@
-371,7
+371,7
@@
int UtcDaliEffectsViewColorProperty(void)
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW );
ToolkitTestApplication application;
EffectsView view = EffectsView::New( EffectsView::DROP_SHADOW );
-
Stage::GetCurrent
().Add( view );
+
application.GetScene
().Add( view );
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_COLOR );
Vector4 colorValue;
Property::Value value = view.GetProperty( EffectsView::Property::EFFECT_COLOR );
Vector4 colorValue;
@@
-457,9
+457,9
@@
int UtcDaliEffectsViewSetRefreshOnDemandP(void)
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
ToolkitTestApplication application;
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.Set
Size(100.f, 100.f
);
+ view.Set
Property( Actor::Property::SIZE, Vector2(100.f, 100.f)
);
-
Stage stage = Stage::GetCurrent
();
+
Integration::Scene stage = application.GetScene
();
stage.Add( view );
application.SendNotification();
application.Render();
stage.Add( view );
application.SendNotification();
application.Render();
@@
-497,30
+497,30
@@
int UtcDaliEffectsViewSetRefreshOnDemandN(void)
int UtcDaliEffectsViewSizeSet(void)
{
ToolkitTestApplication application;
int UtcDaliEffectsViewSizeSet(void)
{
ToolkitTestApplication application;
-
Stage stage = Stage::GetCurrent
();
+
Integration::Scene stage = application.GetScene
();
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.Set
Size( 200.0f, 200.0f, 0.0f
);
+ view.Set
Property( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f )
);
stage.Add( view );
application.SendNotification();
application.Render();
stage.Add( view );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrent
Size(
), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrent
Property< Vector3 >( Actor::Property::SIZE
), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
}
{
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
}
{
EffectsView view = EffectsView::New(EffectsView::EMBOSS);
- view.Set
Size( 200.0f, 200.0f, 0.0f
);
+ view.Set
Property( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f )
);
stage.Add( view );
application.SendNotification();
application.Render();
stage.Add( view );
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrent
Size(
), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrent
Property< Vector3 >( Actor::Property::SIZE
), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
}
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
}
{
EffectsView view = EffectsView::New(EffectsView::DROP_SHADOW);
- view.Set
Size( 200.0f, 200.0f, 0.0f
);
+ view.Set
Property( Actor::Property::SIZE, Vector3( 200.0f, 200.0f, 0.0f )
);
stage.Add( view );
application.SendNotification();
application.Render();
stage.Add( view );
application.SendNotification();
application.Render();
@@
-529,7
+529,7
@@
int UtcDaliEffectsViewSizeSet(void)
application.SendNotification();
application.Render();
application.SendNotification();
application.Render();
- DALI_TEST_EQUALS( view.GetCurrent
Size(
), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
+ DALI_TEST_EQUALS( view.GetCurrent
Property< Vector3 >( Actor::Property::SIZE
), Vector3( 200.0f, 200.0f, 0.0f ), TEST_LOCATION );
}
END_TEST;
}
END_TEST;