---
title: "assertPositionInRootIsEqualTo"
description: "Asserts that the layout of this node has position in the root composable that is equal to the given position."
type: "function"
lastmod: "2026-06-18T10:32:52.428522Z"
---
## API Reference

### assertPositionInRootIsEqualTo

> Source set: Android

```kotlin
@CanIgnoreReturnValue
public fun SubspaceSemanticsNodeInteraction.assertPositionInRootIsEqualTo(
    expectedX: Dp,
    expectedY: Dp,
    expectedZ: Dp,
): SubspaceSemanticsNodeInteraction
```

Asserts that the layout of this node has position in the root composable that is equal to the
given position.

#### Parameters

| | |
| --- | --- |
| expectedX | The x position to assert. |
| expectedY | The y position to assert. |
| expectedZ | The z position to assert. |
