Added test case for PixmapImage 43/39843/4
authorFerran Sole <ferran.sole@samsung.com>
Fri, 22 May 2015 18:03:40 +0000 (19:03 +0100)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 22 May 2015 18:24:53 +0000 (11:24 -0700)
Change-Id: I4841f2a5ad783fc559f3371940ef7272450c24f5

automated-tests/src/dali-adaptor/CMakeLists.txt
automated-tests/src/dali-adaptor/utc-Dali-PixmapImage.cpp [new file with mode: 0644]

index e2a8994..7384cc0 100644 (file)
@@ -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 (file)
index 0000000..1ed3120
--- /dev/null
@@ -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 <dali/dali.h>
+#include <dali-test-suite-utils.h>
+
+#include <Ecore_X.h>
+
+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;
+}