mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-20 15:35:29 +01:00
change 0.1+0.2 test into 0.3 as limbo does not yet support decimals
This commit is contained in:
@@ -4282,13 +4282,14 @@ mod tests {
|
||||
expected_str
|
||||
);
|
||||
|
||||
// let input_str = OwnedValue::Text(Rc::new(String::from("tes3")));
|
||||
// let pattern_str = OwnedValue::Integer(3);
|
||||
// let replace_str = OwnedValue::Agg(Box::new(AggContext::Sum(OwnedValue::Float(0.1 + 0.2))));
|
||||
// let expected_str = OwnedValue::Text(Rc::new(String::from("tes0.3")));
|
||||
// assert_eq!(
|
||||
// exec_replace(&input_str, &pattern_str, &replace_str),
|
||||
// expected_str
|
||||
// );
|
||||
// todo: change this test to use (0.1 + 0.2) instead of 0.3 when decimals are implemented.
|
||||
let input_str = OwnedValue::Text(Rc::new(String::from("tes3")));
|
||||
let pattern_str = OwnedValue::Integer(3);
|
||||
let replace_str = OwnedValue::Agg(Box::new(AggContext::Sum(OwnedValue::Float(0.3))));
|
||||
let expected_str = OwnedValue::Text(Rc::new(String::from("tes0.3")));
|
||||
assert_eq!(
|
||||
exec_replace(&input_str, &pattern_str, &replace_str),
|
||||
expected_str
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ do_execsql_test replace {
|
||||
} {example}
|
||||
|
||||
do_execsql_test replace-number {
|
||||
select replace('tes3', 3, 0.1 + 0.2)
|
||||
select replace('tes3', 3, 0.3)
|
||||
} {tes0.3}
|
||||
|
||||
do_execsql_test replace-null {
|
||||
|
||||
Reference in New Issue
Block a user