X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit-third-party%2Futc-Dali-Flexbox-Layout.cpp;h=465e7f3d8ee9d915a5f5fcd7948820a864d5f8fd;hp=83f932eac0d0e563e757a1a68d3a5243c605f748;hb=dfc446045beee475f6523e1bf94b52ce11463d1d;hpb=941eb8eab76fca967bb8e21456179fc9b4eafea6 diff --git a/automated-tests/src/dali-toolkit-third-party/utc-Dali-Flexbox-Layout.cpp b/automated-tests/src/dali-toolkit-third-party/utc-Dali-Flexbox-Layout.cpp index 83f932e..465e7f3 100644 --- a/automated-tests/src/dali-toolkit-third-party/utc-Dali-Flexbox-Layout.cpp +++ b/automated-tests/src/dali-toolkit-third-party/utc-Dali-Flexbox-Layout.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,22 +15,76 @@ * */ -#include +#include -extern "C" -{ -#include "facebook-flexbox/layout-test-utils.h" -} +#include +// GTest fails to compile with "error: return-statement with a value, in function returning 'void'" error +// if using dali assert function so define new assert with returning void. +#define _ASSERT_H_ +#define assert(exp) \ + if (!(exp)) { \ + fprintf(stderr, \ + "Assert fail in %s:%d\n", __FILE__, __LINE__); \ + fprintf(stderr, \ + "Following expression is not true:\n" \ + "%s\n", #exp); \ + std::abort(); \ + } +#include +#undef GTEST_HAS_DEATH_TEST +#include "yoga/YGFlexTest.cpp" +#include "yoga/YGAlignContentTest.cpp" +#include "yoga/YGComputedMarginTest.cpp" +#include "yoga/YGZeroOutLayoutRecursivlyTest.cpp" +#include "yoga/YGRoundingTest.cpp" +#include "yoga/YGTreeMutationTest.cpp" +#include "yoga/YGMeasureCacheTest.cpp" +#include "yoga/YGTraversalTest.cpp" +#include "yoga/YGAlignItemsTest.cpp" +#include "yoga/YGComputedPaddingTest.cpp" +#include "yoga/YGDimensionTest.cpp" +#include "yoga/YGDefaultValuesTest.cpp" +#include "yoga/YGMinMaxDimensionTest.cpp" +#include "yoga/YGPaddingTest.cpp" +#include "yoga/YGLoggerTest.cpp" +#include "yoga/YGAbsolutePositionTest.cpp" +#include "yoga/YGBorderTest.cpp" +#include "yoga/YGDirtiedTest.cpp" +#include "yoga/YGRoundingMeasureFuncTest.cpp" +#include "yoga/YGEdgeTest.cpp" +#include "yoga/YGAlignSelfTest.cpp" +#include "yoga/YGMeasureTest.cpp" +#include "yoga/YGFlexDirectionTest.cpp" +#include "yoga/YGHadOverflowTest.cpp" +#include "yoga/YGNodeChildTest.cpp" +#include "yoga/YGRoundingFunctionTest.cpp" +#include "yoga/YGPersistenceTest.cpp" +#include "yoga/YGPercentageTest.cpp" +#include "yoga/YGStyleTest.cpp" +#include "yoga/YGMarginTest.cpp" +#include "yoga/YGLayoutDiffingTest.cpp" +#include "yoga/YGBaselineFuncTest.cpp" +#include "yoga/YGAspectRatioTest.cpp" +#include "yoga/YGSizeOverflowTest.cpp" +#include "yoga/YGDirtyMarkingTest.cpp" +#include "yoga/YGMeasureModeTest.cpp" +#include "yoga/YGJustifyContentTest.cpp" +#include "yoga/YGInfiniteHeightTest.cpp" +#include "yoga/YGRelayoutTest.cpp" +#include "yoga/YGDisplayTest.cpp" +#include "yoga/YGFlexWrapTest.cpp" ////////////////////////////////////////////////////////// int UtcDaliFlexboxLayoutTest(void) { - ToolkitTestApplication application; tet_infoline("UtcDaliFlexboxLayoutTest"); + int argc = 1; + const char* argv = "yoga-gtest"; + testing::InitGoogleTest( &argc, const_cast< char** >( &argv ) ); // The test function is a 3rd party function that should return true if the test passes - if( perform_layout_test() ) + if( !RUN_ALL_TESTS() ) { tet_result(TET_PASS); }