File tree 2 files changed +9
-4
lines changed
src/test/ui/proc-macro/auxiliary/api
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1
- #![ feature( proc_macro_span) ]
2
-
3
1
use proc_macro:: { LineColumn , Punct } ;
4
2
5
- #[ test]
3
+ pub fn test ( ) {
4
+ test_line_column_ord ( ) ;
5
+ test_punct_eq ( ) ;
6
+ }
7
+
6
8
fn test_line_column_ord ( ) {
7
9
let line0_column0 = LineColumn { line : 0 , column : 0 } ;
8
10
let line0_column1 = LineColumn { line : 0 , column : 1 } ;
@@ -11,7 +13,6 @@ fn test_line_column_ord() {
11
13
assert ! ( line0_column1 < line1_column0) ;
12
14
}
13
15
14
- #[ test]
15
16
fn test_punct_eq ( ) {
16
17
// Good enough if it typechecks, since proc_macro::Punct can't exist in a test.
17
18
fn _check ( punct : Punct ) {
Original file line number Diff line number Diff line change 3
3
4
4
#![ crate_type = "proc-macro" ]
5
5
#![ crate_name = "proc_macro_api_tests" ]
6
+ #![ feature( proc_macro_span) ]
6
7
#![ deny( dead_code) ] // catch if a test function is never called
7
8
8
9
extern crate proc_macro;
9
10
11
+ mod cmp;
12
+
10
13
use proc_macro:: TokenStream ;
11
14
12
15
#[ proc_macro]
13
16
pub fn run ( input : TokenStream ) -> TokenStream {
14
17
assert ! ( input. is_empty( ) ) ;
18
+ cmp:: test ( ) ;
15
19
TokenStream :: new ( )
16
20
}
You can’t perform that action at this time.
0 commit comments