authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-09 22:53:32-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-09 22:53:32-04:00
log4c78142af1259adc79ad3e803a58f1d48d8e633d
treebe4d7c08cbb58dc623d19fe822b2197a62ed3f30
parentbc0a60c7a6e772a40fc19becd46f89f34f502759

rename some behavior tests


5 files changed, 15 insertions(+), 15 deletions(-)

test/cases/fn.zig+7-7
......@@ -8,7 +8,7 @@ fn testParamsAdd(a: i32, b: i32) -> i32 {
88}
99
1010
11test "localVariables" {
11test "local variables" {
1212 testLocVars(2);
1313}
1414fn testLocVars(b: i32) {
......@@ -17,7 +17,7 @@ fn testLocVars(b: i32) {
1717}
1818
1919
20test "voidParameters" {
20test "void parameters" {
2121 voidFun(1, void{}, 2, {});
2222}
2323fn voidFun(a: i32, b: void, c: i32, d: void) {
......@@ -28,7 +28,7 @@ fn voidFun(a: i32, b: void, c: i32, d: void) {
2828}
2929
3030
31test "mutableLocalVariables" {
31test "mutable local variables" {
3232 var zero : i32 = 0;
3333 assert(zero == 0);
3434
......@@ -39,7 +39,7 @@ test "mutableLocalVariables" {
3939 assert(i == 3);
4040}
4141
42test "separateBlockScopes" {
42test "separate block scopes" {
4343 {
4444 const no_conflict : i32 = 5;
4545 assert(no_conflict == 5);
......@@ -52,7 +52,7 @@ test "separateBlockScopes" {
5252 assert(c == 10);
5353}
5454
55test "callFnWithEmptyString" {
55test "call function with empty string" {
5656 acceptsString("");
5757}
5858
......@@ -66,7 +66,7 @@ test "weird function name" {
6666 assert(@"weird function name"() == 1234);
6767}
6868
69test "implicitCastFnUnreachableReturn" {
69test "implicit cast function unreachable return" {
7070 wantsFnWithVoid(fnWithUnreachable);
7171}
7272
......@@ -77,7 +77,7 @@ fn fnWithUnreachable() -> noreturn {
7777}
7878
7979
80test "functionPointers" {
80test "function pointers" {
8181 const fns = []@typeOf(fn1) { fn1, fn2, fn3, fn4, };
8282 for (fns) |f, i| {
8383 assert(f() == u32(i) + 5);
test/cases/for.zig+3-3
......@@ -2,7 +2,7 @@ const std = @import("std");
22const assert = std.debug.assert;
33const mem = std.mem;
44
5test "continueInForLoop" {
5test "continue in for loop" {
66 const array = []i32 {1, 2, 3, 4, 5};
77 var sum : i32 = 0;
88 for (array) |x| {
......@@ -15,7 +15,7 @@ test "continueInForLoop" {
1515 if (sum != 6) unreachable
1616}
1717
18test "forLoopWithPointerElemVar" {
18test "for loop with pointer elem var" {
1919 const source = "abcdefg";
2020 var target: [source.len]u8 = undefined;
2121 mem.copy(u8, target[0..], source);
......@@ -28,7 +28,7 @@ fn mangleString(s: []u8) {
2828 }
2929}
3030
31test "basicForLoop" {
31test "basic for loop" {
3232 const expected_result = []u8{9, 8, 7, 6, 0, 1, 2, 3, 9, 8, 7, 6, 0, 1, 2, 3 };
3333
3434 var buffer: [expected_result.len]u8 = undefined;
test/cases/goto.zig+2-2
......@@ -1,6 +1,6 @@
11const assert = @import("std").debug.assert;
22
3test "gotoAndLabels" {
3test "goto and labels" {
44 gotoLoop();
55 assert(goto_counter == 10);
66}
......@@ -19,7 +19,7 @@ var goto_counter: i32 = 0;
1919
2020
2121
22test "gotoLeaveDeferScope" {
22test "goto leave defer scope" {
2323 testGotoLeaveDeferScope(true);
2424}
2525fn testGotoLeaveDeferScope(b: bool) {
test/cases/if.zig+2-2
......@@ -1,6 +1,6 @@
11const assert = @import("std").debug.assert;
22
3test "ifStatements" {
3test "if statements" {
44 shouldBeEqual(1, 1);
55 firstEqlThird(2, 1, 2);
66}
......@@ -24,7 +24,7 @@ fn firstEqlThird(a: i32, b: i32, c: i32) {
2424}
2525
2626
27test "elseIfExpression" {
27test "else if expression" {
2828 assert(elseIfExpressionF(1) == 1);
2929}
3030fn elseIfExpressionF(c: u8) -> u8 {
test/cases/import.zig+1-1
......@@ -1,6 +1,6 @@
11const assert = @import("std").debug.assert;
22const a_namespace = @import("import/a_namespace.zig");
33
4test "callFnViaNamespaceLookup" {
4test "call fn via namespace lookup" {
55 assert(a_namespace.foo() == 1234);
66}