Added memory pool logging
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Core.cpp
1 /*
2  * Copyright (c) 2022 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 <dali-test-suite-utils.h>
19 #include <dali/integration-api/core.h>
20 #include <stdlib.h>
21
22 #include <cmath> // isfinite
23 #include <iostream>
24 #include <sstream>
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 UtcDaliCoreGetObjectRegistry(void)
48 {
49   TestApplication application;
50   DALI_TEST_CHECK(application.GetCore().GetObjectRegistry());
51   END_TEST;
52 }
53
54 int UtcDaliCoreCheckMemoryPool(void)
55 {
56   TestApplication application;
57
58   // Calling LogMemoryPools should check capacity across the board.
59   application.GetCore().LogMemoryPools();
60
61   tet_result(TET_PASS);
62   END_TEST;
63 }