()
| 223 | |
| 224 | #[test] |
| 225 | fn tokenize_simple() { |
| 226 | let toks = tokenize("CREATE ARRAY a (1, 2.5, 'x')").unwrap(); |
| 227 | assert!(matches!(toks[0].tok, Tok::Ident(ref s) if s == "CREATE")); |
| 228 | assert!(matches!(toks[1].tok, Tok::Ident(ref s) if s == "ARRAY")); |
| 229 | assert!(matches!(toks[3].tok, Tok::LParen)); |
| 230 | assert!(matches!(toks[4].tok, Tok::Int(1))); |
| 231 | assert!(matches!(toks[6].tok, Tok::Float(f) if (f - 2.5).abs() < 1e-9)); |
| 232 | assert!(matches!(toks[8].tok, Tok::Str(ref s) if s == "x")); |
| 233 | } |
| 234 | |
| 235 | #[test] |
| 236 | fn tokenize_dotdot_range() { |
nothing calls this directly
no test coverage detected