Remove most instances of #[cfg(feature(bigdecimal))] in tests (#910)

This commit is contained in:
Andrew Lamb 2023-07-17 14:19:51 -04:00 committed by GitHub
parent a50671d95d
commit 4efe55dd8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 90 deletions

View file

@ -32,6 +32,9 @@ pub enum Value {
#[cfg(not(feature = "bigdecimal"))]
Number(String, bool),
#[cfg(feature = "bigdecimal")]
// HINT: use `test_utils::number` to make an instance of
// Value::Number This might help if you your tests pass locally
// but fail on CI with the `--all-features` flag enabled
Number(BigDecimal, bool),
/// 'string value'
SingleQuotedString(String),

View file

@ -198,7 +198,7 @@ pub fn expr_from_projection(item: &SelectItem) -> &Expr {
}
/// Creates a `Value::Number`, panic'ing if n is not a number
pub fn number(n: &'static str) -> Value {
pub fn number(n: &str) -> Value {
Value::Number(n.parse().unwrap(), false)
}