Fixed
Status Update
Comments
ki...@google.com <ki...@google.com>
ma...@gmail.com <ma...@gmail.com> #3
Hello,
Could you please confirm if the issue is resolved or not ?
ap...@google.com <ap...@google.com> #4
Error is not resolved, I have switched to GKE. Would like to figure out what is wrong with Vertex, because that would be the ideal platform.
Description
* Impl
* *********** */
/**
* Returns a [Sequence] walking up this view's [parent][View.getParent] hierarchy chain.
*/
val View.ancestors: Sequence<ViewParent>
get() = generateSequence(parent, ViewParent::getParent)
/* ***********
* Tests
* *********** */
@Test
fun ancestors_root() {
val actual = view.ancestors.toList()
val expected = emptyList<ViewParent>()
assertEquals(expected, actual)
}
@Test
fun ancestors() {
val parents = listOf(
FrameLayout(context),
LinearLayout(context),
RelativeLayout(context)
)
for ((parent, child) in parents.zipWithNext()) {
parent.addView(child)
}
parents.last().addView(view)
val expected = parents.reversed()
val actual = view.ancestors.toList()
assertEquals(expected, actual)
}