[Tizen] Return Animation information
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-WeakHandle.cpp
index fedb2e1..186e5c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
@@ -16,7 +16,6 @@
  */
 
 #include <dali/public-api/dali-core.h>
-#include <dali/devel-api/object/weak-handle.h>
 #include <dali-test-suite-utils.h>
 
 using namespace Dali;
@@ -356,6 +355,23 @@ int UtcDaliWeakHandleBaseGetBaseHandle(void)
   END_TEST;
 }
 
+int UtcDaliWeakHandleBaseReset(void)
+{
+  TestApplication application;
+  tet_infoline( "Testing Daku::WeakHandleBase::Reset()" );
+
+  Actor actor = Actor::New();
+  WeakHandleBase object(actor);
+  DALI_TEST_CHECK(object.GetBaseHandle() == actor);
+
+  object.Reset();
+
+  DALI_TEST_CHECK(object == WeakHandleBase());
+  DALI_TEST_CHECK(object.GetBaseHandle() == Handle());
+
+  END_TEST;
+}
+
 int UtcDaliWeakHandleGetHandle(void)
 {
   TestApplication application;