Merge "Remove deprecated APIs in Tizen 3.0" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-third-party / utc-Dali-Flexbox-Layout.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 <cstdlib>
19
20 #include <dali-toolkit-test-suite-utils.h>
21 // GTest fails to compile with "error: return-statement with a value, in function returning 'void'" error
22 // if using dali assert function so define new assert with returning void.
23 #define _ASSERT_H_
24 #define assert(exp) \
25     if (!(exp)) { \
26         fprintf(stderr, \
27             "Assert fail in %s:%d\n", __FILE__, __LINE__); \
28         fprintf(stderr, \
29             "Following expression is not true:\n" \
30                 "%s\n", #exp); \
31         std::abort(); \
32     }
33 #include <gtest/gtest.h>
34 #undef GTEST_HAS_DEATH_TEST
35 #include "yoga/YGFlexTest.cpp"
36 #include "yoga/YGAlignContentTest.cpp"
37 #include "yoga/YGComputedMarginTest.cpp"
38 #include "yoga/YGZeroOutLayoutRecursivlyTest.cpp"
39 #include "yoga/YGRoundingTest.cpp"
40 #include "yoga/YGTreeMutationTest.cpp"
41 #include "yoga/YGMeasureCacheTest.cpp"
42 #include "yoga/YGTraversalTest.cpp"
43 #include "yoga/YGAlignItemsTest.cpp"
44 #include "yoga/YGComputedPaddingTest.cpp"
45 #include "yoga/YGDimensionTest.cpp"
46 #include "yoga/YGDefaultValuesTest.cpp"
47 #include "yoga/YGMinMaxDimensionTest.cpp"
48 #include "yoga/YGPaddingTest.cpp"
49 #include "yoga/YGLoggerTest.cpp"
50 #include "yoga/YGAbsolutePositionTest.cpp"
51 #include "yoga/YGBorderTest.cpp"
52 #include "yoga/YGDirtiedTest.cpp"
53 #include "yoga/YGRoundingMeasureFuncTest.cpp"
54 #include "yoga/YGEdgeTest.cpp"
55 #include "yoga/YGAlignSelfTest.cpp"
56 #include "yoga/YGMeasureTest.cpp"
57 #include "yoga/YGFlexDirectionTest.cpp"
58 #include "yoga/YGHadOverflowTest.cpp"
59 #include "yoga/YGNodeChildTest.cpp"
60 #include "yoga/YGRoundingFunctionTest.cpp"
61 #include "yoga/YGPersistenceTest.cpp"
62 #include "yoga/YGPercentageTest.cpp"
63 #include "yoga/YGStyleTest.cpp"
64 #include "yoga/YGMarginTest.cpp"
65 #include "yoga/YGLayoutDiffingTest.cpp"
66 #include "yoga/YGBaselineFuncTest.cpp"
67 #include "yoga/YGAspectRatioTest.cpp"
68 #include "yoga/YGSizeOverflowTest.cpp"
69 #include "yoga/YGDirtyMarkingTest.cpp"
70 #include "yoga/YGMeasureModeTest.cpp"
71 #include "yoga/YGJustifyContentTest.cpp"
72 #include "yoga/YGInfiniteHeightTest.cpp"
73 #include "yoga/YGRelayoutTest.cpp"
74 #include "yoga/YGDisplayTest.cpp"
75 #include "yoga/YGFlexWrapTest.cpp"
76
77 //////////////////////////////////////////////////////////
78
79 int UtcDaliFlexboxLayoutTest(void)
80 {
81   tet_infoline("UtcDaliFlexboxLayoutTest");
82   int argc = 1;
83   const char* argv = "yoga-gtest";
84   testing::InitGoogleTest( &argc,  const_cast< char** >( &argv ) );
85
86   // The test function is a 3rd party function that should return true if the test passes
87   if( !RUN_ALL_TESTS() )
88   {
89     tet_result(TET_PASS);
90   }
91   else
92   {
93     tet_result(TET_FAIL);
94   }
95
96   END_TEST;
97 }