Skip to content

Commit 1ef1c49

Browse files
committed
Add big decimal formatting test cases with potential trailing zeros
1 parent 44f4be2 commit 1ef1c49

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

datafusion/sqllogictest/src/engines/conversion.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ mod tests {
149149

150150
#[test]
151151
fn test_big_decimal_to_str() {
152+
assert_decimal_str_eq!(110, 3, "0.11");
152153
assert_decimal_str_eq!(11, 3, "0.011");
153154
assert_decimal_str_eq!(11, 2, "0.11");
154155
assert_decimal_str_eq!(11, 1, "1.1");
@@ -157,6 +158,7 @@ mod tests {
157158
assert_decimal_str_eq!(0, 0, "0");
158159

159160
// Negative cases
161+
assert_decimal_str_eq!(-110, 3, "-0.11");
160162
assert_decimal_str_eq!(-11, 3, "-0.011");
161163
assert_decimal_str_eq!(-11, 2, "-0.11");
162164
assert_decimal_str_eq!(-11, 1, "-1.1");

0 commit comments

Comments
 (0)