| author | |
| committer | |
| log | 4c78142af1259adc79ad3e803a58f1d48d8e633d |
| tree | be4d7c08cbb58dc623d19fe822b2197a62ed3f30 |
| parent | bc0a60c7a6e772a40fc19becd46f89f34f502759 |
5 files changed, 15 insertions(+), 15 deletions(-)
test/cases/fn.zig+7-7| ... | ... | @@ -8,7 +8,7 @@ fn testParamsAdd(a: i32, b: i32) -> i32 { |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | 10 | |
| 11 | test "localVariables" { | |
| 11 | test "local variables" { | |
| 12 | 12 | testLocVars(2); |
| 13 | 13 | } |
| 14 | 14 | fn testLocVars(b: i32) { |
| ... | ... | @@ -17,7 +17,7 @@ fn testLocVars(b: i32) { |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | |
| 20 | test "voidParameters" { | |
| 20 | test "void parameters" { | |
| 21 | 21 | voidFun(1, void{}, 2, {}); |
| 22 | 22 | } |
| 23 | 23 | fn voidFun(a: i32, b: void, c: i32, d: void) { |
| ... | ... | @@ -28,7 +28,7 @@ fn voidFun(a: i32, b: void, c: i32, d: void) { |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | |
| 31 | test "mutableLocalVariables" { | |
| 31 | test "mutable local variables" { | |
| 32 | 32 | var zero : i32 = 0; |
| 33 | 33 | assert(zero == 0); |
| 34 | 34 | |
| ... | ... | @@ -39,7 +39,7 @@ test "mutableLocalVariables" { |
| 39 | 39 | assert(i == 3); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | test "separateBlockScopes" { | |
| 42 | test "separate block scopes" { | |
| 43 | 43 | { |
| 44 | 44 | const no_conflict : i32 = 5; |
| 45 | 45 | assert(no_conflict == 5); |
| ... | ... | @@ -52,7 +52,7 @@ test "separateBlockScopes" { |
| 52 | 52 | assert(c == 10); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | test "callFnWithEmptyString" { | |
| 55 | test "call function with empty string" { | |
| 56 | 56 | acceptsString(""); |
| 57 | 57 | } |
| 58 | 58 | |
| ... | ... | @@ -66,7 +66,7 @@ test "weird function name" { |
| 66 | 66 | assert(@"weird function name"() == 1234); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | test "implicitCastFnUnreachableReturn" { | |
| 69 | test "implicit cast function unreachable return" { | |
| 70 | 70 | wantsFnWithVoid(fnWithUnreachable); |
| 71 | 71 | } |
| 72 | 72 | |
| ... | ... | @@ -77,7 +77,7 @@ fn fnWithUnreachable() -> noreturn { |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | |
| 80 | test "functionPointers" { | |
| 80 | test "function pointers" { | |
| 81 | 81 | const fns = []@typeOf(fn1) { fn1, fn2, fn3, fn4, }; |
| 82 | 82 | for (fns) |f, i| { |
| 83 | 83 | assert(f() == u32(i) + 5); |
test/cases/for.zig+3-3| ... | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const assert = std.debug.assert; |
| 3 | 3 | const mem = std.mem; |
| 4 | 4 | |
| 5 | test "continueInForLoop" { | |
| 5 | test "continue in for loop" { | |
| 6 | 6 | const array = []i32 {1, 2, 3, 4, 5}; |
| 7 | 7 | var sum : i32 = 0; |
| 8 | 8 | for (array) |x| { |
| ... | ... | @@ -15,7 +15,7 @@ test "continueInForLoop" { |
| 15 | 15 | if (sum != 6) unreachable |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | test "forLoopWithPointerElemVar" { | |
| 18 | test "for loop with pointer elem var" { | |
| 19 | 19 | const source = "abcdefg"; |
| 20 | 20 | var target: [source.len]u8 = undefined; |
| 21 | 21 | mem.copy(u8, target[0..], source); |
| ... | ... | @@ -28,7 +28,7 @@ fn mangleString(s: []u8) { |
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | test "basicForLoop" { | |
| 31 | test "basic for loop" { | |
| 32 | 32 | const expected_result = []u8{9, 8, 7, 6, 0, 1, 2, 3, 9, 8, 7, 6, 0, 1, 2, 3 }; |
| 33 | 33 | |
| 34 | 34 | var buffer: [expected_result.len]u8 = undefined; |
test/cases/goto.zig+2-2| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const assert = @import("std").debug.assert; |
| 2 | 2 | |
| 3 | test "gotoAndLabels" { | |
| 3 | test "goto and labels" { | |
| 4 | 4 | gotoLoop(); |
| 5 | 5 | assert(goto_counter == 10); |
| 6 | 6 | } |
| ... | ... | @@ -19,7 +19,7 @@ var goto_counter: i32 = 0; |
| 19 | 19 | |
| 20 | 20 | |
| 21 | 21 | |
| 22 | test "gotoLeaveDeferScope" { | |
| 22 | test "goto leave defer scope" { | |
| 23 | 23 | testGotoLeaveDeferScope(true); |
| 24 | 24 | } |
| 25 | 25 | fn testGotoLeaveDeferScope(b: bool) { |
test/cases/if.zig+2-2| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const assert = @import("std").debug.assert; |
| 2 | 2 | |
| 3 | test "ifStatements" { | |
| 3 | test "if statements" { | |
| 4 | 4 | shouldBeEqual(1, 1); |
| 5 | 5 | firstEqlThird(2, 1, 2); |
| 6 | 6 | } |
| ... | ... | @@ -24,7 +24,7 @@ fn firstEqlThird(a: i32, b: i32, c: i32) { |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | |
| 27 | test "elseIfExpression" { | |
| 27 | test "else if expression" { | |
| 28 | 28 | assert(elseIfExpressionF(1) == 1); |
| 29 | 29 | } |
| 30 | 30 | fn elseIfExpressionF(c: u8) -> u8 { |
test/cases/import.zig+1-1| ... | ... | @@ -1,6 +1,6 @@ |
| 1 | 1 | const assert = @import("std").debug.assert; |
| 2 | 2 | const a_namespace = @import("import/a_namespace.zig"); |
| 3 | 3 | |
| 4 | test "callFnViaNamespaceLookup" { | |
| 4 | test "call fn via namespace lookup" { | |
| 5 | 5 | assert(a_namespace.foo() == 1234); |
| 6 | 6 | } |