Skip to content

Commit

Permalink
removed unnecessary test summary (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Solidsilver authored Dec 27, 2024
1 parent afc23ae commit 11cb260
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import IfExpression from "!!raw-loader!./03.if-expression.zig";
Zig's if statements accept `bool` values (i.e. `true` or `false`). Unlike languages
like C or Javascript, there are no values that implicitly coerce to bool values.

Here, we will introduce testing. Save the below code and compile + run it with
`zig test file-name.zig`. We will be using the
[`expect`](https://ziglang.org/documentation/master/std/#std.testing.expect)
function from the standard library, which will cause the test to fail if it's
given the value `false`. When a test fails, the error and stack trace will be
shown.

<CodeBlock language="zig">{Expect}</CodeBlock>

If statements also work as expressions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ import IfExpression from "!!raw-loader!./03.if-expression.zig";
Zig's if statements accept `bool` values (i.e. `true` or `false`). Unlike languages
like C or Javascript, there are no values that implicitly coerce to bool values.

Here, we will introduce testing. Save the below code and compile + run it with
`zig test file-name.zig`. We will be using the
[`expect`](https://ziglang.org/documentation/master/std/#std.testing.expect)
function from the standard library, which will cause the test to fail if it's
given the value `false`. When a test fails, the error and stack trace will be
shown.

<CodeBlock language="zig">{Expect}</CodeBlock>

If statements also work as expressions.
Expand Down

0 comments on commit 11cb260

Please sign in to comment.