diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-05-28 20:23:55 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-05-29 04:23:38 -0400 |
| commit | 0c16cd2d0ed78be2d160f9c865cd0a8703348232 (patch) | |
| tree | e7ff390d89611797776f2e67151c1157059d6147 /test/cases/array.zig | |
| parent | cdf30c31ea36365859dd81c207aede3c45c4e022 (diff) | |
| download | zig-0c16cd2d0ed78be2d160f9c865cd0a8703348232.tar.gz zig-0c16cd2d0ed78be2d160f9c865cd0a8703348232.zip | |
run zig fmt on the codebase
See #1003
Diffstat (limited to 'test/cases/array.zig')
| -rw-r--r-- | test/cases/array.zig | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/cases/array.zig b/test/cases/array.zig index 0fb61b2a9f..9a405216d8 100644 --- a/test/cases/array.zig +++ b/test/cases/array.zig @@ -34,7 +34,7 @@ test "void arrays" { } test "array literal" { - const hex_mult = []u16 { + const hex_mult = []u16{ 4096, 256, 16, @@ -54,7 +54,7 @@ test "array dot len const expr" { const ArrayDotLenConstExpr = struct { y: [some_array.len]u8, }; -const some_array = []u8 { +const some_array = []u8{ 0, 1, 2, @@ -62,7 +62,7 @@ const some_array = []u8 { }; test "nested arrays" { - const array_of_strings = [][]const u8 { + const array_of_strings = [][]const u8{ "hello", "this", "is", @@ -86,9 +86,7 @@ const Str = struct { a: []Sub, }; test "set global var array via slice embedded in struct" { - var s = Str { - .a = s_array[0..], - }; + var s = Str{ .a = s_array[0..] }; s.a[0].b = 1; s.a[1].b = 2; @@ -100,7 +98,7 @@ test "set global var array via slice embedded in struct" { } test "array literal with specified size" { - var array = [2]u8 { + var array = [2]u8{ 1, 2, }; |
