<!--
{
  "documentType" : "article",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/comparable-value-assertions",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Comparable Value Assertions"
}
-->

# Comparable Value Assertions

Compare two values to determine whether one is larger or smaller than the other.

## Topics

### Tests for Comparable Values

[`XCTAssertGreaterThan(_:_:_:file:line:)`](/documentation/XCTest/XCTAssertGreaterThan(_:_:_:file:line:))

Asserts that the value of the first expression is greater than the value of the second expression.

[`XCTAssertGreaterThanOrEqual(_:_:_:file:line:)`](/documentation/XCTest/XCTAssertGreaterThanOrEqual(_:_:_:file:line:))

Asserts that the value of the first expression is greater than or equal to the value of the second expression.

[`XCTAssertLessThanOrEqual(_:_:_:file:line:)`](/documentation/XCTest/XCTAssertLessThanOrEqual(_:_:_:file:line:))

Asserts that the value of the first expression is less than or equal to the value of the second expression.

[`XCTAssertLessThan(_:_:_:file:line:)`](/documentation/XCTest/XCTAssertLessThan(_:_:_:file:line:))

Asserts that the value of the first expression is less than the value of the second expression.

[`XCTAssertGreaterThan`](/documentation/XCTest/XCTAssertGreaterThan)

Asserts that the value of the first expression is greater than the value of the second expression.

[`XCTAssertGreaterThanOrEqual`](/documentation/XCTest/XCTAssertGreaterThanOrEqual)

Asserts that the value of the first expression is greater than or equal to the value of the second expression.

[`XCTAssertLessThanOrEqual`](/documentation/XCTest/XCTAssertLessThanOrEqual)

Asserts that the value of the first expression is less than or equal to the value of the second expression.

[`XCTAssertLessThan`](/documentation/XCTest/XCTAssertLessThan)

Asserts that the value of the first expression is less than the value of the second expression.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)