Dwarf: implement new incremental line number update API
This commit is contained in:
32
test/incremental/change_generic_line_number
Normal file
32
test/incremental/change_generic_line_number
Normal file
@@ -0,0 +1,32 @@
|
||||
#target=x86_64-linux-selfhosted
|
||||
#update=initial version
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
fn Printer(message: []const u8) type {
|
||||
return struct {
|
||||
fn print() !void {
|
||||
try std.io.getStdOut().writeAll(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
pub fn main() !void {
|
||||
try Printer("foo\n").print();
|
||||
try Printer("bar\n").print();
|
||||
}
|
||||
#expect_stdout="foo\nbar\n"
|
||||
#update=change line number
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
|
||||
fn Printer(message: []const u8) type {
|
||||
return struct {
|
||||
fn print() !void {
|
||||
try std.io.getStdOut().writeAll(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
pub fn main() !void {
|
||||
try Printer("foo\n").print();
|
||||
try Printer("bar\n").print();
|
||||
}
|
||||
#expect_stdout="foo\nbar\n"
|
||||
16
test/incremental/change_line_number
Normal file
16
test/incremental/change_line_number
Normal file
@@ -0,0 +1,16 @@
|
||||
#target=x86_64-linux-selfhosted
|
||||
#update=initial version
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
try std.io.getStdOut().writeAll("foo\n");
|
||||
}
|
||||
#expect_stdout="foo\n"
|
||||
#update=change line number
|
||||
#file=main.zig
|
||||
const std = @import("std");
|
||||
|
||||
pub fn main() !void {
|
||||
try std.io.getStdOut().writeAll("foo\n");
|
||||
}
|
||||
#expect_stdout="foo\n"
|
||||
Reference in New Issue
Block a user