X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Fdali-test-suite-utils.h;h=a070298379f9dda36146c5259818e9fe588118b7;hb=6a219d0bbcfd016e24b5466d5fb1a666c92feae5;hp=a4b45c90581524e2d61a067749d8a77a7ec627c1;hpb=fd850e301e2c219e5d084fa9d4673eede8fc862c;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h index a4b45c9..a070298 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/dali-test-suite-utils.h @@ -2,7 +2,7 @@ #define DALI_TEST_SUITE_UTILS_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2021 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. @@ -99,6 +99,7 @@ bool operator==(TimePeriod a, TimePeriod b); std::ostream& operator<<(std::ostream& ostream, TimePeriod value); std::ostream& operator<<(std::ostream& ostream, Radian angle); std::ostream& operator<<(std::ostream& ostream, Degree angle); +std::ostream& operator<<(std::ostream& ostream, BaseHandle handle); /** * Test whether two values are equal. @@ -417,25 +418,25 @@ inline void DALI_TEST_PRINT_ASSERT(DaliException& e) * @param expressions code to execute * @param except the exception expected in the assert */ -#define DALI_TEST_THROWS(expressions, except) \ - try \ - { \ - TestApplication::EnableLogging(false); \ - expressions; \ - TestApplication::EnableLogging(true); \ - fprintf(stderr, "Test failed in %s, expected exception: '%s' didn't occur\n", __FILELINE__, #except); \ - tet_result(TET_FAIL); \ - throw("TET_FAIL"); \ - } \ - catch(except &) \ - { \ - tet_result(TET_PASS); \ - } \ - catch(...) \ - { \ - fprintf(stderr, "Test failed in %s, unexpected exception\n", __FILELINE__); \ - tet_result(TET_FAIL); \ - throw; \ +#define DALI_TEST_THROWS(expressions, except) \ + try \ + { \ + TestApplication::EnableLogging(false); \ + expressions; \ + TestApplication::EnableLogging(true); \ + fprintf(stderr, "Test failed in %s, expected exception: '%s' didn't occur\n", __FILELINE__, #except); \ + tet_result(TET_FAIL); \ + throw("TET_FAIL"); \ + } \ + catch(except&) \ + { \ + tet_result(TET_PASS); \ + } \ + catch(...) \ + { \ + fprintf(stderr, "Test failed in %s, unexpected exception\n", __FILELINE__); \ + tet_result(TET_FAIL); \ + throw; \ } // Functor to test whether an Applied signal is emitted