Add JS specific proto comparison test
This commit is contained in:
@@ -1232,6 +1232,7 @@ fun main(args: Array<String>) {
|
||||
|
||||
testClass<AbstractJsProtoComparisonTest> {
|
||||
commonProtoComparisonTests()
|
||||
model("comparison/jsOnly", extension = null, excludeParentDirs = true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
@@ -272,4 +272,19 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("jps-plugin/testData/comparison/jsOnly")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class JsOnly extends AbstractJsProtoComparisonTest {
|
||||
public void testAllFilesPresentInJsOnly() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/jsOnly"), Pattern.compile("^([^\\.]+)$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("externals")
|
||||
public void testExternals() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/jsOnly/externals/");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package test
|
||||
|
||||
external class ExternalClass {
|
||||
fun addedExternalFun()
|
||||
val addedExternalVal: Int
|
||||
}
|
||||
|
||||
external class ClassBecameExternal
|
||||
class ClassBecameNonExternal
|
||||
|
||||
external fun addedExternalFun()
|
||||
external val addedExternalVal: Int
|
||||
|
||||
external fun funBecameExternal()
|
||||
fun funBecameNonExternal() {}
|
||||
@@ -0,0 +1,15 @@
|
||||
package test
|
||||
|
||||
external class ExternalClass {
|
||||
fun removedExternalFun()
|
||||
val removedExternalVal: Int
|
||||
}
|
||||
|
||||
class ClassBecameExternal
|
||||
external class ClassBecameNonExternal
|
||||
|
||||
external fun removedExternalFun()
|
||||
external val removedExternalVal: Int
|
||||
|
||||
fun funBecameExternal() {}
|
||||
external fun funBecameNonExternal()
|
||||
@@ -0,0 +1,10 @@
|
||||
PROTO DIFFERENCE in test/ClassBecameExternal: FLAGS
|
||||
CHANGES in test/ClassBecameExternal: CLASS_SIGNATURE
|
||||
PROTO DIFFERENCE in test/ClassBecameNonExternal: FLAGS
|
||||
CHANGES in test/ClassBecameNonExternal: CLASS_SIGNATURE
|
||||
PROTO DIFFERENCE in test/ExternalClass: FUNCTION_LIST, PROPERTY_LIST
|
||||
CHANGES in test/ExternalClass: MEMBERS
|
||||
[addedExternalFun, addedExternalVal, removedExternalFun, removedExternalVal]
|
||||
PROTO DIFFERENCE in test/MainKt: FUNCTION_LIST, PROPERTY_LIST
|
||||
CHANGES in test/MainKt: MEMBERS
|
||||
[addedExternalFun, addedExternalVal, funBecameExternal, funBecameNonExternal, removedExternalFun, removedExternalVal]
|
||||
Reference in New Issue
Block a user