11use c_parser:: * ;
22
3- fn test_parser_on_string ( content : & str , output : & str ) {
3+ fn test_string ( content : & str , output : & str ) {
44 let files = & [ ( String :: new ( ) , content) ] ;
55 let mut location = Location :: from ( String :: new ( ) ) ;
66 let tokens = lex_file ( content, & mut location) . unwrap_or_display ( files, "lexer" ) ;
@@ -12,7 +12,7 @@ fn test_parser_on_string(content: &str, output: &str) {
1212 ) ;
1313}
1414
15- // fn test_parser_error_on_string (content: &str, output: &str) {
15+ // fn test_string_error (content: &str, output: &str) {
1616// let files = &[(String::new(), content)];
1717// let mut location = Location::from(String::new());
1818// let tokens = lex_file(content, &mut location).unwrap_or_display(files,
@@ -24,21 +24,21 @@ fn test_parser_on_string(content: &str, output: &str) {
2424// );
2525// }
2626
27- macro_rules! test_string {
27+ macro_rules! make_string_tests {
2828 ( $( $name: ident: $input: expr => $output: expr) * ) => {
2929 mod parser_string {
3030 $(
3131 #[ test]
3232 fn $name( ) {
33- super :: test_parser_on_string ( $input, $output)
33+ super :: test_string ( $input, $output)
3434 }
3535 ) *
3636 }
3737
3838 } ;
3939}
4040
41- test_string ! (
41+ make_string_tests ! (
4242
4343unary_binary:
4444 "a + b * c - d / e % f + g - h * i + j % k * l ^ !m++ & n | o || p && q"
@@ -138,7 +138,7 @@ keywords_attributes_functions:
138138 "[((int main)°()), [(const int volatile static short thread_local y), (static_assert°((((sizeof°((x = 2))) + 1) == 2))), \u{2205} ]..]"
139139) ;
140140
141- // macro_rules! test_string_error {
141+ // macro_rules! make_string_error_tests {
142142// ($($name:ident: $input:expr => $output:expr)*) => {
143143// mod parser_string_error {
144144// $(
@@ -151,5 +151,3 @@ keywords_attributes_functions:
151151
152152// };
153153// }
154-
155- // test_string_error!();
0 commit comments