diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-02-07 17:19:51 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-02-07 17:23:50 -0500 |
| commit | 8a859afd580f438f549ee69a3e3487eb5d119fad (patch) | |
| tree | cbbd2d01bdd73a160b90dc280e7fbc05e7d963a8 /test/cases/array.zig | |
| parent | 92793252ad43c4119902506f95e726de3492c128 (diff) | |
| download | zig-8a859afd580f438f549ee69a3e3487eb5d119fad.tar.gz zig-8a859afd580f438f549ee69a3e3487eb5d119fad.zip | |
std.io supports printing integers as hex values
remove "unnecessary if statement" error
this "depends on compile variable" code is too hard to validate,
and has false negatives. not worth it right now.
std.str removed, instead use std.mem.
std.mem.eql and std.mem.sliceEql merged and do not require explicit
type argument.
Diffstat (limited to 'test/cases/array.zig')
| -rw-r--r-- | test/cases/array.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/cases/array.zig b/test/cases/array.zig index 79dcf21407..1dc1242d37 100644 --- a/test/cases/array.zig +++ b/test/cases/array.zig @@ -1,5 +1,5 @@ const assert = @import("std").debug.assert; -const str = @import("std").str; +const mem = @import("std").mem; fn arrays() { @setFnTest(this); @@ -63,10 +63,10 @@ fn nestedArrays() { const array_of_strings = [][]u8 {"hello", "this", "is", "my", "thing"}; for (array_of_strings) |s, i| { - if (i == 0) assert(str.eql(s, "hello")); - if (i == 1) assert(str.eql(s, "this")); - if (i == 2) assert(str.eql(s, "is")); - if (i == 3) assert(str.eql(s, "my")); - if (i == 4) assert(str.eql(s, "thing")); + if (i == 0) assert(mem.eql(s, "hello")); + if (i == 1) assert(mem.eql(s, "this")); + if (i == 2) assert(mem.eql(s, "is")); + if (i == 3) assert(mem.eql(s, "my")); + if (i == 4) assert(mem.eql(s, "thing")); } } |
