(AutomatedTests) Move devel-api dependent tests to internal tests
[platform/core/uifw/dali-core.git] / automated-tests / src / dali-internal / utc-Dali-MeshActor.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 #include <iostream>
19
20 #include <stdlib.h>
21 #include <dali/public-api/dali-core.h>
22 #include <dali/devel-api/actors/mesh-actor.h>
23 #include <dali/devel-api/geometry/mesh.h>
24 #include <dali/devel-api/geometry/animatable-mesh.h>
25 #include <dali-test-suite-utils.h>
26
27 using namespace Dali;
28
29 #include <mesh-builder.h>
30
31 void mesh_actor_test_startup(void)
32 {
33   test_return_value = TET_UNDEF;
34 }
35
36 void mesh_actor_test_cleanup(void)
37 {
38   test_return_value = TET_PASS;
39 }
40
41 namespace
42 {
43
44 static Mesh NewMesh()
45 {
46   MeshData meshData;
47   MeshData::VertexContainer    vertices;
48   MeshData::FaceIndices        faces;
49   BoneContainer                bones;
50   ConstructVertices(vertices, 60);
51   ConstructFaces(vertices, faces);
52   Material customMaterial = ConstructMaterial();
53   meshData.SetData(vertices, faces, bones, customMaterial);
54   Mesh mesh = Mesh::New(meshData);
55   return mesh;
56 }
57
58 static AnimatableMesh NewAnimatableMesh()
59 {
60   AnimatableMesh::Faces faces;
61   faces.push_back(0);
62   faces.push_back(1);
63   faces.push_back(2);
64
65   Material customMaterial = Material::New("CustomMaterial");
66   customMaterial.SetOpacity(.76f);
67   customMaterial.SetDiffuseColor(Vector4(0.8f, 0.0f, 0.4f, 1.0f));
68   customMaterial.SetAmbientColor(Vector4(0.2f, 1.0f, 0.6f, 1.0f));
69   customMaterial.SetSpecularColor(Vector4(0.5f, 0.6f, 0.7f, 1.0f));
70
71   AnimatableMesh mesh = AnimatableMesh::New( 10u, faces, customMaterial );
72   return mesh;
73 }
74 } // anonymous namespace
75
76 int UtcDaliMeshActorConstructorVoid(void)
77 {
78   TestApplication application;
79   tet_infoline("Testing Dali::MeshActor::MeshActor()");
80
81   MeshActor actor;
82   DALI_TEST_CHECK(!actor);
83   END_TEST;
84 }
85
86 int UtcDaliMeshActorNew01(void)
87 {
88   TestApplication application;
89   tet_infoline("Testing Dali::MeshActor::New()");
90
91   AnimatableMesh mesh = NewAnimatableMesh();
92   MeshActor actor = MeshActor::New(mesh);
93   application.SendNotification();
94   application.Render();
95   application.Render();
96   application.SendNotification();
97
98   DALI_TEST_CHECK(actor);
99   END_TEST;
100 }
101
102
103 int UtcDaliMeshActorNew03(void)
104 {
105   TestApplication application;
106   tet_infoline("Testing Dali::Mesh::New() - Create with no mesh");
107
108   try
109   {
110     MeshActor actor = MeshActor::New(); // Shouldn't assert
111     tet_result(TET_PASS);
112   }
113   catch (Dali::DaliException& e)
114   {
115     tet_result(TET_FAIL);
116   }
117
118   END_TEST;
119 }
120
121 int UtcDaliMeshActorCreateNoMeshData(void)
122 {
123   TestApplication application;
124   tet_infoline("Testing Dali::Mesh::New() - Create with no mesh data");
125
126   try
127   {
128     MeshData meshData;
129     Mesh mesh = Mesh::New(meshData);
130     MeshActor actor1 = MeshActor::New(mesh);
131   }
132   catch(Dali::DaliException& e)
133   {
134     DALI_TEST_PRINT_ASSERT( e );
135     DALI_TEST_ASSERT(e, "object", TEST_LOCATION);
136   }
137   END_TEST;
138 }
139
140
141 int UtcDaliMeshActorCreateSetData01(void)
142 {
143   TestApplication application;
144   tet_infoline("Testing Dali::MeshData::SetData() - Create with no verts");
145   try
146   {
147     MeshData meshData;
148     MeshData::VertexContainer vertices;
149     MeshData::FaceIndices     faces;
150     BoneContainer             bones;
151     Material                  customMaterial;
152     meshData.SetData(vertices, faces, bones, customMaterial);
153     Mesh mesh = Mesh::New(meshData);
154     MeshActor actor1 = MeshActor::New(mesh);
155   }
156   catch(Dali::DaliException& e)
157   {
158     DALI_TEST_PRINT_ASSERT( e );
159     DALI_TEST_ASSERT(e, "!vertices.empty()", TEST_LOCATION );
160   }
161   END_TEST;
162 }
163
164 int UtcDaliMeshActorCreateSetData02(void)
165 {
166   TestApplication application;
167   tet_infoline("Testing Dali::MeshData::SetData - Create with no faces");
168   try
169   {
170     MeshData meshData;
171     MeshData::VertexContainer    vertices;
172     MeshData::FaceIndices        faces;
173     BoneContainer                bones;
174     Material                     customMaterial;
175     ConstructVertices(vertices, 60);
176     meshData.SetData(vertices, faces, bones, customMaterial);
177     Mesh mesh = Mesh::New(meshData);
178     MeshActor actor1 = MeshActor::New(mesh);
179   }
180   catch(Dali::DaliException& e)
181   {
182     DALI_TEST_PRINT_ASSERT( e );
183     DALI_TEST_ASSERT(e, "!faceIndices.empty", TEST_LOCATION );
184   }
185   END_TEST;
186 }
187
188 int UtcDaliMeshActorCreateSetData03(void)
189 {
190   TestApplication application;
191   tet_infoline("Testing Dali::MeshData::SetData - Create with no mats");
192   try
193   {
194     MeshData meshData;
195     MeshData::VertexContainer    vertices;
196     MeshData::FaceIndices        faces;
197     BoneContainer                bones;
198     Material                     customMaterial;
199     ConstructVertices(vertices, 60);
200     ConstructFaces(vertices, faces);
201     meshData.SetData(vertices, faces, bones, customMaterial);
202     Mesh mesh = Mesh::New(meshData);
203     MeshActor actor1 = MeshActor::New(mesh);
204   }
205   catch(Dali::DaliException& e)
206   {
207     DALI_TEST_PRINT_ASSERT( e );
208     DALI_TEST_ASSERT(e, "material", TEST_LOCATION );
209   }
210   END_TEST;
211 }
212
213 int UtcDaliMeshActorCreateSetData04(void)
214 {
215   TestApplication application;
216   tet_infoline("Testing Dali::MeshActor::SetData()");
217
218   MeshData meshData;
219   MeshData::VertexContainer    vertices;
220   MeshData::FaceIndices        faces;
221   BoneContainer                bones;
222   ConstructVertices(vertices, 60);
223   ConstructFaces(vertices, faces);
224   Material customMaterial = ConstructMaterial();
225   meshData.SetData(vertices, faces, bones, customMaterial);
226
227   Mesh mesh = Mesh::New(meshData);
228   MeshActor actor1 = MeshActor::New(mesh);
229   DALI_TEST_CHECK(actor1);
230   END_TEST;
231 }
232
233
234 int UtcDaliMeshActorDownCast(void)
235 {
236   TestApplication application;
237   tet_infoline("Testing Dali::MeshActor::DownCast()");
238
239   MeshData meshData;
240   MeshData::VertexContainer    vertices;
241   MeshData::FaceIndices        faces;
242   BoneContainer                bones;
243   ConstructVertices(vertices, 60);
244   ConstructFaces(vertices, faces);
245   Material customMaterial = ConstructMaterial();
246   meshData.SetData(vertices, faces, bones, customMaterial);
247   Mesh mesh = Mesh::New(meshData);
248
249   MeshActor actor1 = MeshActor::New(mesh);
250   Actor anActor = Actor::New();
251   anActor.Add(actor1);
252
253   Actor child = anActor.GetChildAt(0);
254   MeshActor meshActor = MeshActor::DownCast(child);
255
256   DALI_TEST_CHECK(meshActor);
257   END_TEST;
258 }
259
260 int UtcDaliMeshActorDownCast2(void)
261 {
262   TestApplication application;
263   tet_infoline("Testing Dali::MeshActor::DownCast()");
264
265   Actor actor1 = Actor::New();
266   Actor anActor = Actor::New();
267   anActor.Add(actor1);
268
269   Actor child = anActor.GetChildAt(0);
270   MeshActor meshActor = MeshActor::DownCast(child);
271   DALI_TEST_CHECK(!meshActor);
272
273   Actor unInitialzedActor;
274   meshActor = DownCast< MeshActor >( unInitialzedActor );
275   DALI_TEST_CHECK(!meshActor);
276   END_TEST;
277 }
278
279 int UtcDaliMeshActorSetMaterial01(void)
280 {
281   TestApplication application;
282   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
283
284   Mesh mesh = NewMesh();
285
286   MeshActor actor = MeshActor::New(mesh);
287   std::string name = "AMeshActor";
288   Stage::GetCurrent().Add(actor);
289   actor.SetName(name);
290   application.SendNotification();
291   application.Render();
292   application.Render();
293   application.SendNotification();
294
295   Material customMaterial = Material::New("CustomMaterial");
296   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
297
298   MeshActor::SetMaterial(actor, name, customMaterial);
299   application.SendNotification();
300   application.Render();
301   application.Render();
302   application.SendNotification();
303
304   DALI_TEST_CHECK( actor.GetMaterial() == customMaterial );
305   END_TEST;
306 }
307
308 int UtcDaliMeshActorSetMaterial01b(void)
309 {
310   TestApplication application;
311   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
312
313   Mesh mesh = NewMesh();
314
315   Actor rootActor = Actor::New();
316   MeshActor meshActor = MeshActor::New(mesh);
317   rootActor.Add(meshActor);
318
319   std::string name = "AMeshActor";
320   meshActor.SetName(name);
321
322   Stage::GetCurrent().Add(rootActor);
323   application.SendNotification();
324   application.Render();
325   application.Render();
326   application.SendNotification();
327
328   Material customMaterial = Material::New("CustomMaterial");
329   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
330
331   MeshActor::SetMaterial(rootActor, name, customMaterial);
332   application.SendNotification();
333   application.Render();
334   application.Render();
335   application.SendNotification();
336
337   DALI_TEST_CHECK(meshActor.GetMaterial() == customMaterial );
338   END_TEST;
339 }
340
341
342 int UtcDaliMeshActorSetMaterial02(void)
343 {
344   TestApplication application;
345   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
346
347   Mesh mesh = NewMesh();
348   MeshActor actor = MeshActor::New(mesh);
349
350   std::string name = "AMeshActor";
351   actor.SetName(name);
352   Stage::GetCurrent().Add(actor);
353   application.SendNotification();
354   application.Render();
355   application.Render();
356   application.SendNotification();
357
358   Material baseMat = actor.GetMaterial();
359   Material customMaterial = Material::New("CustomMaterial");
360   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
361
362   MeshActor::SetMaterial(actor, "NoName", customMaterial);
363   application.SendNotification();
364   application.Render();
365   application.Render();
366   application.SendNotification();
367
368   DALI_TEST_CHECK( actor.GetMaterial() == baseMat );
369   DALI_TEST_CHECK( actor.GetMaterial() != customMaterial );
370   END_TEST;
371 }
372
373 int UtcDaliMeshActorSetMaterial02b(void)
374 {
375   TestApplication application;
376   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
377
378   Mesh mesh = NewMesh();
379
380   MeshActor actor = MeshActor::New(mesh);
381   Stage::GetCurrent().Add(actor);
382
383   std::string name = "AMeshActor";
384   actor.SetName(name);
385   application.SendNotification();
386   application.Render();
387   application.Render();
388   application.SendNotification();
389
390   Material baseMat = actor.GetMaterial();
391   Material customMaterial = Material::New("CustomMaterial");
392   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
393
394   MeshActor::SetMaterial(actor, "NoName", customMaterial);
395   application.SendNotification();
396   application.Render();
397   application.Render();
398   application.SendNotification();
399
400   DALI_TEST_CHECK( actor.GetMaterial() == baseMat );
401   DALI_TEST_CHECK( actor.GetMaterial() != customMaterial );
402   END_TEST;
403 }
404
405
406 int UtcDaliMeshActorSetMaterial03(void)
407 {
408   TestApplication application;
409   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
410
411   Mesh mesh = NewMesh();
412
413   MeshActor actor = MeshActor::New(mesh);
414   std::string name = "AMeshActor";
415   actor.SetName(name);
416   Stage::GetCurrent().Add(actor);
417
418   Material customMaterial = Material::New("CustomMaterial");
419   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
420
421   actor.SetMaterial(customMaterial);
422   application.SendNotification();
423   application.Render(0);
424   application.Render(16);
425   application.SendNotification();
426
427   DALI_TEST_CHECK(actor.GetMaterial() == customMaterial );
428   END_TEST;
429 }
430
431 int UtcDaliMeshActorSetMaterial03b(void)
432 {
433   TestApplication application;
434   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
435
436   Mesh mesh = NewMesh();
437
438   MeshActor actor = MeshActor::New(mesh);
439   std::string name = "AMeshActor";
440   actor.SetName(name);
441   Stage::GetCurrent().Add(actor);
442
443   Material customMaterial = Material::New("CustomMaterial");
444   customMaterial.SetDiffuseColor(Vector4(1.0f, 0.0f, 0.0f, 1.0f));
445
446   actor.SetMaterial(customMaterial);
447   application.SendNotification();
448   application.Render(0);
449   application.Render(16);
450   application.SendNotification();
451   DALI_TEST_CHECK(actor.GetMaterial() == customMaterial );
452   END_TEST;
453 }
454
455
456
457 int UtcDaliMeshActorGetMaterial01(void)
458 {
459   TestApplication application;
460   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
461
462   MeshData meshData;
463   MeshData::VertexContainer vertices;
464   MeshData::FaceIndices faces;
465   BoneContainer bones;
466   ConstructVertices(vertices, 60);
467   ConstructFaces(vertices, faces);
468   Material material = ConstructMaterial();
469   meshData.SetData(vertices, faces, bones, material);
470   Mesh mesh = Mesh::New(meshData);
471
472   MeshActor actor = MeshActor::New(mesh);
473   std::string name = "AMeshActor";
474   actor.SetName(name);
475   application.SendNotification();
476   application.Render();
477   application.Render();
478   application.SendNotification();
479
480   Material gotMaterial = actor.GetMaterial();
481
482   DALI_TEST_EQUALS( material.GetOpacity(), gotMaterial.GetOpacity(), TEST_LOCATION );
483   DALI_TEST_EQUALS( material.GetAmbientColor(), gotMaterial.GetAmbientColor(), TEST_LOCATION );
484   DALI_TEST_EQUALS( material.GetDiffuseColor(), gotMaterial.GetDiffuseColor(), TEST_LOCATION );
485   DALI_TEST_EQUALS( material.GetSpecularColor(), gotMaterial.GetSpecularColor(), TEST_LOCATION );
486   END_TEST;
487 }
488
489
490 int UtcDaliMeshActorGetMaterial02(void)
491 {
492   TestApplication application;
493   tet_infoline("Testing Dali::MeshActor::SetMaterial()");
494
495   MeshData meshData;
496   MeshData::VertexContainer vertices;
497   MeshData::FaceIndices faces;
498   BoneContainer bones;
499   ConstructVertices(vertices, 60);
500   ConstructFaces(vertices, faces);
501   Material material = ConstructMaterial();
502   meshData.SetData(vertices, faces, bones, material);
503   Mesh mesh = Mesh::New(meshData);
504
505   MeshActor actor = MeshActor::New(mesh);
506   std::string name = "AMeshActor";
507   actor.SetName(name);
508   application.SendNotification();
509   application.Render();
510   application.Render();
511   application.SendNotification();
512
513   Material gotMaterial = actor.GetMaterial();
514
515   DALI_TEST_EQUALS( material.GetOpacity(), gotMaterial.GetOpacity(), TEST_LOCATION );
516   DALI_TEST_EQUALS( material.GetAmbientColor(), gotMaterial.GetAmbientColor(), TEST_LOCATION );
517   DALI_TEST_EQUALS( material.GetDiffuseColor(), gotMaterial.GetDiffuseColor(), TEST_LOCATION );
518   DALI_TEST_EQUALS( material.GetSpecularColor(), gotMaterial.GetSpecularColor(), TEST_LOCATION );
519   END_TEST;
520 }
521
522
523 namespace
524 {
525
526 Material ConstructMaterial(float opacity, float diffuseOpacity)
527 {
528   Material customMaterial = Material::New("CustomMaterial");
529   customMaterial.SetOpacity(opacity);
530   customMaterial.SetDiffuseColor(Vector4(0.8f, 0.0f, 0.4f, diffuseOpacity));
531   customMaterial.SetAmbientColor(Vector4(0.2f, 1.0f, 0.6f, 1.0f));
532   customMaterial.SetSpecularColor(Vector4(0.5f, 0.6f, 0.7f, 1.0f));
533   return customMaterial;
534 }
535
536 static void TestBlending( TestApplication& application, Material material, float actorOpacity, BlendingMode::Type blendingMode, bool expectedBlend )
537 {
538   MeshData meshData;
539   MeshData::VertexContainer vertices;
540   MeshData::FaceIndices faces;
541   BoneContainer bones;
542   ConstructVertices(vertices, 60);
543   ConstructFaces(vertices, faces);
544   meshData.SetData(vertices, faces, bones, material);
545   Mesh mesh = Mesh::New(meshData);
546
547   application.SendNotification();
548   application.Render(0);
549   application.Render();
550   application.SendNotification();
551
552   MeshActor actor = MeshActor::New(mesh);
553   Stage::GetCurrent().Add(actor);
554
555   actor.SetBlendMode(blendingMode);
556   actor.SetOpacity(actorOpacity);
557
558   TraceCallStack& cullFaceTrace = application.GetGlAbstraction().GetCullFaceTrace();
559   cullFaceTrace.Enable(true);
560   application.SendNotification();
561   application.Render();
562   DALI_TEST_EQUALS( BlendEnabled( cullFaceTrace ), expectedBlend, TEST_LOCATION );
563 }
564 } //anonymous namespace
565
566
567 int UtcDaliMeshActorBlend01(void)
568 {
569   // Set Material with translucent color, actor color opaque, Set Use image alpha to true
570   // Expect blending
571
572   TestApplication application;
573   tet_infoline("Testing Dali::MeshActor::Blend01()");
574
575   TestBlending( application, ConstructMaterial(0.5f, 0.5f), 1.0f, BlendingMode::AUTO, true );
576   END_TEST;
577 }
578
579
580 int UtcDaliMeshActorBlend02(void)
581 {
582   // Set material to translucent, set use image alpha to false, set actor opacity to 1.0f
583   // Expect no blending
584
585   TestApplication application;
586   tet_infoline("Testing Dali::MeshActor::Blend02()");
587   TestBlending( application, ConstructMaterial(0.5f, 0.5f), 1.0f, BlendingMode::OFF, false );
588   END_TEST;
589 }
590
591 int UtcDaliMeshActorBlend03(void)
592 {
593   // Set material to opaque, set use image alpha to true, set actor opacity to 1.0f
594   // Expect no blending
595
596   TestApplication application;
597   tet_infoline("Testing Dali::MeshActor::Blend03()");
598   TestBlending( application, ConstructMaterial(1.0f, 1.0f), 1.0f, BlendingMode::AUTO, false );
599   END_TEST;
600 }
601
602
603 int UtcDaliMeshActorBlend04(void)
604 {
605   // Set material to have image with alpha, set use image alpha to true, set actor opacity to 1.0f
606   // Expect blending
607   TestApplication application;
608   tet_infoline("Testing Dali::MeshActor::Blend04()");
609
610   Material material = ConstructMaterial(1.0f, 1.0f);
611   BufferImage image = BufferImage::New( 100, 50, Pixel::RGBA8888 );
612   material.SetDiffuseTexture( image );
613   application.SendNotification();
614   application.Render(0);
615
616   TestBlending( application, material, 1.0f, BlendingMode::AUTO, true );
617   END_TEST;
618 }
619
620 int UtcDaliMeshActorBlend05(void)
621 {
622   // Set material to have image with alpha, set use image alpha to false, set actor opacity to 1.0f
623   // Expect no blending
624
625   TestApplication application;
626   tet_infoline("Testing Dali::MeshActor::Blend05()");
627
628   Material material = ConstructMaterial(1.0f, 1.0f);
629   BufferImage image = BufferImage::New( 100, 50, Pixel::RGBA8888 );
630   material.SetDiffuseTexture( image );
631   application.SendNotification();
632   application.Render(0);
633
634   TestBlending( application, material, 1.0f, BlendingMode::ON, true );
635   END_TEST;
636 }
637
638
639 int UtcDaliMeshActorBlend06(void)
640 {
641   // Set material to have image without alpha, set use image alpha to true, set actor opacity to 1.0f
642   // Expect no blending
643
644   TestApplication application;
645   tet_infoline("Testing Dali::MeshActor::Blend()");
646
647   Material material = ConstructMaterial(1.0f, 1.0f);
648   BufferImage image = BufferImage::New( 100, 50, Pixel::RGB888 );
649   material.SetDiffuseTexture( image );
650   application.SendNotification();
651   application.Render(0);
652
653   TestBlending( application, material, 1.0f, BlendingMode::AUTO, false );
654   END_TEST;
655 }
656
657 int UtcDaliMeshActorBlend07(void)
658 {
659   // Set material to have framebuffer with alpha, set use image alpha to true, set actor opacity to 1.0f
660   // Expect blending
661   TestApplication application;
662   tet_infoline("Testing Dali::MeshActor::Blend07()");
663   application.Render(0);
664
665   Material material = ConstructMaterial(1.0f, 1.0f);
666   FrameBufferImage image = FrameBufferImage::New( 100, 50, Pixel::RGBA8888 );
667   RenderTaskList taskList = Stage::GetCurrent().GetRenderTaskList();
668   RenderTask task = taskList.GetTask( 0u );
669   task.SetTargetFrameBuffer( image ); // To ensure frame buffer is connected
670   application.GetGlAbstraction().SetCheckFramebufferStatusResult( GL_FRAMEBUFFER_COMPLETE );
671   application.SendNotification();
672   application.Render();
673
674   material.SetDiffuseTexture( image ); // (to render from)
675   application.SendNotification();
676   application.Render();
677   application.Render();
678   application.SendNotification();
679
680   TestBlending( application, material, 1.0f, BlendingMode::AUTO, true );
681   END_TEST;
682 }
683
684 int UtcDaliMeshActorBlend08(void)
685 {
686   // Set material to have image with alpha, set use image alpha to false, set actor opacity to 0.5f
687   // Expect blending
688   TestApplication application;
689   tet_infoline("Testing Dali::MeshActor::Blend08()");
690
691   Material material = ConstructMaterial(1.0f, 1.0f);
692   BufferImage image = BufferImage::New( 100, 50, Pixel::RGBA8888 );
693   material.SetDiffuseTexture( image );
694   application.SendNotification();
695   application.Render(0);
696
697   TestBlending( application, material, 0.5f, BlendingMode::AUTO, true );
698   END_TEST;
699 }
700
701 int UtcDaliMeshActorBlend09(void)
702 {
703   // Set material to have image with no alpha, set material opacity to 0.5, set use image alpha to true, set actor opacity to 1.0f
704   // Expect blending
705   TestApplication application;
706   tet_infoline("Testing Dali::MeshActor::Blend08()");
707
708   Material material = ConstructMaterial(0.5f, 1.0f);
709   BufferImage image = BufferImage::New( 100, 50, Pixel::RGB888 );
710   material.SetDiffuseTexture( image );
711   application.SendNotification();
712   application.Render(0);
713
714   TestBlending( application, material, 1.0f, BlendingMode::AUTO, true );
715   END_TEST;
716 }
717
718 // Test that bones update the mesh's bone transform uniforms
719 // (Removed old test - wasn't checking the above information, but instead the property
720 // info, which is tested elsewhere)
721
722 int UtcDaliMeshActorIndices(void)
723 {
724   TestApplication application;
725   Actor basicActor = Actor::New();
726   Mesh mesh = NewMesh();
727   MeshActor meshActor = MeshActor::New(mesh);
728
729   Property::IndexContainer indices;
730   meshActor.GetPropertyIndices( indices );
731   DALI_TEST_CHECK( indices.size() == basicActor.GetPropertyCount() ); // Mesh Actor does not have any properties
732   DALI_TEST_EQUALS( indices.size(), meshActor.GetPropertyCount(), TEST_LOCATION );
733   END_TEST;
734 }
735
736 int UtcDaliAnimatableMeshActorIndices(void)
737 {
738   TestApplication application;
739   Actor basicActor = Actor::New();
740   AnimatableMesh mesh = NewAnimatableMesh();
741   MeshActor meshActor = MeshActor::New(mesh);
742
743   Property::IndexContainer indices;
744   meshActor.GetPropertyIndices( indices );
745   DALI_TEST_CHECK( indices.size() == basicActor.GetPropertyCount() ); // Mesh Actor does not have any properties
746   DALI_TEST_EQUALS( indices.size(), meshActor.GetPropertyCount(), TEST_LOCATION );
747   END_TEST;
748 }