/*
 * Copyright 2017 The Error Prone Authors.
 *
 * 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 com.google.errorprone.bugpatterns.android;

import com.google.errorprone.CompilationTestHelper;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

/** Test cases for Android's @RestrictTo annotation. */
@RunWith(JUnit4.class)
public final class RestrictToEnforcerTest {

  private CompilationTestHelper compilationHelper;

  @Before
  public void setUp() {
    compilationHelper = CompilationTestHelper.newInstance(RestrictToEnforcer.class, getClass());
  }

  @Test
  public void testPositiveCases() throws Exception {
    compilationHelper
        .addSourceFile("RestrictToEnforcerPositiveCases.java")
        .addSourceFile("RestrictToEnforcerPositiveCasesApi.java")
        .doTest();
  }
}

@@ -1216,16 +1216,894 @@
 nHelper%0A
+        .addSourceLines(%0A            %22android/support/annotation/RestrictTo.java%22,%0A            %22package android.support.annotation;%22,%0A            %22import static java.lang.annotation.ElementType.ANNOTATION_TYPE;%22,%0A            %22import static java.lang.annotation.ElementType.CONSTRUCTOR;%22,%0A            %22import static java.lang.annotation.ElementType.FIELD;%22,%0A            %22import static java.lang.annotation.ElementType.METHOD;%22,%0A            %22import static java.lang.annotation.ElementType.PACKAGE;%22,%0A            %22import static java.lang.annotation.ElementType.TYPE;%22,%0A            %22import java.lang.annotation.Target;%22,%0A            %22@Target(%7BANNOTATION_TYPE,TYPE,METHOD,CONSTRUCTOR,FIELD,PACKAGE%7D)%22,%0A            %22public @interface RestrictTo %7B%22,%0A            %22  Scope%5B%5D value();%22,%0A            %22  enum Scope %7B LIBRARY, LIBRARY_GROUP, GROUP_ID, TESTS, SUBCLASSES %7D%22,%0A            %22%7D%22)%0A
         

Remove another use of the support library