Skip to content

Commit a6c2cd8

Browse files
Merge pull request #105 from carlmontanari/feat/zig-0.15.0-support
zig 0.15.0 support
1 parent 497fca7 commit a6c2cd8

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

build.zig.zon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.{
22
.name = .zig_yaml,
3-
.version = "0.1.0",
3+
.version = "0.2.0",
44
.fingerprint = 0x225b4a67d67a5d0b, // Changing this has security and trust implications.
5-
.minimum_zig_version = "0.14.0",
5+
.minimum_zig_version = "0.15.1",
66
.paths = .{
77
"src",
88
"test",

src/Parser/test.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ fn parseError2(source: []const u8, comptime format: []const u8, args: anytype) !
634634

635635
const expected = try std.fmt.allocPrint(testing.allocator, format, args);
636636
defer testing.allocator.free(expected);
637-
try testing.expectEqualStrings(expected, given.getWritten());
637+
try testing.expectEqualStrings(expected, given.written());
638638
}
639639

640640
test "empty doc with spaces and comments" {

src/Tokenizer.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ fn testExpected(source: []const u8, expected: []const Token.Id) !void {
330330
.buffer = source,
331331
};
332332

333-
var given = std.ArrayList(Token.Id).init(testing.allocator);
333+
var given = std.array_list.Managed(Token.Id).init(testing.allocator);
334334
defer given.deinit();
335335

336336
while (true) {

src/Yaml/test.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ fn testStringify(expected: []const u8, input: anytype) !void {
729729
defer writer.deinit();
730730

731731
try stringify(testing.allocator, input, &writer.writer);
732-
try testing.expectEqualStrings(expected, writer.getWritten());
732+
try testing.expectEqualStrings(expected, writer.written());
733733
}
734734

735735
test "stringify an int" {

test/spec.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ fn make(step: *Step, make_options: Step.MakeOptions) !void {
124124
}
125125
}
126126

127-
var output = std.ArrayList(u8).init(arena);
127+
var output = std.array_list.Managed(u8).init(arena);
128128
const writer = output.writer();
129129
try writer.writeAll(preamble);
130130

@@ -167,7 +167,7 @@ fn collectTest(arena: Allocator, entry: fs.Dir.Walker.Entry, testcases: *std.Str
167167
var path_components_it = try std.fs.path.componentIterator(entry.path);
168168
const first_path = path_components_it.first().?;
169169

170-
var path_components = std.ArrayList([]const u8).init(arena);
170+
var path_components = std.array_list.Managed([]const u8).init(arena);
171171
while (path_components_it.next()) |component| {
172172
try path_components.append(component.name);
173173
}
@@ -596,7 +596,7 @@ const expect_err_template =
596596
\\
597597
;
598598

599-
fn emitTest(arena: Allocator, output: *std.ArrayList(u8), testcase: Testcase) !void {
599+
fn emitTest(arena: Allocator, output: *std.array_list.Managed(u8), testcase: Testcase) !void {
600600
const head = try std.fmt.allocPrint(arena, "test \"{f}\" {{\n", .{
601601
std.zig.fmtString(testcase.name),
602602
});

0 commit comments

Comments
 (0)