1/*
2 * Copyright (C) 2016 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
17package android.uirendering.cts.testclasses;
18
19import android.support.test.filters.MediumTest;
20import android.support.test.runner.AndroidJUnit4;
21import android.uirendering.cts.R;
22import android.uirendering.cts.bitmapcomparers.MSSIMComparer;
23import android.uirendering.cts.bitmapverifiers.GoldenImageVerifier;
24import android.uirendering.cts.testinfrastructure.ActivityTestBase;
25
26import org.junit.Test;
27import org.junit.runner.RunWith;
28
29@MediumTest
30@RunWith(AndroidJUnit4.class)
31public class ShapeTests extends ActivityTestBase {
32    @Test
33    public void testDashedOval() {
34        createTest()
35                .addLayout(R.layout.frame_layout,
36                        view -> view.setBackgroundResource(R.drawable.dashed_oval))
37                .runWithVerifier(new GoldenImageVerifier(getActivity(),
38                        R.drawable.golden_dashed_oval, new MSSIMComparer(0.99)));
39    }
40}
41