| author | |
| committer | |
| log | 14422e0312b3df271bfb60e8a6233afb128354fc |
| tree | 4cf7fc78760db1488505651c0829fd0989508c62 |
| parent | 6b2d06710c52c348aa01b62007a2e990b47eee72 |
6 files changed, 27 insertions(+), 33 deletions(-)
test/cases3/disabled_export.zig deleted-8| ... | ... | @@ -1,8 +0,0 @@ |
| 1 | export fn disabledExternFn() { | |
| 2 | @setFnVisible(this, false); | |
| 3 | } | |
| 4 | ||
| 5 | fn callDisabledExternFn() { | |
| 6 | @setFnTest(this); | |
| 7 | disabledExternFn(); | |
| 8 | } |
test/cases3/empty_fn_with_comments.zig deleted-6| ... | ... | @@ -1,6 +0,0 @@ |
| 1 | // normal comment | |
| 2 | /// this is a documentation comment | |
| 3 | /// doc comment line 2 | |
| 4 | fn emptyFunctionWithComments() { | |
| 5 | @setFnTest(this); | |
| 6 | } |
test/cases3/generics.zig+10| ... | ... | @@ -40,6 +40,16 @@ fn fnWithInlineArgs() { |
| 40 | 40 | assert(sameButWithFloats(0.43, 0.49) == 0.49); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | fn inlinedLoop() { | |
| 44 | @setFnTest(this); | |
| 45 | ||
| 46 | inline var i = 0; | |
| 47 | inline var sum = 0; | |
| 48 | inline while (i <= 5; i += 1) | |
| 49 | sum += i; | |
| 50 | assert(sum == 15); | |
| 51 | } | |
| 52 | ||
| 43 | 53 | |
| 44 | 54 | // TODO const assert = @import("std").debug.assert; |
| 45 | 55 | fn assert(ok: bool) { |
test/cases3/inlined_loop.zig deleted-16| ... | ... | @@ -1,16 +0,0 @@ |
| 1 | ||
| 2 | fn inlinedLoop() { | |
| 3 | @setFnTest(this); | |
| 4 | ||
| 5 | inline var i = 0; | |
| 6 | inline var sum = 0; | |
| 7 | inline while (i <= 5; i += 1) | |
| 8 | sum += i; | |
| 9 | assert(sum == 15); | |
| 10 | } | |
| 11 | ||
| 12 | // TODO const assert = @import("std").debug.assert; | |
| 13 | fn assert(ok: bool) { | |
| 14 | if (!ok) | |
| 15 | @unreachable(); | |
| 16 | } |
test/cases3/misc.zig+17| ... | ... | @@ -1,3 +1,20 @@ |
| 1 | // normal comment | |
| 2 | /// this is a documentation comment | |
| 3 | /// doc comment line 2 | |
| 4 | fn emptyFunctionWithComments() { | |
| 5 | @setFnTest(this); | |
| 6 | } | |
| 7 | ||
| 8 | export fn disabledExternFn() { | |
| 9 | @setFnVisible(this, false); | |
| 10 | } | |
| 11 | ||
| 12 | fn callDisabledExternFn() { | |
| 13 | @setFnTest(this); | |
| 14 | ||
| 15 | disabledExternFn(); | |
| 16 | } | |
| 17 | ||
| 1 | 18 | fn intTypeBuiltin() { |
| 2 | 19 | @setFnTest(this); |
| 3 | 20 |
test/self_hosted3.zig-3| ... | ... | @@ -1,7 +1,4 @@ |
| 1 | 1 | // TODO '_' identifier for unused variable bindings |
| 2 | const test_empty_fn_with_comments = @import("cases3/empty_fn_with_comments.zig"); | |
| 3 | const test_disabled_export = @import("cases3/disabled_export.zig"); | |
| 4 | const test_inlined_loop = @import("cases3/inlined_loop.zig"); | |
| 5 | 2 | const test_misc = @import("cases3/misc.zig"); |
| 6 | 3 | const test_switch = @import("cases3/switch.zig"); |
| 7 | 4 | const test_error = @import("cases3/error.zig"); |