add more hex literal parsing test cases
This commit is contained in:
parent
40d27df446
commit
6211888086
@ -2296,4 +2296,9 @@ fn test_builtin_functions_context() {
|
||||
fn test_hex() {
|
||||
assert_eq!(eval("0x3"), Ok(Value::Int(3)));
|
||||
assert_eq!(eval("0xFF"), Ok(Value::Int(255)));
|
||||
assert_eq!(eval("-0xFF"), Ok(Value::Int(-255)));
|
||||
assert_eq!(
|
||||
eval("0x"),
|
||||
Err(EvalexprError::VariableIdentifierNotFound("0x".into()))
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user