Skip to content

Commit fe1b1dd

Browse files
committed
More direct failing test
1 parent 8e1a14a commit fe1b1dd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

crates/ra_syntax/src/parsing/lexer.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,16 @@ pub fn classify_literal(text: &str) -> Option<Token> {
145145
};
146146
Some(Token { kind, len: TextUnit::from_usize(t.len) })
147147
}
148+
149+
#[cfg(test)]
150+
mod tests {
151+
use super::*;
152+
153+
#[test]
154+
fn lex_float_literal() {
155+
assert_eq!(
156+
tokenize("42f64")[0],
157+
Token { kind: FLOAT_NUMBER, len: TextUnit::from_usize(5)}
158+
);
159+
}
160+
}

0 commit comments

Comments
 (0)