---
title: "ExitStatus.exitCode(_:)"
framework: testing
role: symbol
role_heading: Case
path: "testing/exitstatus/exitcode(_:)"
---

# ExitStatus.exitCode(_:)

The process exited with the given exit code.

## Declaration

```swift
case exitCode(CInt)
```

## Parameters

- `exitCode`: The exit code reported by the process.

## Discussion

Discussion The C programming language defines two standard exit codes, EXIT_SUCCESS and EXIT_FAILURE. Platforms may additionally define their own non-standard exit codes:  |   |   |   |   |   |  On macOS, FreeBSD, OpenBSD, and Windows, the full exit code reported by the process is reported to the parent process. Linux and other POSIX-like systems may only reliably report the low unsigned 8 bits (0–255) of the exit code.
