Revert "License conversion from Flora to Apache 2.0"
[platform/core/uifw/dali-core.git] / automated-tests / src / dali-unmanaged / utc-Dali-DynamicsWorldConfig.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 #include <iostream>
18 #include <stdlib.h>
19 #include <dali/dali.h>
20 #include <dali/public-api/dali-core.h>
21 #include <dali-test-suite-utils.h>
22
23
24 using namespace Dali;
25
26
27 int UtcDaliDynamicsWorldConfigConstructor(void)
28 {
29   tet_infoline("UtcDaliDynamicsWorldConfigConstructor - DynamicsWorldConfig::DynamicsWorldConfig");
30
31   TestApplication application;
32
33   // start up
34   application.SendNotification();
35   application.Render();
36   application.Render();
37
38   // Default constructor - create an uninitialized handle
39   DynamicsWorldConfig worldConfig;
40   DALI_TEST_CHECK( !worldConfig );
41
42   // initialize handle
43   worldConfig = DynamicsWorldConfig::New();
44
45   DALI_TEST_CHECK( worldConfig );
46   END_TEST;
47 }
48
49 int UtcDaliDynamicsWorldConfigNew(void)
50 {
51   tet_infoline("UtcDaliDynamicsWorldConfigNew - DynamicsWorldConfig::New");
52
53   TestApplication application;
54
55   // start up
56   application.SendNotification();
57   application.Render();
58   application.Render();
59
60   // Default constructor - create an uninitialized handle
61   DynamicsWorldConfig worldConfig( DynamicsWorldConfig::New() );
62
63   DALI_TEST_CHECK( worldConfig );
64   END_TEST;
65 }
66
67 int UtcDaliDynamicsWorldConfigType(void)
68 {
69   TestApplication application;
70
71   // start up
72   application.SendNotification();
73   application.Render();
74   application.Render();
75
76   // Default constructor - create an uninitialized handle
77   DynamicsWorldConfig worldConfig( DynamicsWorldConfig::New() );
78
79   tet_infoline("UtcDaliDynamicsWorldConfigNew - DynamicsWorldConfig::GetType");
80   DALI_TEST_CHECK(DynamicsWorldConfig::RIGID == worldConfig.GetType());
81
82   tet_infoline("UtcDaliDynamicsWorldConfigNew - DynamicsWorldConfig::SetType");
83   worldConfig.SetType(DynamicsWorldConfig::SOFT);
84   DALI_TEST_CHECK(DynamicsWorldConfig::SOFT == worldConfig.GetType());
85   END_TEST;
86 }