Dali 3D User Interface Engine
utc-Dali-ConstraintSource.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #include <iostream>
19 
20 #include <stdlib.h>
22 #include <dali-test-suite-utils.h>
23 
24 using namespace Dali;
25 
28 {
30 }
31 
33 {
35 }
37 
39 // LocalSource
42 {
44 
46 
47  END_TEST;
48 }
49 
51 
53 // ParentSource
56 {
58 
60 
61  END_TEST;
62 }
63 
65 
67 // Source
69 int UtcDaliSource1(void)
70 {
71  Actor actor;
72  Source source( actor, Actor::Property::SIZE );
73 
74  DALI_TEST_CHECK( ! source.object );
76 
77  END_TEST;
78 }
79 
80 int UtcDaliSource2(void)
81 {
82  TestApplication application;
83 
84  Actor actor = Actor::New();
85 
86  Source source( actor, Actor::Property::SIZE );
87  DALI_TEST_EQUALS( source.object, actor, TEST_LOCATION );
89 
90  END_TEST;
91 }
93 
95 // ConstraintSource
98 {
99  Actor actor;
100 
102  DALI_TEST_CHECK( ! source.object );
105 
106  END_TEST;
107 }
108 
110 {
111  TestApplication application;
112 
113  Actor actor = Actor::New();
114 
116  DALI_TEST_EQUALS( source.object, actor, TEST_LOCATION );
119 
120  END_TEST;
121 }
122 
124 {
125  Actor actor;
126 
128  DALI_TEST_CHECK( ! source.object );
131 
132  END_TEST;
133 }
134 
136 {
137  Actor actor;
138 
140  DALI_TEST_CHECK( ! source.object );
143 
144  END_TEST;
145 }
Dali Docs Home
Read more about Dali