From 19c06ae56d3d26bcdd4d72bd24aa7107da73d3d1 Mon Sep 17 00:00:00 2001 From: Ferran Sole Date: Fri, 22 May 2015 19:03:40 +0100 Subject: [PATCH] Added test case for PixmapImage Change-Id: I4841f2a5ad783fc559f3371940ef7272450c24f5 --- automated-tests/src/dali-adaptor/CMakeLists.txt | 1 + .../src/dali-adaptor/utc-Dali-PixmapImage.cpp | 57 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 automated-tests/src/dali-adaptor/utc-Dali-PixmapImage.cpp diff --git a/automated-tests/src/dali-adaptor/CMakeLists.txt b/automated-tests/src/dali-adaptor/CMakeLists.txt index e2a8994..7384cc0 100644 --- a/automated-tests/src/dali-adaptor/CMakeLists.txt +++ b/automated-tests/src/dali-adaptor/CMakeLists.txt @@ -6,6 +6,7 @@ SET(RPM_NAME "core-${PKG_NAME}-tests") SET(CAPI_LIB "dali-adaptor") SET(TC_SOURCES utc-Dali-Key.cpp + utc-Dali-PixmapImage.cpp utc-Dali-SingletonService.cpp utc-Dali-Window.cpp utc-Dali-Timer.cpp diff --git a/automated-tests/src/dali-adaptor/utc-Dali-PixmapImage.cpp b/automated-tests/src/dali-adaptor/utc-Dali-PixmapImage.cpp new file mode 100644 index 0000000..1ed3120 --- /dev/null +++ b/automated-tests/src/dali-adaptor/utc-Dali-PixmapImage.cpp @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2015 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#include +#include + +#include + +using namespace Dali; + + +void utc_dali_pixmap_image_startup(void) +{ + test_return_value = TET_UNDEF; +} + +void utc_dali_pixmap_image_cleanup(void) +{ + test_return_value = TET_PASS; +} + +int UtcDaliPixmapImageNewN(void) +{ + unsigned int width = 256u; + unsigned int heigth = 256u; + + try + { + PixmapImagePtr pixmapImage = PixmapImage::New(width, heigth, PixmapImage::COLOR_DEPTH_DEFAULT ); + } + catch(Dali::DaliException& e) + { + DALI_TEST_PRINT_ASSERT( e ); + DALI_TEST_ASSERT(e, "Adaptor::IsAvailable()", TEST_LOCATION); + } + catch(...) + { + tet_printf("Assertion test failed - wrong Exception\n" ); + tet_result(TET_FAIL); + } + + END_TEST; +} -- 2.7.4