Fill-in test scenario for parsing large integer constants.

This commit is contained in:
KtorZ 2023-03-18 16:17:42 +01:00
parent 8a2af4cd2e
commit 0b8c3b05fe
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 15 additions and 1 deletions

View File

@ -1870,7 +1870,21 @@ fn large_integer_constants() {
pub const my_big_int = 999999999999999999999999
"#};
assert_definitions(code, vec![])
assert_definitions(
code,
vec![ast::UntypedDefinition::ModuleConstant(ModuleConstant {
doc: None,
location: Span::new((), 0..47),
public: true,
name: "my_big_int".to_string(),
annotation: None,
value: Box::new(ast::Constant::Int {
location: Span::new((), 23..47),
value: "999999999999999999999999".to_string(),
}),
tipo: (),
})],
)
}
#[test]