1d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein/*
2d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * Copyright (C) 2013 The Android Open Source Project
3d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein *
4d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * Licensed under the Apache License, Version 2.0 (the "License");
5d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * you may not use this file except in compliance with the License.
6d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * You may obtain a copy of the License at
7d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein *
8d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein *      http://www.apache.org/licenses/LICENSE-2.0
9d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein *
10d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * Unless required by applicable law or agreed to in writing, software
11d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * distributed under the License is distributed on an "AS IS" BASIS,
12d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * See the License for the specific language governing permissions and
14d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein * limitations under the License.
15d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein */
16d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein
17d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Kleinpackage android.graphics;
18d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein
19d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Kleinimport android.test.suitebuilder.annotation.SmallTest;
20aad8ae3e3d2befab6f800f62b90cd669b029ab60sergeyv
21d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Kleinimport junit.framework.TestCase;
22d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein
23d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein
24d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Kleinpublic class PathTest extends TestCase {
25d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein
26d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein    @SmallTest
27d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein    public void testResetPreservesFillType() throws Exception {
28d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein        Path path = new Path();
29d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein
30d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein        final Path.FillType defaultFillType = path.getFillType();
31d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein        final Path.FillType fillType = Path.FillType.INVERSE_EVEN_ODD;
32d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein        assertFalse(fillType.equals(defaultFillType));  // Sanity check for the test itself.
33d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein
34d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein        path.setFillType(fillType);
35d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein        path.reset();
36d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein        assertEquals(path.getFillType(), fillType);
37d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein    }
38d0f379c1976c600313f1f4c39f2587a649e3a4fcMike Klein}
39