[NUI] Write comments for Matrix and Matrix3
[platform/core/csapi/tizenfx.git] / test / Tizen.NUI.Devel.Tests.Ubuntu / Tizen.NUI.Devel.Tests / testcase / public / Common / TSMatrix3.cs
1 using global::System;
2 using NUnit.Framework;
3 using NUnit.Framework.TUnit;
4 using Tizen.NUI;
5
6 namespace Tizen.NUI.Devel.Tests
7 {
8     using tlog = Tizen.Log;
9
10     [TestFixture]
11     [Description("public/Common/Matrix3")]
12     public class Matrix3Test
13     {
14         private const string tag = "NUITEST";
15
16         [SetUp]
17         public void Init()
18         {
19             tlog.Info(tag, "Init() is called!");
20         }
21
22         [TearDown]
23         public void Destroy()
24         {
25             tlog.Info(tag, "Destroy() is called!");
26         }
27
28         [Test]
29         [Category("P1")]
30         [Description("Matrix3 constructor.")]
31         [Property("SPEC", "Tizen.NUI.Matrix3.Matrix3 C")]
32         [Property("SPEC_URL", "-")]
33         [Property("CRITERIA", "CONSTR")]
34         [Property("AUTHOR", "guowei.wang@samsung.com")]
35         public void Matrix3Constructor()
36         {
37             tlog.Debug(tag, $"Matrix3Constructor START");
38
39             var testingTarget = new Matrix3();
40             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
41             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
42
43             testingTarget.Dispose();
44             tlog.Debug(tag, $"Matrix3Constructor END (OK)");
45         }
46
47         [Test]
48         [Category("P1")]
49         [Description("Matrix3 constructor. With Martrix")]
50         [Property("SPEC", "Tizen.NUI.Matrix3.Matrix3 C")]
51         [Property("SPEC_URL", "-")]
52         [Property("CRITERIA", "CONSTR")]
53         [Property("AUTHOR", "guowei.wang@samsung.com")]
54         public void Matrix3ConstructorWithMartrix()
55         {
56             tlog.Debug(tag, $"Matrix3ConstructorWithMartrix START");
57
58             using (Matrix matrix = new Matrix())
59             {
60                 var testingTarget = new Matrix3(matrix);
61                 Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
62                 Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
63
64                 testingTarget.Dispose();
65             }
66
67             tlog.Debug(tag, $"Matrix3ConstructorWithMartrix END (OK)");
68         }
69
70         [Test]
71         [Category("P1")]
72         [Description("Matrix3 constructor. With Martrix3")]
73         [Property("SPEC", "Tizen.NUI.Matrix3.Matrix3 C")]
74         [Property("SPEC_URL", "-")]
75         [Property("CRITERIA", "CONSTR")]
76         [Property("AUTHOR", "guowei.wang@samsung.com")]
77         public void Matrix3ConstructorWithMartrix3()
78         {
79             tlog.Debug(tag, $"Matrix3ConstructorWithMartrix3 START");
80
81             using (Matrix3 matrix = new Matrix3(0.0f, 0.1f, 0.2f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f))
82             {
83                 var testingTarget = new Matrix3(matrix);
84                 Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
85                 Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
86
87                 testingTarget.Dispose();
88             }
89
90             tlog.Debug(tag, $"Matrix3ConstructorWithMartrix3 END (OK)");
91         }
92
93         [Test]
94         [Category("P1")]
95         [Description("Matrix3 Identity.")]
96         [Property("SPEC", "Tizen.NUI.Matrix3.Identity A")]
97         [Property("SPEC_URL", "-")]
98         [Property("CRITERIA", "PRO")]
99         [Property("AUTHOR", "guowei.wang@samsung.com")]
100         public void Matrix3Identity()
101         {
102             tlog.Debug(tag, $"Matrix3Identity START");
103
104             try
105             {
106                 var result = Matrix3.Identity;
107                 tlog.Debug(tag, "Identity : " + result);
108             }
109             catch (Exception e)
110             {
111                 tlog.Debug(tag, e.Message.ToString());
112                 Assert.Fail("Caught Exception : Failed!");
113             }
114
115             tlog.Debug(tag, $"Matrix3Identity END (OK)");
116         }
117
118         [Test]
119         [Category("P1")]
120         [Description("Matrix3 Assign.")]
121         [Property("SPEC", "Tizen.NUI.Matrix3.Assign M")]
122         [Property("SPEC_URL", "-")]
123         [Property("CRITERIA", "MR")]
124         [Property("AUTHOR", "guowei.wang@samsung.com")]
125         public void Matrix3Assign()
126         {
127             tlog.Debug(tag, $"Matrix3Assign START");
128
129             using (Matrix3 matrix = new Matrix3(0.0f, 0.1f, 0.2f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f))
130             {
131                 var testingTarget = matrix.Assign(matrix);
132                 Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
133                 Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
134
135                 testingTarget.Dispose();
136             }
137
138             tlog.Debug(tag, $"Matrix3Assign END (OK)");
139         }
140
141         [Test]
142         [Category("P1")]
143         [Description("Matrix3 Assign. With Matrix.")]
144         [Property("SPEC", "Tizen.NUI.Matrix3.Assign M")]
145         [Property("SPEC_URL", "-")]
146         [Property("CRITERIA", "MR")]
147         [Property("AUTHOR", "guowei.wang@samsung.com")]
148         public void Matrix3AssignWithMatrix()
149         {
150             tlog.Debug(tag, $"Matrix3AssignWithMatrix START");
151
152             using (Matrix3 matrix3 = new Matrix3(0.0f, 0.1f, 0.2f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f))
153             {
154                 using (Matrix matrix = new Matrix(true))
155                 {
156                     var testingTarget = matrix3.Assign(matrix);
157                     Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
158                     Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
159
160                     testingTarget.Dispose();
161                 }
162             }
163
164             tlog.Debug(tag, $"Matrix3AssignWithMatrix END (OK)");
165         }
166
167         [Test]
168         [Category("P1")]
169         [Description("Matrix3 EqualTo.")]
170         [Property("SPEC", "Tizen.NUI.Matrix3.EqualTo M")]
171         [Property("SPEC_URL", "-")]
172         [Property("CRITERIA", "MR")]
173         [Property("AUTHOR", "guowei.wang@samsung.com")]
174         public void Matrix3EqualTo()
175         {
176             tlog.Debug(tag, $"Matrix3EqualTo START");
177
178             var testingTarget = new Matrix3();
179             Assert.IsNotNull(testingTarget, "Can't create success object Matrix.");
180             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix instance.");
181
182             using (Matrix3 matrix3 = new Matrix3(0.0f, 0.1f, 0.2f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f))
183             {
184                 var result = testingTarget.EqualTo(matrix3);
185                 tlog.Debug(tag, "EqualTo : " + result);
186                 Assert.AreEqual(false, result, "EqualTo should be false");
187             }
188
189             testingTarget.Dispose();
190             tlog.Debug(tag, $"MatrixEqualTo END (OK)");
191         }
192
193         [Test]
194         [Category("P1")]
195         [Description("Matrix3 NotEqualTo.")]
196         [Property("SPEC", "Tizen.NUI.Matrix3.NotEqualTo M")]
197         [Property("SPEC_URL", "-")]
198         [Property("CRITERIA", "MR")]
199         [Property("AUTHOR", "guowei.wang@samsung.com")]
200         public void Matrix3NotEqualTo()
201         {
202             tlog.Debug(tag, $"Matrix3NotEqualTo START");
203
204             var testingTarget = new Matrix3();
205             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
206             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
207
208             using (Matrix3 matrix3 = new Matrix3(0.0f, 0.1f, 0.2f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f))
209             {
210                 var result = testingTarget.NotEqualTo(matrix3);
211                 tlog.Debug(tag, "NotEqualTo : " + result);
212                 Assert.AreEqual(true, result, "NotEqualTo should be true");
213             }
214
215             testingTarget.Dispose();
216             tlog.Debug(tag, $"Matrix3NotEqualTo END (OK)");
217         }
218
219         [Test]
220         [Category("P1")]
221         [Description("Matrix3 SetIdentity.")]
222         [Property("SPEC", "Tizen.NUI.Matrix3.SetIdentity M")]
223         [Property("SPEC_URL", "-")]
224         [Property("CRITERIA", "MR")]
225         [Property("AUTHOR", "guowei.wang@samsung.com")]
226         public void Matrix3SetIdentity()
227         {
228             tlog.Debug(tag, $"Matrix3SetIdentity START");
229
230             var testingTarget = new Matrix3();
231             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
232             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
233
234             try
235             {
236                 testingTarget.SetIdentity();
237             }
238             catch (Exception e)
239             {
240                 tlog.Debug(tag, e.Message.ToString());
241                 Assert.Fail("Caught Exception : Failed!");
242             }
243
244             testingTarget.Dispose();
245             tlog.Debug(tag, $"Matrix3SetIdentity END (OK)");
246         }
247
248         [Test]
249         [Category("P1")]
250         [Description("Matrix3 Invert.")]
251         [Property("SPEC", "Tizen.NUI.Matrix3.Invert M")]
252         [Property("SPEC_URL", "-")]
253         [Property("CRITERIA", "MR")]
254         [Property("AUTHOR", "guowei.wang@samsung.com")]
255         public void Matrix3Invert()
256         {
257             tlog.Debug(tag, $"Matrix3Invert START");
258
259             // Initialize as invertable matrix
260             var testingTarget = new Matrix3(1.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 3.0f);
261             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
262             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
263
264             var result = testingTarget.Invert();
265             tlog.Debug(tag, "Invert :" + result);
266             Assert.AreEqual(true, result, "Invert should be successed");
267
268             testingTarget.Dispose();
269             tlog.Debug(tag, $"Matrix3Invert END (OK)");
270         }
271
272         [Test]
273         [Category("P1")]
274         [Description("Matrix3 Transpose.")]
275         [Property("SPEC", "Tizen.NUI.Matrix3.Transpose M")]
276         [Property("SPEC_URL", "-")]
277         [Property("CRITERIA", "MR")]
278         [Property("AUTHOR", "guowei.wang@samsung.com")]
279         public void Matrix3Transpose()
280         {
281             tlog.Debug(tag, $"Matrix3Transpose START");
282
283             var testingTarget = new Matrix3();
284             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
285             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
286
287             var result = testingTarget.Transpose();
288             tlog.Debug(tag, "Transpose : " + result);
289
290             testingTarget.Dispose();
291             tlog.Debug(tag, $"Matrix3Transpose END (OK)");
292         }
293
294         [Test]
295         [Category("P1")]
296         [Description("Matrix3 Scale.")]
297         [Property("SPEC", "Tizen.NUI.Matrix3.Scale M")]
298         [Property("SPEC_URL", "-")]
299         [Property("CRITERIA", "MR")]
300         [Property("AUTHOR", "guowei.wang@samsung.com")]
301         public void Matrix3Scale()
302         {
303             tlog.Debug(tag, $"Matrix3Scale START");
304
305             var testingTarget = new Matrix3();
306             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
307             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
308
309             try
310             {
311                 testingTarget.Scale(0.3f);
312             }
313             catch (Exception e)
314             {
315                 tlog.Debug(tag, e.Message.ToString());
316                 Assert.Fail("Caught Exception : Failed!");
317             }
318
319             testingTarget.Dispose();
320             tlog.Debug(tag, $"Matrix3Scale END (OK)");
321         }
322
323         [Test]
324         [Category("P1")]
325         [Description("Matrix3 Magnitude.")]
326         [Property("SPEC", "Tizen.NUI.Matrix3.Magnitude M")]
327         [Property("SPEC_URL", "-")]
328         [Property("CRITERIA", "MR")]
329         [Property("AUTHOR", "guowei.wang@samsung.com")]
330         public void Matrix3Magnitude()
331         {
332             tlog.Debug(tag, $"Matrix3Magnitude START");
333
334             var testingTarget = new Matrix3();
335             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
336             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
337
338             var result = testingTarget.Magnitude();
339             tlog.Debug(tag, "Magnitude : " + result);
340
341             testingTarget.Dispose();
342             tlog.Debug(tag, $"Matrix3Magnitude END (OK)");
343         }
344
345         [Test]
346         [Category("P1")]
347         [Description("Matrix3 ScaledInverseTranspose.")]
348         [Property("SPEC", "Tizen.NUI.Matrix3.ScaledInverseTranspose M")]
349         [Property("SPEC_URL", "-")]
350         [Property("CRITERIA", "MR")]
351         [Property("AUTHOR", "guowei.wang@samsung.com")]
352         public void Matrix3ScaledInverseTranspose()
353         {
354             tlog.Debug(tag, $"Matrix3ScaledInverseTranspose START");
355
356             var testingTarget = new Matrix3();
357             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
358             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
359
360             var result = testingTarget.ScaledInverseTranspose();
361             tlog.Debug(tag, "ScaledInverseTranspose : " + result);
362
363             testingTarget.Dispose();
364             tlog.Debug(tag, $"Matrix3ScaledInverseTranspose END (OK)");
365         }
366
367         [Test]
368         [Category("P1")]
369         [Description("Matrix3 Multiply.")]
370         [Property("SPEC", "Tizen.NUI.Matrix3.Multiply M")]
371         [Property("SPEC_URL", "-")]
372         [Property("CRITERIA", "MR")]
373         [Property("AUTHOR", "guowei.wang@samsung.com")]
374         public void Matrix3Multiply()
375         {
376             tlog.Debug(tag, $"Matrix3Multiply START");
377
378             var testingTarget = new Matrix3();
379             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
380             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
381
382             using (Matrix3 lhs = new Matrix3())
383             {
384                 using (Matrix3 rhs = new Matrix3(0.0f, 0.1f, 0.2f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f))
385                 {
386                     try
387                     {
388                         Matrix3.Multiply(testingTarget, lhs, rhs);
389                     }
390                     catch (Exception e)
391                     {
392                         tlog.Debug(tag, e.Message.ToString());
393                         Assert.Fail("Caught Exception : Failed!");
394                     }
395                 }
396             }
397
398             testingTarget.Dispose();
399             tlog.Debug(tag, $"Matrix3Multiply END (OK)");
400         }
401
402         [Test]
403         [Category("P1")]
404         [Description("Matrix3 MultiplyAssign.")]
405         [Property("SPEC", "Tizen.NUI.Matrix3.MultiplyAssign M")]
406         [Property("SPEC_URL", "-")]
407         [Property("CRITERIA", "MR")]
408         [Property("AUTHOR", "eunkiki.hong@samsung.com")]
409         public void Matrix3MultiplyAssign()
410         {
411             tlog.Debug(tag, $"Matrix3MultiplyAssign START");
412
413             var testingTarget = new Matrix3();
414             Assert.IsNotNull(testingTarget, "Can't create success object Matrix3.");
415             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix3 instance.");
416
417             using (Matrix3 rhs = new Matrix3(0.0f, 0.1f, 0.2f, 1.0f, 1.1f, 1.2f, 2.0f, 2.1f, 2.2f))
418             {
419                 try
420                 {
421                     testingTarget.MultiplyAssign(rhs);
422                 }
423                 catch (Exception e)
424                 {
425                     tlog.Debug(tag, e.Message.ToString());
426                     Assert.Fail("Caught Exception : Failed!");
427                 }
428             }
429
430             testingTarget.Dispose();
431             tlog.Debug(tag, $"Matrix3MultiplyAssign END (OK)");
432         }
433
434
435         [Test]
436         [Category("P1")]
437         [Description("Matrix ValueOfIndex with signle index.")]
438         [Property("SPEC", "Tizen.NUI.Matrix.ValueOfIndex M")]
439         [Property("SPEC_URL", "-")]
440         [Property("CRITERIA", "MR")]
441         [Property("AUTHOR", "Eunki Hong, eunkiki.hong@samsung.com")]
442         public void Matrix3ValueOfIndexSingleIndex()
443         {
444             /* TEST CODE */
445             tlog.Debug(tag, $"Matrix3ValueOfIndexSingleIndex START");
446
447             Matrix3 testingTarget = new Matrix3(0.0f, 1.0f, 2.0f, 0.1f, 1.1f, 2.1f, 0.2f, 1.2f, 2.2f);
448             Assert.IsNotNull(testingTarget, "Can't create success object Matrix.");
449             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix instance.");
450
451             for(uint index = 0; index < 9; ++index)
452             {
453                 float expectResult = (index / 3) * 0.1f + (index % 3) * 1.0f;
454                 Assert.AreEqual(expectResult, testingTarget.ValueOfIndex(index), "The value of index is not correct!");
455             }
456             testingTarget.Dispose();
457             tlog.Debug(tag, $"Matrix3ValueOfIndexSingleIndex END (OK)");
458         }
459
460         [Test]
461         [Category("P1")]
462         [Description("Matrix3 ValueOfIndex with double index.")]
463         [Property("SPEC", "Tizen.NUI.Matrix3.ValueOfIndex M")]
464         [Property("SPEC_URL", "-")]
465         [Property("CRITERIA", "MR")]
466         [Property("AUTHOR", "Eunki Hong, eunkiki.hong@samsung.com")]
467         public void Matrix3ValueOfIndexDoubleIndex()
468         {
469             /* TEST CODE */
470             tlog.Debug(tag, $"Matrix3ValueOfIndexDoubleIndex START");
471
472             Matrix3 testingTarget = new Matrix3(0.0f, 1.0f, 2.0f, 0.1f, 1.1f, 2.1f, 0.2f, 1.2f, 2.2f);
473             Assert.IsNotNull(testingTarget, "Can't create success object Matrix.");
474             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix instance.");
475
476             for(uint indexRow = 0; indexRow < 3; ++indexRow)
477             {
478                 for(uint indexColumn = 0; indexColumn < 3; ++indexColumn)
479                 {
480                     float expectResult = indexColumn * 0.1f + indexRow * 1.0f;
481                     Assert.AreEqual(expectResult, testingTarget.ValueOfIndex(indexRow, indexColumn), "The value of index is not correct!");
482                 }
483             }
484             testingTarget.Dispose();
485             tlog.Debug(tag, $"Matrix3ValueOfIndexDoubleIndex END (OK)");
486         }
487
488         [Test]
489         [Category("P1")]
490         [Description("Matrix3 SetValueAtIndex with signle index.")]
491         [Property("SPEC", "Tizen.NUI.Matrix3.SetValueAtIndex M")]
492         [Property("SPEC_URL", "-")]
493         [Property("CRITERIA", "MR")]
494         [Property("AUTHOR", "Eunki Hong, eunkiki.hong@samsung.com")]
495         public void Matrix3SetValueAtIndexSingleIndex()
496         {
497             /* TEST CODE */
498             tlog.Debug(tag, $"Matrix3SetValueAtIndexSingleIndex START");
499             Matrix3 testingTarget = new Matrix3();
500             Assert.IsNotNull(testingTarget, "Can't create success object Matrix.");
501             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix instance.");
502
503             for(uint index = 0; index < 9; ++index)
504             {
505                 float expectResult = (index / 3) * 0.1f + (index % 3) * 1.0f;
506                 testingTarget.SetValueAtIndex(index, expectResult);
507                 Assert.AreEqual(expectResult, testingTarget[index], "The value of index is not correct!");
508             }
509             testingTarget.Dispose();
510             tlog.Debug(tag, $"Matrix3SetValueAtIndexSingleIndex END (OK)");
511         }
512
513         [Test]
514         [Category("P1")]
515         [Description("Matrix3 SetValueAtIndex with double index.")]
516         [Property("SPEC", "Tizen.NUI.Matrix3.SetValueAtIndex M")]
517         [Property("SPEC_URL", "-")]
518         [Property("CRITERIA", "MR")]
519         [Property("AUTHOR", "Eunki Hong, eunkiki.hong@samsung.com")]
520         public void Matrix3SetValueAtIndexDoubleIndex()
521         {
522             /* TEST CODE */
523             tlog.Debug(tag, $"Matrix3SetValueAtIndexDoubleIndex START");
524             Matrix3 testingTarget = new Matrix3();
525             Assert.IsNotNull(testingTarget, "Can't create success object Matrix.");
526             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix instance.");
527
528             for(uint indexRow = 0; indexRow < 3; ++indexRow)
529             {
530                 for(uint indexColumn = 0; indexColumn < 3; ++indexColumn)
531                 {
532                     float expectResult = indexColumn * 0.1f + indexRow * 1.0f;
533                     testingTarget.SetValueAtIndex(indexRow, indexColumn, expectResult);
534                     Assert.AreEqual(expectResult, testingTarget.ValueOfIndex(indexRow, indexColumn), "The value of index is not correct!");
535                 }
536             }
537             testingTarget.Dispose();
538             tlog.Debug(tag, $"Matrix3SetValueAtIndexDoubleIndex END (OK)");
539         }
540
541         [Test]
542         [Category("P1")]
543         [Description("Test Tizen.NUI.Matrix3.operator * with Matrix3.")]
544         [Property("SPEC", "Tizen.NUI.Matrix3.operator *() A")]
545         [Property("SPEC_URL", "-")]
546         [Property("CRITERIA", "MR")]
547         [Property("AUTHOR", "Eunki Hong, eunkiki.hong@samsung.com")]
548         public void Matrix3MultiplyOperator()
549         {
550             /* TEST CODE */
551             tlog.Debug(tag, $"Matrix3MultiplyOperator START");
552             Matrix3 testingTarget = new Matrix3();
553             Assert.IsNotNull(testingTarget, "Can't create success object Matrix.");
554             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix instance.");
555
556             try
557             {
558                 Matrix3 rhs = new Matrix3(1.0f, 0.0f, 0.0f, 0.0f, 2.0f, 0.0f, 0.0f, 0.0f, 3.0f);
559                 Matrix3 ret = testingTarget * rhs;
560                 rhs.Dispose();
561                 ret.Dispose();
562             }
563             catch (Exception e)
564             {
565                 tlog.Debug(tag, e.Message.ToString());
566                 Assert.Fail("Caught Exception : Failed!");
567             }
568             testingTarget.Dispose();
569             tlog.Debug(tag, $"Matrix3MultiplyOperator END (OK)");
570         }
571
572         [Test]
573         [Category("P1")]
574         [Description("Test Tizen.NUI.Matrix3.operator * with Vector3.")]
575         [Property("SPEC", "Tizen.NUI.Matrix3.operator *() A")]
576         [Property("SPEC_URL", "-")]
577         [Property("CRITERIA", "MR")]
578         [Property("AUTHOR", "Eunki Hong, eunkiki.hong@samsung.com")]
579         public void Matrix3MultiplyOperatorWithVector3()
580         {
581             /* TEST CODE */
582             tlog.Debug(tag, $"Matrix3MultiplyOperatorWithVector3 START");
583             Matrix3 testingTarget = new Matrix3();
584             Assert.IsNotNull(testingTarget, "Can't create success object Matrix.");
585             Assert.IsInstanceOf<Matrix3>(testingTarget, "Should return Matrix instance.");
586
587             try
588             {
589                 Vector3 rhs = new Vector3();
590                 Vector3 ret = testingTarget * rhs;
591                 rhs.Dispose();
592                 ret.Dispose();
593             }
594             catch (Exception e)
595             {
596                 tlog.Debug(tag, e.Message.ToString());
597                 Assert.Fail("Caught Exception : Failed!");
598             }
599             testingTarget.Dispose();
600             tlog.Debug(tag, $"Matrix3MultiplyOperatorWithVector4 END (OK)");
601         }
602
603         [Test]
604         [Category("P1")]
605         [Description("Test this[uint index]. Check whether this[uint index] returns expected value or not.")]
606         [Property("SPEC", "Tizen.NUI.Matrix3.this[uint] A")]
607         [Property("SPEC_URL", "-")]
608         [Property("CRITERIA", "MR")]
609         [Property("AUTHOR", "Eunki Hong, eunkiki.hong@samsung.com")]
610         public void this_SET_GET_VALUE()
611         {
612             /* TEST CODE */
613             tlog.Debug(tag, $"Matrix3this_SET_GET_VALUE START");
614             Matrix3 testingTarget = new Matrix3();
615             try
616             {
617                 testingTarget[0] = 100.0f;
618                 testingTarget[1] = 200.0f;
619             }
620             catch (Exception e)
621             {
622                 tlog.Debug(tag, e.Message.ToString());
623                 Assert.Fail("Caught Exception : Failed!");
624             }
625             Assert.AreEqual(100.0f, testingTarget[0], "The value of index[0] is not correct!");
626             Assert.AreEqual(200.0f, testingTarget[1], "The value of index[1] is not correct!");
627             testingTarget.Dispose();
628             tlog.Debug(tag, $"Matrix3this_SET_GET_VALUE END (OK)");
629         }
630     }
631 }