[Tizen] Revert "Remove StereoMode"
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Core.cpp
1 /*
2  * Copyright (c) 2018 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 #include <sstream>
20 #include <cmath> // isfinite
21
22 #include <stdlib.h>
23 #include <dali/integration-api/core.h>
24 #include <dali-test-suite-utils.h>
25
26 using namespace Dali;
27
28 void utc_dali_core_startup(void)
29 {
30   test_return_value = TET_UNDEF;
31 }
32
33 void utc_dali_core_cleanup(void)
34 {
35   test_return_value = TET_PASS;
36 }
37
38 int UtcDaliCoreGetMaximumUpdateCount(void)
39 {
40   TestApplication application;
41   tet_infoline("Testing Dali::GetMaximumUpdateCount");
42
43   DALI_TEST_EQUALS( 2, application.GetCore().GetMaximumUpdateCount(), TEST_LOCATION );
44   END_TEST;
45 }
46
47 int UtcDaliCoreSetStereoBase(void)
48 {
49   TestApplication application;
50   tet_infoline("Testing Dali::GetMaximumUpdateCount");
51
52   application.GetCore().SetViewMode( STEREO_HORIZONTAL );
53   DALI_TEST_EQUALS( application.GetCore().GetViewMode(), STEREO_HORIZONTAL, TEST_LOCATION );
54
55   application.SendNotification();
56   application.Render();
57
58   application.GetCore().SetViewMode( STEREO_VERTICAL );
59   DALI_TEST_EQUALS( application.GetCore().GetViewMode(), STEREO_VERTICAL, TEST_LOCATION );
60
61   application.SendNotification();
62   application.Render();
63
64   application.GetCore().SetViewMode( MONO );
65   DALI_TEST_EQUALS( application.GetCore().GetViewMode(), MONO, TEST_LOCATION );
66
67   application.SendNotification();
68   application.Render();
69
70   END_TEST;
71 }
72