mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-24 19:42:07 +03:00
cargo fmt
This commit is contained in:
parent
13bd92d27d
commit
1f4e9e2a8b
@ -344,11 +344,17 @@ fn eval_something(
|
||||
|
||||
PredicateFuncValue::GreaterThanOrEqualInt {
|
||||
value: expected, ..
|
||||
} => Ok(assert_values_greater_or_equal(value, Value::Integer(expected))),
|
||||
} => Ok(assert_values_greater_or_equal(
|
||||
value,
|
||||
Value::Integer(expected),
|
||||
)),
|
||||
PredicateFuncValue::GreaterThanOrEqualFloat {
|
||||
value: Float { int, decimal, .. },
|
||||
..
|
||||
} => Ok(assert_values_greater_or_equal(value, Value::Float(int, decimal))),
|
||||
} => Ok(assert_values_greater_or_equal(
|
||||
value,
|
||||
Value::Float(int, decimal),
|
||||
)),
|
||||
|
||||
PredicateFuncValue::LessThanInt {
|
||||
value: expected, ..
|
||||
@ -364,7 +370,10 @@ fn eval_something(
|
||||
PredicateFuncValue::LessThanOrEqualFloat {
|
||||
value: Float { int, decimal, .. },
|
||||
..
|
||||
} => Ok(assert_values_less_or_equal(value, Value::Float(int, decimal))),
|
||||
} => Ok(assert_values_less_or_equal(
|
||||
value,
|
||||
Value::Float(int, decimal),
|
||||
)),
|
||||
|
||||
// countEquals
|
||||
PredicateFuncValue::CountEqual {
|
||||
@ -627,10 +636,7 @@ fn assert_values_equal(actual: Value, expected: Value) -> AssertResult {
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_values_greater(
|
||||
actual_value: Value,
|
||||
expected_value: Value,
|
||||
) -> AssertResult {
|
||||
fn assert_values_greater(actual_value: Value, expected_value: Value) -> AssertResult {
|
||||
let actual = actual_value.clone().display();
|
||||
let expected = format!("greater than {}", expected_value.clone().display());
|
||||
match compare_numbers(actual_value, expected_value) {
|
||||
@ -655,10 +661,7 @@ fn assert_values_greater(
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_values_greater_or_equal(
|
||||
actual_value: Value,
|
||||
expected_value: Value,
|
||||
) -> AssertResult {
|
||||
fn assert_values_greater_or_equal(actual_value: Value, expected_value: Value) -> AssertResult {
|
||||
let actual = actual_value.clone().display();
|
||||
let expected = format!("greater or equal than {}", expected_value.clone().display());
|
||||
match compare_numbers(actual_value, expected_value) {
|
||||
@ -708,10 +711,7 @@ fn assert_values_less(actual_value: Value, expected_value: Value) -> AssertResul
|
||||
}
|
||||
}
|
||||
|
||||
fn assert_values_less_or_equal(
|
||||
actual_value: Value,
|
||||
expected_value: Value,
|
||||
) -> AssertResult {
|
||||
fn assert_values_less_or_equal(actual_value: Value, expected_value: Value) -> AssertResult {
|
||||
let actual = actual_value.clone().display();
|
||||
let expected = format!("less or equal than {}", expected_value.clone().display());
|
||||
match compare_numbers(actual_value, expected_value) {
|
||||
|
@ -76,7 +76,10 @@ pub fn eval_expression(expr: Expr, variables: &HashMap<String, Value>) -> Result
|
||||
|
||||
impl Value {
|
||||
pub fn is_renderable(&self) -> bool {
|
||||
matches!(self, Value::Integer(_) | Value::Bool(_) | Value::Float(_, _) | Value::String(_))
|
||||
matches!(
|
||||
self,
|
||||
Value::Integer(_) | Value::Bool(_) | Value::Float(_, _) | Value::String(_)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user