From a3e5663ae0206270156fbeb926a174a40abbddb0 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Sat, 1 Feb 2020 22:25:01 +0200 Subject: ra_syntax: added tests for tokenization errors --- .../test_data/lexer/err/0056_empty_exponent.txt | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.txt (limited to 'crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.txt') diff --git a/crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.txt b/crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.txt new file mode 100644 index 000000000..ab35e20a5 --- /dev/null +++ b/crates/ra_syntax/test_data/lexer/err/0056_empty_exponent.txt @@ -0,0 +1,62 @@ +FLOAT_NUMBER 2 "0e" +WHITESPACE 1 "\n" +FLOAT_NUMBER 2 "0E" +WHITESPACE 2 "\n\n" +FLOAT_NUMBER 4 "42e+" +WHITESPACE 1 "\n" +FLOAT_NUMBER 4 "42e-" +WHITESPACE 1 "\n" +FLOAT_NUMBER 4 "42E+" +WHITESPACE 1 "\n" +FLOAT_NUMBER 4 "42E-" +WHITESPACE 2 "\n\n" +INT_NUMBER 2 "42" +DOT 1 "." +IDENT 1 "e" +PLUS 1 "+" +WHITESPACE 1 "\n" +INT_NUMBER 2 "42" +DOT 1 "." +IDENT 1 "e" +MINUS 1 "-" +WHITESPACE 1 "\n" +INT_NUMBER 2 "42" +DOT 1 "." +IDENT 1 "E" +PLUS 1 "+" +WHITESPACE 1 "\n" +INT_NUMBER 2 "42" +DOT 1 "." +IDENT 1 "E" +MINUS 1 "-" +WHITESPACE 2 "\n\n" +FLOAT_NUMBER 6 "42.2e+" +WHITESPACE 1 "\n" +FLOAT_NUMBER 6 "42.2e-" +WHITESPACE 1 "\n" +FLOAT_NUMBER 6 "42.2E+" +WHITESPACE 1 "\n" +FLOAT_NUMBER 6 "42.2E-" +WHITESPACE 2 "\n\n" +FLOAT_NUMBER 9 "42.2e+f32" +WHITESPACE 1 "\n" +FLOAT_NUMBER 9 "42.2e-f32" +WHITESPACE 1 "\n" +FLOAT_NUMBER 9 "42.2E+f32" +WHITESPACE 1 "\n" +FLOAT_NUMBER 9 "42.2E-f32" +WHITESPACE 1 "\n" +> error[0; 2) token("0e") msg(Missing digits after the exponent symbol) +> error[3; 5) token("0E") msg(Missing digits after the exponent symbol) +> error[7; 11) token("42e+") msg(Missing digits after the exponent symbol) +> error[12; 16) token("42e-") msg(Missing digits after the exponent symbol) +> error[17; 21) token("42E+") msg(Missing digits after the exponent symbol) +> error[22; 26) token("42E-") msg(Missing digits after the exponent symbol) +> error[53; 59) token("42.2e+") msg(Missing digits after the exponent symbol) +> error[60; 66) token("42.2e-") msg(Missing digits after the exponent symbol) +> error[67; 73) token("42.2E+") msg(Missing digits after the exponent symbol) +> error[74; 80) token("42.2E-") msg(Missing digits after the exponent symbol) +> error[82; 91) token("42.2e+f32") msg(Missing digits after the exponent symbol) +> error[92; 101) token("42.2e-f32") msg(Missing digits after the exponent symbol) +> error[102; 111) token("42.2E+f32") msg(Missing digits after the exponent symbol) +> error[112; 121) token("42.2E-f32") msg(Missing digits after the exponent symbol) -- cgit v1.2.3