aboutsummaryrefslogtreecommitdiff
path: root/test/cases/error.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-01-09 09:56:24 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-01-09 09:56:24 -0500
commitd1d3dbc7b5bc986849db476e491300ffd18d4db5 (patch)
tree8ab3bb2b5b8a82edf18caca6e28dc8e74ab81d11 /test/cases/error.zig
parent5a8d87f5042b5ab86de7c72df4ce84a314878e40 (diff)
parent3c094116aae459b651934663a31981cf09cdb3e4 (diff)
downloadzig-d1d3dbc7b5bc986849db476e491300ffd18d4db5.tar.gz
zig-d1d3dbc7b5bc986849db476e491300ffd18d4db5.zip
Merge branch 'master' into llvm6
Diffstat (limited to 'test/cases/error.zig')
-rw-r--r--test/cases/error.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/cases/error.zig b/test/cases/error.zig
index dbe96366d3..f4743082d9 100644
--- a/test/cases/error.zig
+++ b/test/cases/error.zig
@@ -16,7 +16,7 @@ pub fn baz() -> %i32 {
}
test "error wrapping" {
- assert(%%baz() == 15);
+ assert((baz() catch unreachable) == 15);
}
error ItBroke;
@@ -65,14 +65,14 @@ fn errBinaryOperatorG(x: bool) -> %isize {
test "unwrap simple value from error" {
- const i = %%unwrapSimpleValueFromErrorDo();
+ const i = unwrapSimpleValueFromErrorDo() catch unreachable;
assert(i == 13);
}
fn unwrapSimpleValueFromErrorDo() -> %isize { return 13; }
test "error return in assignment" {
- %%doErrReturnInAssignment();
+ doErrReturnInAssignment() catch unreachable;
}
fn doErrReturnInAssignment() -> %void {