diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-01-26 13:49:04 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-01-26 13:49:04 +0100 |
| commit | 16ac3f3ebc49c5a6e3f61d8546f2f187b191c346 (patch) | |
| tree | 7b66f108f23c64614a507e2815f706ceb72df157 /tests | |
| parent | ac788f2082711161ec8208eede04d9a2bae02241 (diff) | |
Small improvements ♻
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/lang/typ/if.typ | 4 | ||||
| -rw-r--r-- | tests/lang/typ/let.typ | 6 | ||||
| -rw-r--r-- | tests/typeset.rs | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/tests/lang/typ/if.typ b/tests/lang/typ/if.typ index 5f4c986a..f7de7716 100644 --- a/tests/lang/typ/if.typ +++ b/tests/lang/typ/if.typ @@ -18,7 +18,7 @@ "Fi" + "ve" } -// Spacing is somewhat delicated. We only want to have spacing in the output if +// Spacing is somewhat delicate. We only want to have spacing in the output if // there was whitespace before/after the full if-else statement. In particular, // spacing after a simple if should be retained, but spacing between the first // body and the else should be ignored. @@ -53,7 +53,7 @@ a#if true {} a#if true [b] #else c // Lone else. -// Error: 2:1-2:6 unexpected else keyword +// Error: 2:1-2:6 unexpected keyword `else` // Error: 1:8-1:8 expected function name #else [] diff --git a/tests/lang/typ/let.typ b/tests/lang/typ/let.typ index 7e9246bb..b3eadeaa 100644 --- a/tests/lang/typ/let.typ +++ b/tests/lang/typ/let.typ @@ -28,11 +28,15 @@ // Error: 1:6-1:7 expected identifier, found integer #let 1 = 2 -// Terminated by end of line before binding name. +// Missing binding name. // Error: 1:5-1:5 expected identifier #let x = 5 +// Missing right-hand side. +// Error: 1:9-1:9 expected expression +#let a = + // No name at all. // Error: 1:11-1:11 expected identifier The Fi#let;rst diff --git a/tests/typeset.rs b/tests/typeset.rs index dbcb6517..620e11a6 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -254,7 +254,7 @@ fn parse_metadata(src: &str, map: &LineMap) -> (bool, SpanVec<Diag>) { let pos = |s: &mut Scanner| -> Pos { let (delta, _, column) = (num(s), s.eat_assert(':'), num(s)); let line = i as u32 + 1 + delta; - map.pos(Location { line, column }).unwrap() + map.pos(Location::new(line, column)).unwrap() }; let mut s = Scanner::new(rest); |
