Skip to content

Commit 5a4bf44

Browse files
committed
Add test for proc_macro::LineColumn
1 parent e9fed69 commit 5a4bf44

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/libproc_macro/tests/test.rs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#![feature(proc_macro_span)]
2+
3+
use proc_macro::LineColumn;
4+
5+
#[test]
6+
fn test_line_column_ord() {
7+
let line0_column0 = LineColumn { line: 0, column: 0 };
8+
let line0_column1 = LineColumn { line: 0, column: 1 };
9+
let line1_column0 = LineColumn { line: 1, column: 0 };
10+
assert!(line0_column0 < line0_column1);
11+
assert!(line0_column1 < line1_column0);
12+
}

0 commit comments

Comments
 (0)