# SpannedSubject.WithSpanFlags

# SpannedSubject.WithSpanFlags

Artifact:[androidx.media3:media3-test-utils](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/test/utils/truth/SpannedSubject.java+class:androidx.media3.test.utils.truth.SpannedSubject.WithSpanFlags)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/media3/test/utils/truth/SpannedSubject.WithSpanFlags "View this page in Java")

<br />

```
interface SpannedSubject.WithSpanFlags
```

<br />

*** ** * ** ***

Allows additional assertions to be made on the flags of matching spans.

Identical to[AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags), but this should be returned from`has...()`methods while[AndSpanFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.AndSpanFlags)should be returned from`with...()`methods.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [withFlags](https://developer.android.com/reference/kotlin/androidx/media3/test/utils/truth/SpannedSubject.WithSpanFlags#withFlags(int))`(flags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Checks that one of the matched spans has the expected`flags`. |

## Public functions

### withFlags

```
fun withFlags(flags: Int): Unit
```

Checks that one of the matched spans has the expected`flags`.  

|                                      Parameters                                      |
|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
| `flags: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The expected flags. See SPAN_\* constants on[Spanned](https://developer.android.com/reference/android/text/Spanned.html)for possible values. |