---
title: Expectation
framework: testing
role: symbol
role_heading: Structure
path: testing/expectation
---

# Expectation

A type describing an expectation that has been evaluated.

## Declaration

```swift
struct Expectation
```

## Topics

### Instance Properties

- [isPassing](testing/expectation/ispassing.md)
- [isRequired](testing/expectation/isrequired.md)
- [sourceLocation](testing/expectation/sourcelocation.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Retrieving information about checked expectations

- [ExpectationFailedError](testing/expectationfailederror.md)
