aboutsummaryrefslogtreecommitdiff
path: root/test/cases/switch_prong_err_enum.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/cases/switch_prong_err_enum.zig')
-rw-r--r--test/cases/switch_prong_err_enum.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/cases/switch_prong_err_enum.zig b/test/cases/switch_prong_err_enum.zig
index cb8c864357..fb7b2e2832 100644
--- a/test/cases/switch_prong_err_enum.zig
+++ b/test/cases/switch_prong_err_enum.zig
@@ -14,16 +14,18 @@ enum FormValue {
Other: bool,
}
-#static_eval_enable(false)
fn doThing(form_id: u64) -> %FormValue {
+ @setFnStaticEval(this, false);
+
return switch (form_id) {
17 => FormValue.Address { %return readOnce() },
else => error.InvalidDebugInfo,
}
}
-#attribute("test")
fn switchProngReturnsErrorEnum() {
+ @setFnTest(this, true);
+
%%doThing(17);
assert(read_count == 1);
}