Skip to content

Commit

Permalink
readme: Add test results
Browse files Browse the repository at this point in the history
  • Loading branch information
ibokuri committed Nov 27, 2023
1 parent 440e045 commit 6de3c6a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,24 @@ test {
// Require that `value` is not null.
try require.notNull(value);
// Since `value` cannot be null, we can safely unwrap it
// and validate its payload.
// Since `value` cannot be null, safely unwrap it and check its payload.
try require.equal("Foobar", value.?);
}
```

```
run test: error: 'test_0' failed:
Error: Not equal:
expected: "Foobar"
actual: "Barfoo"
Error Trace:
/tmp/example/src/main.zig:14:5: 0x1048a5027 in test_0 (test)
try require.equal("Foobar", value.?);
^
```

## Installation

1. Declare Protest as a dependency in `build.zig.zon`:
Expand Down

0 comments on commit 6de3c6a

Please sign in to comment.