aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/switch_prong_err_enum.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-05-08 14:45:21 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-05-08 14:45:21 -0700
commit5619ce2406a545e177882415195575463989066d (patch)
tree5c0e786d19054a56ae42272713de321e25d2efc8 /test/behavior/switch_prong_err_enum.zig
parent5cd9afc6b6cf33f650e5afc6b726b91dfb97e697 (diff)
parent67154d233ef68d9fd63e673e63e7d66f149060a5 (diff)
downloadzig-5619ce2406a545e177882415195575463989066d.tar.gz
zig-5619ce2406a545e177882415195575463989066d.zip
Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgen
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
Diffstat (limited to 'test/behavior/switch_prong_err_enum.zig')
-rw-r--r--test/behavior/switch_prong_err_enum.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/behavior/switch_prong_err_enum.zig b/test/behavior/switch_prong_err_enum.zig
index 3593eabb5a..b68f21df6f 100644
--- a/test/behavior/switch_prong_err_enum.zig
+++ b/test/behavior/switch_prong_err_enum.zig
@@ -22,9 +22,9 @@ fn doThing(form_id: u64) anyerror!FormValue {
test "switch prong returns error enum" {
switch (doThing(17) catch unreachable) {
FormValue.Address => |payload| {
- expect(payload == 1);
+ try expect(payload == 1);
},
else => unreachable,
}
- expect(read_count == 1);
+ try expect(read_count == 1);
}