diff options
| author | David Tolnay <dtolnay@gmail.com> | 2020-05-21 17:12:29 -0700 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2020-05-21 17:15:13 -0700 |
| commit | 5a4bf448c764696be75eafb6631e182d95064e72 (patch) | |
| tree | 3dea12df3007e7cdc5a13e8d75409cfe610444d6 | |
| parent | e9fed696b5ae033195e2ec2f9ba1edf2c3dae5c5 (diff) | |
| download | rust-5a4bf448c764696be75eafb6631e182d95064e72.tar.gz rust-5a4bf448c764696be75eafb6631e182d95064e72.zip | |
Add test for proc_macro::LineColumn
| -rw-r--r-- | src/libproc_macro/tests/test.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libproc_macro/tests/test.rs b/src/libproc_macro/tests/test.rs new file mode 100644 index 00000000000..331b330cf29 --- /dev/null +++ b/src/libproc_macro/tests/test.rs @@ -0,0 +1,12 @@ +#![feature(proc_macro_span)] + +use proc_macro::LineColumn; + +#[test] +fn test_line_column_ord() { + let line0_column0 = LineColumn { line: 0, column: 0 }; + let line0_column1 = LineColumn { line: 0, column: 1 }; + let line1_column0 = LineColumn { line: 1, column: 0 }; + assert!(line0_column0 < line0_column1); + assert!(line0_column1 < line1_column0); +} |
