---
title: XCTAssertNotIdentical
framework: xctest
role: symbol
role_heading: Macro
path: xctest/xctassertnotidentical
---

# XCTAssertNotIdentical

Asserts that two values aren’t identical.

## Declaration

```occ
#define XCTAssertNotIdentical(expression1, expression2, ...)
```

## Parameters

- `expression1`: An expression of type id.
- `expression2`: A second expression of type id.
- `…`: An optional description of a failure. A literal doc://com.apple.documentation/documentation/Foundation/NSString, optionally with string format specifiers.

## Discussion

Discussion Compare two values of type id. The values aren’t identical if they’re not the same instance.

## See Also

### Related Documentation

- [XCTAssertNotEqualObjects](xctest/xctassertnotequalobjects.md)

### Tests for Identical Objects

- [XCTAssertIdentical](xctest/xctassertidentical.md)
