• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008 The Android Open Source Project
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 package android.graphics.cts;
18 
19 import junit.framework.TestCase;
20 import android.graphics.Matrix;
21 import android.graphics.Path;
22 import android.graphics.RectF;
23 import dalvik.annotation.TestLevel;
24 import dalvik.annotation.TestTargetClass;
25 import dalvik.annotation.TestTargetNew;
26 import dalvik.annotation.TestTargets;
27 import dalvik.annotation.ToBeFixed;
28 
29 @TestTargetClass(Path.class)
30 public class PathTest extends TestCase {
31 
32     // Test constants
33     private static final float LEFT = 10.0f;
34     private static final float RIGHT = 50.0f;
35     private static final float TOP = 10.0f;
36     private static final float BOTTOM = 50.0f;
37     private static final float XCOORD = 40.0f;
38     private static final float YCOORD = 40.0f;
39 
40 	@TestTargets({
41         @TestTargetNew(
42             level = TestLevel.COMPLETE,
43             method = "Path",
44             args = {}
45         ),
46         @TestTargetNew(
47             level = TestLevel.COMPLETE,
48             method = "Path",
49             args = {android.graphics.Path.class}
50         )
51     })
testConstructor()52     public void testConstructor() {
53         // new the Path instance
54         new Path();
55 
56         // another the Path instance with different params
57         new Path(new Path());
58     }
59 
60     @TestTargets({
61         @TestTargetNew(
62             level = TestLevel.COMPLETE,
63             method = "addRect",
64             args = {android.graphics.RectF.class, android.graphics.Path.Direction.class}
65         ),
66         @TestTargetNew(
67             level = TestLevel.COMPLETE,
68             method = "isEmpty",
69             args = {}
70         )
71     })
testAddRect1()72     public void testAddRect1() {
73 
74         // new the Path instance
75         Path path = new Path();
76         assertTrue(path.isEmpty());
77         RectF rect = new RectF(LEFT, TOP, RIGHT, BOTTOM);
78         path.addRect(rect, Path.Direction.CW);
79         assertFalse(path.isEmpty());
80     }
81 
82     @TestTargets({
83         @TestTargetNew(
84             level = TestLevel.COMPLETE,
85             method = "addRect",
86             args = {float.class, float.class, float.class, float.class,
87                     android.graphics.Path.Direction.class}
88         ),
89         @TestTargetNew(
90             level = TestLevel.COMPLETE,
91             method = "isEmpty",
92             args = {}
93         )
94     })
testAddRect2()95     public void testAddRect2() {
96 
97         // new the Path instance
98         Path path = new Path();
99         assertTrue(path.isEmpty());
100         path.addRect(LEFT, TOP, RIGHT, BOTTOM, Path.Direction.CW);
101         assertFalse(path.isEmpty());
102     }
103 
104     @TestTargetNew(
105         level = TestLevel.COMPLETE,
106         method = "moveTo",
107         args = {float.class, float.class}
108     )
109     @ToBeFixed(bug = "1451096", explanation = "Test moveTo(float x, float y)." +
110             "When this method called, the current point will move to the" +
111             "appointed coordinate, but there is no more way to get known" +
112             "about whether current point is just in that coordinate correctly")
testMoveTo()113     public void testMoveTo() {
114         // new the Path instance
115         Path path = new Path();
116         path.moveTo(10.0f, 10.0f);
117     }
118 
119     @TestTargets({
120         @TestTargetNew(
121             level = TestLevel.COMPLETE,
122             method = "set",
123             args = {android.graphics.Path.class}
124         ),
125         @TestTargetNew(
126             level = TestLevel.COMPLETE,
127             method = "isEmpty",
128             args = {}
129         )
130     })
testSet()131     public void testSet() {
132         // new the Path instance
133         Path path = new Path();
134         assertTrue(path.isEmpty());
135         Path path1 = new Path();
136         setPath(path1);
137         path.set(path1);
138         assertFalse(path.isEmpty());
139     }
140 
141     @TestTargets({
142         @TestTargetNew(
143             level = TestLevel.COMPLETE,
144             method = "setFillType",
145             args = {android.graphics.Path.FillType.class}
146         ),
147         @TestTargetNew(
148             level = TestLevel.COMPLETE,
149             method = "getFillType",
150             args = {}
151         )
152     })
testAccessFillType()153     public void testAccessFillType() {
154         // set the expected value
155         Path.FillType expected1 = Path.FillType.EVEN_ODD;
156         Path.FillType expected2 = Path.FillType.INVERSE_EVEN_ODD;
157         Path.FillType expected3 = Path.FillType.INVERSE_WINDING;
158         Path.FillType expected4 = Path.FillType.WINDING;
159 
160         // new the Path instance
161         Path path = new Path();
162         // set FillType by {@link Path#setFillType(FillType)}
163         path.setFillType(Path.FillType.EVEN_ODD);
164         assertEquals(expected1, path.getFillType());
165         path.setFillType(Path.FillType.INVERSE_EVEN_ODD);
166         assertEquals(expected2, path.getFillType());
167         path.setFillType(Path.FillType.INVERSE_WINDING);
168         assertEquals(expected3, path.getFillType());
169         path.setFillType(Path.FillType.WINDING);
170         assertEquals(expected4, path.getFillType());
171     }
172 
173     @TestTargets({
174         @TestTargetNew(
175             level = TestLevel.COMPLETE,
176             method = "rQuadTo",
177             args = {float.class, float.class, float.class, float.class}
178         ),
179         @TestTargetNew(
180             level = TestLevel.COMPLETE,
181             method = "isEmpty",
182             args = {}
183         )
184     })
testRQuadTo()185     public void testRQuadTo() {
186         // new the Path instance
187         Path path = new Path();
188         assertTrue(path.isEmpty());
189         path.rQuadTo(5.0f, 5.0f, 10.0f, 10.0f);
190         assertFalse(path.isEmpty());
191     }
192 
193     @TestTargets({
194         @TestTargetNew(
195             level = TestLevel.COMPLETE,
196             method = "transform",
197             args = {android.graphics.Matrix.class, android.graphics.Path.class}
198         ),
199         @TestTargetNew(
200             level = TestLevel.COMPLETE,
201             method = "isEmpty",
202             args = {}
203         )
204     })
testTransform1()205     public void testTransform1() {
206         // new the Path instance
207         Path path = new Path();
208         assertTrue(path.isEmpty());
209         Path dst = new Path();
210         setPath(path);
211         path.transform(new Matrix(), dst);
212         assertFalse(dst.isEmpty());
213     }
214 
215     @TestTargetNew(
216         level = TestLevel.NOT_FEASIBLE,
217         method = "transform",
218         args = {android.graphics.Matrix.class}
219     )
220     @ToBeFixed(bug = "1451096", explanation = "The function of this method is" +
221               "almost the same as transform(Matrix matrix, Path dst) but no dst" +
222               "to show if it works when called, and we can't get any information" +
223               "in this method when called" )
testTransform2()224     public void testTransform2() {
225 
226     }
227 
228     @TestTargets({
229         @TestTargetNew(
230             level = TestLevel.COMPLETE,
231             method = "lineTo",
232             args = {float.class, float.class}
233         ),
234         @TestTargetNew(
235             level = TestLevel.COMPLETE,
236             method = "isEmpty",
237             args = {}
238         )
239     })
testLineTo()240     public void testLineTo() {
241         // new the Path instance
242         Path path = new Path();
243         assertTrue(path.isEmpty());
244         path.lineTo(XCOORD, YCOORD);
245         assertFalse(path.isEmpty());
246     }
247 
248     @TestTargetNew(
249         level = TestLevel.COMPLETE,
250         method = "close",
251         args = {}
252     )
253     @ToBeFixed(bug = "1451096", explanation = "What does 'close' mean, clear the " +
254             "contour or others? If clear, why the path is not empty when" +
255             "there is just one path.")
testClose()256     public void testClose() {
257         // new the Path instance
258         Path path = new Path();
259         assertTrue(path.isEmpty());
260         setPath(path);
261         path.close();
262     }
263 
264     @TestTargets({
265         @TestTargetNew(
266             level = TestLevel.COMPLETE,
267             method = "quadTo",
268             args = {float.class, float.class, float.class, float.class}
269         ),
270         @TestTargetNew(
271             level = TestLevel.COMPLETE,
272             method = "isEmpty",
273             args = {}
274         )
275     })
testQuadTo()276     public void testQuadTo() {
277         // new the Path instance
278         Path path = new Path();
279         assertTrue(path.isEmpty());
280         path.quadTo(20.0f, 20.0f, 40.0f, 40.0f);
281         assertFalse(path.isEmpty());
282     }
283 
284     @TestTargets({
285         @TestTargetNew(
286             level = TestLevel.COMPLETE,
287             method = "addCircle",
288             args = {float.class, float.class, float.class, android.graphics.Path.Direction.class}
289         ),
290         @TestTargetNew(
291             level = TestLevel.COMPLETE,
292             method = "isEmpty",
293             args = {}
294         )
295     })
testAddCircle()296     public void testAddCircle() {
297         // new the Path instance
298         Path path = new Path();
299         assertTrue(path.isEmpty());
300         path.addCircle(XCOORD, YCOORD, 10.0f, Path.Direction.CW);
301         assertFalse(path.isEmpty());
302     }
303 
304     @TestTargets({
305         @TestTargetNew(
306             level = TestLevel.COMPLETE,
307             method = "arcTo",
308             args = {android.graphics.RectF.class, float.class, float.class, boolean.class}
309         ),
310         @TestTargetNew(
311             level = TestLevel.COMPLETE,
312             method = "isEmpty",
313             args = {}
314         )
315     })
testArcTo1()316     public void testArcTo1() {
317         // new the Path instance
318         Path path = new Path();
319         assertTrue(path.isEmpty());
320         RectF oval = new RectF(LEFT, TOP, RIGHT, BOTTOM);
321         path.arcTo(oval, 0.0f, 30.0f, true);
322         assertFalse(path.isEmpty());
323     }
324 
325     @TestTargets({
326         @TestTargetNew(
327             level = TestLevel.COMPLETE,
328             method = "arcTo",
329             args = {android.graphics.RectF.class, float.class, float.class}
330         ),
331         @TestTargetNew(
332             level = TestLevel.COMPLETE,
333             method = "isEmpty",
334             args = {}
335         )
336     })
testArcTo2()337     public void testArcTo2() {
338         // new the Path instance
339         Path path = new Path();
340         assertTrue(path.isEmpty());
341         RectF oval = new RectF(LEFT, TOP, RIGHT, BOTTOM);
342         path.arcTo(oval, 0.0f, 30.0f);
343         assertFalse(path.isEmpty());
344     }
345 
346     @TestTargetNew(
347         level = TestLevel.COMPLETE,
348         method = "computeBounds",
349         args = {android.graphics.RectF.class, boolean.class}
350     )
testComputeBounds1()351     public void testComputeBounds1() {
352 
353         RectF expected = new RectF(0.0f, 0.0f, 0.0f, 0.0f);
354         // new the Path instance
355         Path path = new Path();
356         assertTrue(path.isEmpty());
357         RectF bounds = new RectF();
358         path.computeBounds(bounds, true);
359         assertEquals(expected.width(), bounds.width());
360         assertEquals(expected.height(), bounds.height());
361         path.computeBounds(bounds, false);
362         assertEquals(expected.width(), bounds.width());
363         assertEquals(expected.height(), bounds.height());
364     }
365 
366     @TestTargets({
367         @TestTargetNew(
368             level = TestLevel.COMPLETE,
369             method = "computeBounds",
370             args = {android.graphics.RectF.class, boolean.class}
371         ),
372         @TestTargetNew(
373             level = TestLevel.COMPLETE,
374             method = "addRect",
375             args = {android.graphics.RectF.class, android.graphics.Path.Direction.class}
376         )
377     })
testComputeBounds2()378     public void testComputeBounds2() {
379 
380         RectF expected = new RectF(LEFT, TOP, RIGHT, BOTTOM);
381         // new the Path instance
382         Path path = new Path();
383         assertTrue(path.isEmpty());
384         RectF bounds = new RectF(LEFT, TOP, RIGHT, BOTTOM);
385         path.addRect(bounds, Path.Direction.CW);
386         path.computeBounds(bounds, true);
387         assertEquals(expected.width(), bounds.width());
388         assertEquals(expected.height(), bounds.height());
389         path.computeBounds(bounds, false);
390         assertEquals(expected.width(), bounds.width());
391         assertEquals(expected.height(), bounds.height());
392     }
393 
394     @TestTargetNew(
395         level = TestLevel.COMPLETE,
396         method = "rMoveTo",
397         args = {float.class, float.class}
398     )
399     @ToBeFixed(bug = "1451096", explanation = "When this method called, the current" +
400             "point will move to the appointed coordinate, but there is no more" +
401             "way to get known about whether current point is just in that" +
402             "coordinate correctly")
testRMoveTo()403     public void testRMoveTo() {
404         // new the Path instance
405     }
406 
407     @TestTargetNew(
408         level = TestLevel.COMPLETE,
409         method = "setLastPoint",
410         args = {float.class, float.class}
411     )
412     @ToBeFixed(bug = "1451096", explanation = "When called, we can't" +
413               "get any useful information to make sure the point has been" +
414               "correctly set")
testSetLastPoint()415     public void testSetLastPoint() {
416         // new the Path instance
417         Path path = new Path();
418         path.setLastPoint(10.0f, 10.0f);
419     }
420 
421     @TestTargets({
422         @TestTargetNew(
423             level = TestLevel.COMPLETE,
424             method = "rLineTo",
425             args = {float.class, float.class}
426         ),
427         @TestTargetNew(
428             level = TestLevel.COMPLETE,
429             method = "isEmpty",
430             args = {}
431         )
432     })
testRLineTo()433     public void testRLineTo() {
434         // new the Path instance
435         Path path = new Path();
436         assertTrue(path.isEmpty());
437         path.rLineTo(10.0f, 10.0f);
438         assertFalse(path.isEmpty());
439     }
440 
441     @TestTargetNew(
442         level = TestLevel.COMPLETE,
443         method = "isEmpty",
444         args = {}
445     )
testIsEmpty()446     public void testIsEmpty() {
447 
448         // new the Path instance
449         Path path = new Path();
450         assertTrue(path.isEmpty());
451         setPath(path);
452         assertFalse(path.isEmpty());
453     }
454 
455     @TestTargets({
456         @TestTargetNew(
457             level = TestLevel.COMPLETE,
458             method = "rewind",
459             args = {}
460         ),
461         @TestTargetNew(
462             level = TestLevel.COMPLETE,
463             method = "isEmpty",
464             args = {}
465         )
466     })
testRewind()467     public void testRewind() {
468 
469         // set the expected value
470         Path.FillType expected = Path.FillType.EVEN_ODD;
471 
472         // new the Path instance
473         Path path = new Path();
474         assertTrue(path.isEmpty());
475         setPath(path);
476         path.rewind();
477         path.setFillType(Path.FillType.EVEN_ODD);
478         assertTrue(path.isEmpty());
479         assertEquals(expected, path.getFillType());
480     }
481 
482     @TestTargetNew(
483         level = TestLevel.COMPLETE,
484         method = "addOval",
485         args = {android.graphics.RectF.class, android.graphics.Path.Direction.class}
486     )
testAddOval()487     public void testAddOval() {
488         // new the Path instance
489         Path path = new Path();
490         assertTrue(path.isEmpty());
491         RectF oval = new RectF(LEFT, TOP, RIGHT, BOTTOM);
492         path.addOval(oval, Path.Direction.CW);
493         assertFalse(path.isEmpty());
494     }
495 
496     @TestTargetNew(
497         level = TestLevel.PARTIAL,
498         method = "isRect",
499         args = {android.graphics.RectF.class}
500     )
501     @ToBeFixed(bug = "1451096", explanation = "what does 'specify' in the note of " +
502               "this method mean? The return always is false, is it correct?")
testIsRect()503     public void testIsRect() {
504 
505         // new the Path instance
506         Path path = new Path();
507         assertTrue(path.isEmpty());
508         setPath(path);
509     }
510 
511     @TestTargetNew(
512         level = TestLevel.NOT_FEASIBLE,
513         method = "incReserve",
514         args = {int.class}
515     )
516     @ToBeFixed(bug = "1451096", explanation = "Maybe this method has little" +
517               "obvious behavior to test")
testIncReserve()518     public void testIncReserve() {
519     }
520 
521     @TestTargets({
522         @TestTargetNew(
523             level = TestLevel.COMPLETE,
524             method = "addPath",
525             args = {android.graphics.Path.class, float.class, float.class}
526         ),
527         @TestTargetNew(
528             level = TestLevel.COMPLETE,
529             method = "isEmpty",
530             args = {}
531         )
532     })
testAddPath1()533     public void testAddPath1() {
534         // new the Path instance
535         Path path = new Path();
536         assertTrue(path.isEmpty());
537         Path src = new Path();
538         setPath(src);
539         path.addPath(src, 10.0f, 10.0f);
540         assertFalse(path.isEmpty());
541     }
542 
543     @TestTargets({
544         @TestTargetNew(
545             level = TestLevel.COMPLETE,
546             method = "addPath",
547             args = {android.graphics.Path.class}
548         ),
549         @TestTargetNew(
550             level = TestLevel.COMPLETE,
551             method = "isEmpty",
552             args = {}
553         )
554     })
testAddPath2()555     public void testAddPath2() {
556         // new the Path instance
557         Path path = new Path();
558         assertTrue(path.isEmpty());
559         Path src = new Path();
560         setPath(src);
561         path.addPath(src);
562         assertFalse(path.isEmpty());
563     }
564 
565     @TestTargets({
566         @TestTargetNew(
567             level = TestLevel.COMPLETE,
568             method = "addPath",
569             args = {android.graphics.Path.class, android.graphics.Matrix.class}
570         ),
571         @TestTargetNew(
572             level = TestLevel.COMPLETE,
573             method = "isEmpty",
574             args = {}
575         )
576     })
testAddPath3()577     public void testAddPath3() {
578         // new the Path instance
579         Path path = new Path();
580         assertTrue(path.isEmpty());
581         Path src = new Path();
582         setPath(src);
583         Matrix matrix = new Matrix();
584         path.addPath(src, matrix);
585         assertFalse(path.isEmpty());
586     }
587 
588     @TestTargets({
589         @TestTargetNew(
590             level = TestLevel.COMPLETE,
591             method = "addRoundRect",
592             args = {android.graphics.RectF.class, float.class, float.class,
593                     android.graphics.Path.Direction.class}
594         ),
595         @TestTargetNew(
596             level = TestLevel.COMPLETE,
597             method = "isEmpty",
598             args = {}
599         )
600     })
testAddRoundRect1()601     public void testAddRoundRect1() {
602         // new the Path instance
603         Path path = new Path();
604         assertTrue(path.isEmpty());
605         RectF rect = new RectF(LEFT, TOP, RIGHT, BOTTOM);
606         path.addRoundRect(rect, XCOORD, YCOORD, Path.Direction.CW);
607         assertFalse(path.isEmpty());
608     }
609 
610     @TestTargets({
611         @TestTargetNew(
612             level = TestLevel.COMPLETE,
613             method = "addRoundRect",
614             args = {android.graphics.RectF.class, float[].class,
615                     android.graphics.Path.Direction.class}
616         ),
617         @TestTargetNew(
618             level = TestLevel.COMPLETE,
619             method = "isEmpty",
620             args = {}
621         )
622     })
testAddRoundRect2()623     public void testAddRoundRect2() {
624         // new the Path instance
625         Path path = new Path();
626         assertTrue(path.isEmpty());
627         RectF rect = new RectF(LEFT, TOP, RIGHT, BOTTOM);
628         float[] radii = new float[8];
629         for (int i = 0; i < 8; i++) {
630             radii[i] = 10.0f + i * 5.0f;
631         }
632         path.addRoundRect(rect, radii, Path.Direction.CW);
633         assertFalse(path.isEmpty());
634     }
635 
636     @TestTargets({
637         @TestTargetNew(
638             level = TestLevel.COMPLETE,
639             method = "isInverseFillType",
640             args = {}
641         ),
642         @TestTargetNew(
643             level = TestLevel.COMPLETE,
644             method = "setFillType",
645             args = {android.graphics.Path.FillType.class}
646         )
647     })
testIsInverseFillType()648     public void testIsInverseFillType() {
649 
650         // new the Path instance
651         Path path = new Path();
652         assertFalse(path.isInverseFillType());
653         path.setFillType(Path.FillType.INVERSE_EVEN_ODD);
654         assertTrue(path.isInverseFillType());
655     }
656 
657     @TestTargetNew(
658         level = TestLevel.COMPLETE,
659         method = "offset",
660         args = {float.class, float.class, android.graphics.Path.class}
661     )
testOffset1()662     public void testOffset1() {
663         // new the Path instance
664         Path path = new Path();
665         assertTrue(path.isEmpty());
666         setPath(path);
667         Path dst = new Path();
668         path.offset(XCOORD, YCOORD, dst);
669         assertFalse(dst.isEmpty());
670     }
671 
672     @TestTargetNew(
673         level = TestLevel.COMPLETE,
674         method = "offset",
675         args = {float.class, float.class}
676     )
677     @ToBeFixed(bug = "1451096", explanation = "The function of this method is" +
678               "almost the same as offset(float dx, float dy, Path dst) but no dst" +
679               "to show if it works when called, and we can't get any information" +
680               "in this method when called")
testOffset2()681     public void testOffset2() {
682         // new the Path instance
683     }
684 
685     @TestTargets({
686         @TestTargetNew(
687             level = TestLevel.COMPLETE,
688             method = "cubicTo",
689             args = {float.class, float.class, float.class, float.class, float.class, float.class}
690         ),
691         @TestTargetNew(
692             level = TestLevel.COMPLETE,
693             method = "isEmpty",
694             args = {}
695         )
696     })
testCubicTo()697     public void testCubicTo() {
698         // new the Path instance
699         Path path = new Path();
700         assertTrue(path.isEmpty());
701         path.cubicTo(10.0f, 10.0f, 20.0f, 20.0f, 30.0f, 30.0f);
702         assertFalse(path.isEmpty());
703     }
704 
705     @TestTargets({
706         @TestTargetNew(
707             level = TestLevel.COMPLETE,
708             method = "reset",
709             args = {}
710         ),
711         @TestTargetNew(
712             level = TestLevel.COMPLETE,
713             method = "addRect",
714             args = {android.graphics.RectF.class, android.graphics.Path.Direction.class}
715         ),
716         @TestTargetNew(
717             level = TestLevel.COMPLETE,
718             method = "set",
719             args = {android.graphics.Path.class}
720         ),
721         @TestTargetNew(
722             level = TestLevel.COMPLETE,
723             method = "isEmpty",
724             args = {}
725         )
726     })
testReset()727     public void testReset() {
728         // new the Path instance
729         Path path = new Path();
730         assertTrue(path.isEmpty());
731         Path path1 = new Path();
732         setPath(path1);
733         path.set(path1);
734         assertFalse(path.isEmpty());
735         path.reset();
736         assertTrue(path.isEmpty());
737     }
738 
739     @TestTargets({
740         @TestTargetNew(
741             level = TestLevel.COMPLETE,
742             method = "toggleInverseFillType",
743             args = {}
744         ),
745         @TestTargetNew(
746             level = TestLevel.COMPLETE,
747             method = "isInverseFillType",
748             args = {}
749         )
750     })
testToggleInverseFillType()751     public void testToggleInverseFillType() {
752         // new the Path instance
753         Path path = new Path();
754         assertTrue(path.isEmpty());
755         path.toggleInverseFillType();
756         assertTrue(path.isInverseFillType());
757     }
758 
759     @TestTargets({
760         @TestTargetNew(
761             level = TestLevel.COMPLETE,
762             method = "addArc",
763             args = {android.graphics.RectF.class, float.class, float.class}
764         ),
765         @TestTargetNew(
766             level = TestLevel.COMPLETE,
767             method = "isEmpty",
768             args = {}
769         )
770     })
testAddArc()771     public void testAddArc() {
772         // new the Path instance
773         Path path = new Path();
774         assertTrue(path.isEmpty());
775         RectF oval = new RectF(LEFT, TOP, RIGHT, BOTTOM);
776         path.addArc(oval, 0.0f, 30.0f);
777         assertFalse(path.isEmpty());
778     }
779 
780     @TestTargets({
781         @TestTargetNew(
782             level = TestLevel.COMPLETE,
783             method = "rCubicTo",
784             args = {float.class, float.class, float.class, float.class, float.class, float.class}
785         ),
786         @TestTargetNew(
787             level = TestLevel.COMPLETE,
788             method = "isEmpty",
789             args = {}
790         )
791     })
testRCubicTo()792     public void testRCubicTo() {
793         // new the Path instance
794         Path path = new Path();
795         assertTrue(path.isEmpty());
796         path.rCubicTo(10.0f, 10.0f, 11.0f, 11.0f, 12.0f, 12.0f);
797         assertFalse(path.isEmpty());
798     }
799 
setPath(Path path)800     private void setPath(Path path) {
801         RectF rect = new RectF(LEFT, TOP, RIGHT, BOTTOM);
802         path.addRect(rect, Path.Direction.CW);
803     }
804 }
805