+
+int UtcDaliAnyReferenceCheck(void)
+{
+ gRefCount = 0;
+
+ {
+ Dali::Any any[10]; // Create local 10 empty Any
+
+ DALI_TEST_EQUALS(gRefCount, 0, TEST_LOCATION);
+
+ // Create [0 5)
+ for(int i = 0; i < 5; i++)
+ {
+ any[i] = MyStruct(1.0f, i);
+ }
+ DALI_TEST_EQUALS(gRefCount, 5, TEST_LOCATION);
+
+ // Move from [0 5) to [5 10)
+ for(int i = 0; i < 5; i++)
+ {
+ any[i + 5] = std::move(any[i]);
+ }
+ DALI_TEST_EQUALS(gRefCount, 5, TEST_LOCATION);
+
+ // Copy from [5 10) to [0 5)
+ for(int i = 0; i < 5; i++)
+ {
+ any[i] = any[i + 5];
+ }
+ DALI_TEST_EQUALS(gRefCount, 10, TEST_LOCATION);
+ }
+
+ // Check whether all Dali::Any are released
+ DALI_TEST_EQUALS(gRefCount, 0, TEST_LOCATION);
+
+ END_TEST;
+}
\ No newline at end of file