Cleaning up the property framework; removal of duplicate methods and incorrect assers
[platform/core/uifw/dali-core.git] / automated-tests / src / dali / utc-Dali-Handle.cpp
index 0eb04f3..fdfb01f 100644 (file)
@@ -534,7 +534,7 @@ int UtcDaliHandleNonAnimtableProperties(void)
     exception = true;
   }
 
-  DALI_TEST_CHECK(exception);
+  DALI_TEST_CHECK(!exception);// trying to set a read-only property is a no-op
 
   DALI_TEST_EQUALS( 0.f, actor.GetProperty( readonly ).Get<float>(), TEST_LOCATION );
 
@@ -656,7 +656,7 @@ int UtcDaliHandleNonAnimtableCompositeProperties(void)
   catch (Dali::DaliException& e)
   {
     exception = true;
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
+    DALI_TEST_PRINT_ASSERT( e );
   }
 
   DALI_TEST_EQUALS(exception, true, TEST_LOCATION);
@@ -714,16 +714,8 @@ int UtcDaliHandleSetProperty02(void)
 
   DALI_TEST_CHECK( !actor.IsPropertyWritable( Actor::WORLD_POSITION ) );
 
-  try
-  {
-    // World position is not writable
-    actor.SetProperty( Actor::WORLD_POSITION, Vector3(1,2,3) );
-  }
-  catch (Dali::DaliException& e)
-  {
-    tet_printf("Assertion %s failed at %s\n", e.mCondition.c_str(), e.mLocation.c_str());
-    DALI_TEST_ASSERT(e, "IsDefaultPropertyWritable(index) && \"Property is read-only\"", TEST_LOCATION);
-  }
+  // World position is not writable so this is a no-op and should not crash
+  actor.SetProperty( Actor::WORLD_POSITION, Vector3(1,2,3) );
 
   END_TEST;
 }