mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Fix API break in Fake classes must be named using Fake and the interface it fakes
It seems that the workaround is not necessary anymore.
This commit is contained in:
+1
-5
@@ -91,11 +91,7 @@ class KonsistClassNameTest {
|
|||||||
.replace("Fake", "")
|
.replace("Fake", "")
|
||||||
val result = (it.name.startsWith("Fake") || it.name.startsWith("FakeRust")) &&
|
val result = (it.name.startsWith("Fake") || it.name.startsWith("FakeRust")) &&
|
||||||
it.parents().any { parent ->
|
it.parents().any { parent ->
|
||||||
// Workaround to get the parent name. For instance:
|
val parentName = parent.name.replace(".", "")
|
||||||
// parent.name used to return `UserListPresenter.Factory` but is now returning `Factory`.
|
|
||||||
// So we need to retrieve the name of the parent class differently.
|
|
||||||
val packageName = parent.packagee!!.name
|
|
||||||
val parentName = parent.fullyQualifiedName!!.substringAfter("$packageName.").replace(".", "")
|
|
||||||
parentName == interfaceName
|
parentName == interfaceName
|
||||||
}
|
}
|
||||||
if (!result && it.name in failingCasesList) {
|
if (!result && it.name in failingCasesList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user