aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-04-03 22:31:15 -0400
committerGitHub <noreply@github.com>2020-04-03 22:31:15 -0400
commite89c42655cf9851cdf02065bc75cda0e27884966 (patch)
treeb25e26e53ceda1ac03e65de5d483491ee46e7c0e /test
parent1568470c44eafb59425c070ea9884b78cc2516b2 (diff)
parent7a28c644aa8eb3d27dee113338af8278f8f6334f (diff)
downloadzig-e89c42655cf9851cdf02065bc75cda0e27884966.tar.gz
zig-e89c42655cf9851cdf02065bc75cda0e27884966.zip
Merge pull request #4868 from xackus/new-arraylist-api
new ArrayList API
Diffstat (limited to 'test')
-rw-r--r--test/standalone/brace_expansion/main.zig4
-rw-r--r--test/tests.zig4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/standalone/brace_expansion/main.zig b/test/standalone/brace_expansion/main.zig
index 411f2bfaf6..8abe39a428 100644
--- a/test/standalone/brace_expansion/main.zig
+++ b/test/standalone/brace_expansion/main.zig
@@ -113,7 +113,7 @@ fn parse(tokens: *const ArrayList(Token), token_index: *usize) ParseError!Node {
fn expandString(input: []const u8, output: *ArrayListSentineled(u8, 0)) !void {
const tokens = try tokenize(input);
- if (tokens.len == 1) {
+ if (tokens.items.len == 1) {
return output.resize(0);
}
@@ -142,7 +142,7 @@ fn expandString(input: []const u8, output: *ArrayListSentineled(u8, 0)) !void {
const ExpandNodeError = error{OutOfMemory};
fn expandNode(node: Node, output: *ArrayList(ArrayListSentineled(u8, 0))) ExpandNodeError!void {
- assert(output.len == 0);
+ assert(output.items.len == 0);
switch (node) {
Node.Scalar => |scalar| {
try output.append(try ArrayListSentineled(u8, 0).init(global_allocator, scalar));
diff --git a/test/tests.zig b/test/tests.zig
index 8ad5803184..e66ae7296a 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -879,13 +879,13 @@ pub const CompileErrorContext = struct {
var err_iter = ErrLineIter.init(stderr);
var i: usize = 0;
ok = while (err_iter.next()) |line| : (i += 1) {
- if (i >= self.case.expected_errors.len) break false;
+ if (i >= self.case.expected_errors.items.len) break false;
const expected = self.case.expected_errors.at(i);
if (mem.indexOf(u8, line, expected) == null) break false;
continue;
} else true;
- ok = ok and i == self.case.expected_errors.len;
+ ok = ok and i == self.case.expected_errors.items.len;
if (!ok) {
warn("\n======== Expected these compile errors: ========\n", .{});