Android plugin cli arguments test
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.myapp"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
|
||||
</manifest>
|
||||
@@ -0,0 +1,9 @@
|
||||
package android.app
|
||||
|
||||
public open class Activity {
|
||||
public open fun findViewById([suppress("UNUSED_PARAMETER")] id: Int): android.view.View = null!!
|
||||
}
|
||||
|
||||
public open class Fragment {
|
||||
public open fun getView(): android.view.View = null!!
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package android.view
|
||||
|
||||
public open class View {
|
||||
public open fun findViewById([suppress("UNUSED_PARAMETER")] id: Int): android.view.View = null!!
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package android.widget
|
||||
|
||||
public open class TextView : android.view.View() {
|
||||
public fun setText([suppress("UNUSED_PARAMETER")] text: String) {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<TextView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content" />
|
||||
@@ -0,0 +1,12 @@
|
||||
-d
|
||||
$TEMP_DIR$
|
||||
-Xplugin
|
||||
dist/kotlinc/lib/android-compiler-plugin.jar
|
||||
-P
|
||||
plugin:org.jetbrains.kotlin.android:androidManifest=$TESTDATA_DIR$/androidPlugin/AndroidManifest.xml
|
||||
-P
|
||||
plugin:org.jetbrains.kotlin.android:androidRes=$TESTDATA_DIR$/androidPlugin/res
|
||||
$TESTDATA_DIR$/pluginSimple.kt
|
||||
$TESTDATA_DIR$/androidPlugin/androidApp.kt
|
||||
$TESTDATA_DIR$/androidPlugin/androidView.kt
|
||||
$TESTDATA_DIR$/androidPlugin/androidWidget.kt
|
||||
@@ -0,0 +1,8 @@
|
||||
import android.view.*
|
||||
import android.app.*
|
||||
import android.widget.*
|
||||
import kotlinx.android.synthetic.layout.*
|
||||
|
||||
class MyActivity : Activity() {
|
||||
init { textView.setText("Some text") }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
OK
|
||||
@@ -72,4 +72,9 @@ public class CliCommonTest extends CliBaseTest {
|
||||
public void suppressAllWarningsJS() throws Exception {
|
||||
executeCompilerCompareOutputJS();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pluginSimple() throws Exception {
|
||||
executeCompilerCompareOutputJVM();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,18 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
|
||||
doJvmTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("pluginSimple.args")
|
||||
public void testPluginSimple() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/pluginSimple.args");
|
||||
doJvmTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("pluginSimpleUsage.args")
|
||||
public void testPluginSimpleUsage() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/pluginSimpleUsage.args");
|
||||
doJvmTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("signatureClash.args")
|
||||
public void testSignatureClash() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/cli/jvm/signatureClash.args");
|
||||
|
||||
Reference in New Issue
Block a user