mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +02:00
position for stdin, string; (string) for trace; fix tests
This commit is contained in:
parent
6a420d672c
commit
0e49de6a2b
5 changed files with 60 additions and 38 deletions
|
@ -118,7 +118,7 @@ int main()
|
|||
"yellow",
|
||||
"values"),
|
||||
.nixCode = NixCode {
|
||||
.errPos = Pos(problem_file, 40, 13),
|
||||
.errPos = Pos(foFile, problem_file, 40, 13),
|
||||
.prevLineOfCode = std::nullopt,
|
||||
.errLineOfCode = "this is the problem line of code",
|
||||
.nextLineOfCode = std::nullopt
|
||||
|
@ -132,7 +132,7 @@ int main()
|
|||
"yellow",
|
||||
"values"),
|
||||
.nixCode = NixCode {
|
||||
.errPos = Pos(problem_file, 40, 13),
|
||||
.errPos = Pos(foFile, problem_file, 40, 13),
|
||||
.prevLineOfCode = "previous line of code",
|
||||
.errLineOfCode = "this is the problem line of code",
|
||||
.nextLineOfCode = "next line of code",
|
||||
|
@ -147,7 +147,7 @@ int main()
|
|||
"yellow",
|
||||
"values"),
|
||||
.nixCode = NixCode {
|
||||
.errPos = Pos(problem_file, 40, 13)
|
||||
.errPos = Pos(foFile, problem_file, 40, 13)
|
||||
}});
|
||||
|
||||
// Error with only hint and name..
|
||||
|
@ -155,7 +155,7 @@ int main()
|
|||
ErrorInfo { .name = "error name",
|
||||
.hint = hintfmt("hint %1%", "only"),
|
||||
.nixCode = NixCode {
|
||||
.errPos = Pos(problem_file, 40, 13)
|
||||
.errPos = Pos(foFile, problem_file, 40, 13)
|
||||
}});
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue