---
title: XCTAssertTrue
framework: xctest
role: symbol
role_heading: Macro
path: xctest/xctasserttrue
---

# XCTAssertTrue

Asserts that an expression is true.

## Declaration

```occ
#define XCTAssertTrue(expression, ...)
```

## Parameters

- `expression`: An expression of Boolean type.
- `…`: An optional description of the failure. A literal doc://com.apple.documentation/documentation/Foundation/NSString, optionally with string format specifiers.

## Discussion

Discussion This function generates a failure when expression == false and is equivalent to XCTAssert.

## See Also

### Tests for True Conditions

- [XCTAssert](xctest/xctassert.md)
