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