Fix Android gutterIcon test, use findGuttersAtCaret method
This commit is contained in:
+2
-2
@@ -52,11 +52,11 @@ abstract class AbstractAndroidGutterIconTest : KotlinAndroidTestCase() {
|
||||
val sourceFile = myFixture.copyFileToProject(path, "src/${PathUtil.getFileName(path)}")
|
||||
myFixture.configureFromExistingVirtualFile(sourceFile)
|
||||
|
||||
val gutter = myFixture.findAllGutters().find {
|
||||
val gutter = myFixture.findGuttersAtCaret().find {
|
||||
when {
|
||||
drawable -> it.icon is ImageIcon
|
||||
color != null -> (it.icon as? ColorIcon)?.iconColor == color
|
||||
else -> error("COLOR or DRAWABLE must be defined!")
|
||||
else -> true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,4 +3,4 @@ package com.myapp
|
||||
|
||||
import android.content.Context
|
||||
|
||||
<caret>fun Context.getPrimaryColor() = resources.getColor(R.color.colorAccent, null)
|
||||
fun Context.getPrimaryColor() = resources.getColor(R.color.<caret>colorAccent, null)
|
||||
+1
-1
@@ -3,4 +3,4 @@ package com.myapp
|
||||
|
||||
import android.content.Context
|
||||
|
||||
<caret>fun Context.getAddIcon() = resources.getDrawable(R.drawable.test_icon, null)
|
||||
fun Context.getAddIcon() = resources.getDrawable(R.drawable.<caret>test_icon, null)
|
||||
+1
-1
@@ -3,4 +3,4 @@ package com.myapp
|
||||
|
||||
import android.content.Context
|
||||
|
||||
<caret>fun Context.getAddIcon() = resources.getDrawable(R.mipmap.test_icon, null)
|
||||
fun Context.getAddIcon() = resources.getDrawable(R.mipmap.<caret>test_icon, null)
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// COLOR: 0,0,0
|
||||
import android.content.Context
|
||||
|
||||
<caret>fun getBlackColor() = android.R.color.black
|
||||
fun getBlackColor() = android.R.color.<caret>black
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// DRAWABLE
|
||||
import android.content.Context
|
||||
|
||||
fun <caret>Context.getAddIcon() = resources.getDrawable(android.R.drawable.ic_menu_add, null)
|
||||
fun Context.getAddIcon() = resources.getDrawable(android.R.drawable.<caret>ic_menu_add, null)
|
||||
Reference in New Issue
Block a user