diff options
author | Mike Klein <mtklein@google.com> | 2013-10-02 10:37:49 -0400 |
---|---|---|
committer | Mike Klein <mtklein@google.com> | 2013-10-07 21:04:47 +0000 |
commit | d0f379c1976c600313f1f4c39f2587a649e3a4fc (patch) | |
tree | 367e1eba6b813b5ccf77af90c3a9f5320205bd2a /graphics/tests | |
parent | 00fb27dda8c74229ea55b524063410842ba4a21e (diff) | |
download | frameworks_base-d0f379c1976c600313f1f4c39f2587a649e3a4fc.zip frameworks_base-d0f379c1976c600313f1f4c39f2587a649e3a4fc.tar.gz frameworks_base-d0f379c1976c600313f1f4c39f2587a649e3a4fc.tar.bz2 |
Preserve fill type in Path.reset().
Bug: 10838355
Change-Id: I7bdecb945fc35dfed02d37745678ae7bda906628
Diffstat (limited to 'graphics/tests')
-rw-r--r-- | graphics/tests/graphicstests/src/android/graphics/PathTest.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/graphics/tests/graphicstests/src/android/graphics/PathTest.java b/graphics/tests/graphicstests/src/android/graphics/PathTest.java new file mode 100644 index 0000000..96200bc --- /dev/null +++ b/graphics/tests/graphicstests/src/android/graphics/PathTest.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2013 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package android.graphics; + +import android.test.suitebuilder.annotation.SmallTest; +import junit.framework.TestCase; + + +public class PathTest extends TestCase { + + @SmallTest + public void testResetPreservesFillType() throws Exception { + Path path = new Path(); + + final Path.FillType defaultFillType = path.getFillType(); + final Path.FillType fillType = Path.FillType.INVERSE_EVEN_ODD; + assertFalse(fillType.equals(defaultFillType)); // Sanity check for the test itself. + + path.setFillType(fillType); + path.reset(); + assertEquals(path.getFillType(), fillType); + } +} |