blob: 491769df9337bb82198f93bf8c0f163ad897f36e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package com.mapbox.mapboxsdk.lint
import com.android.tools.lint.checks.infrastructure.TestFiles.java
import com.android.tools.lint.checks.infrastructure.TestLintTask.lint
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class KeepDetectorTest {
@Test
fun correctClassName() {
lint()
.allowMissingSdk()
.files(java("""
|package foo;
|
|import android.support.annotation.Keep;
|
|@Keep
|class TestClass {
|}""".trimMargin()))
.issues(KeepDetector.ISSUE_NOT_KEPT)
.run()
.expectClean()
}
}
|