Skip to content

Commit

Permalink
test more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Mause committed Dec 30, 2023
1 parent 6c0e413 commit 9fdc3e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vtab/logical_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,16 @@ mod test {
fn test_decimal() {
let typ = LogicalType::decimal(10, 2);

assert_eq!(typ.id(), crate::vtab::LogicalTypeId::Decimal);
assert_eq!(typ.decimal_width(), 10);
assert_eq!(typ.decimal_scale(), 2);
}

#[test]
fn test_decimal_methods() {
let typ = LogicalType::new(crate::vtab::LogicalTypeId::Varchar);

assert_eq!(typ.decimal_width(), 0);
assert_eq!(typ.decimal_scale(), 0);
}
}

0 comments on commit 9fdc3e4

Please sign in to comment.