File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
src/test/ui/proc-macro/auxiliary/api Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 1- #![ feature( proc_macro_span) ]
2-
31use proc_macro:: { LineColumn , Punct } ;
42
5- #[ test]
3+ pub fn test ( ) {
4+ test_line_column_ord ( ) ;
5+ test_punct_eq ( ) ;
6+ }
7+
68fn test_line_column_ord ( ) {
79 let line0_column0 = LineColumn { line : 0 , column : 0 } ;
810 let line0_column1 = LineColumn { line : 0 , column : 1 } ;
@@ -11,7 +13,6 @@ fn test_line_column_ord() {
1113 assert ! ( line0_column1 < line1_column0) ;
1214}
1315
14- #[ test]
1516fn test_punct_eq ( ) {
1617 // Good enough if it typechecks, since proc_macro::Punct can't exist in a test.
1718 fn _check ( punct : Punct ) {
Original file line number Diff line number Diff line change 33
44#![ crate_type = "proc-macro" ]
55#![ crate_name = "proc_macro_api_tests" ]
6+ #![ feature( proc_macro_span) ]
67#![ deny( dead_code) ] // catch if a test function is never called
78
89extern crate proc_macro;
910
11+ mod cmp;
12+
1013use proc_macro:: TokenStream ;
1114
1215#[ proc_macro]
1316pub fn run ( input : TokenStream ) -> TokenStream {
1417 assert ! ( input. is_empty( ) ) ;
18+ cmp:: test ( ) ;
1519 TokenStream :: new ( )
1620}
You can’t perform that action at this time.
0 commit comments