Skip to content

Commit

Permalink
Add test for proc_macro::LineColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 22, 2020
1 parent e9fed69 commit 5a4bf44
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/libproc_macro/tests/test.rs
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit 5a4bf44

Please sign in to comment.