Commit 88ada3b
authored
Streamlines the
Previously, the `Scanner` tests required a lot of manual position
expectations which was tedious to write. This replaces that with a test
harness that can do the math from chunks of input that the test writer
defines as whitespace or token boundaries. This also adds the macro
`scanner_test_case!` which makes it so that one can use the harness with
a friendly syntax. The old tests are ported to the new macro.
Also:
* Adds assertions to the internal `LineAndColumn::at`.
* Adds convenience constructor around `Content`.
Resolves #21.Scanner Tests. (#25)1 parent 7f2c7fe commit 88ada3b
2 files changed
+275
-338
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
0 commit comments