mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-27 21:15:41 +03:00
Remove unnecessary println!
This commit is contained in:
parent
59aa9dede3
commit
c69587fa8d
@ -229,7 +229,7 @@ mod tests {
|
|||||||
String::from("[Asserts]\n"),
|
String::from("[Asserts]\n"),
|
||||||
String::from("jsonpath \"$.message\" startsWith \"hello\"")
|
String::from("jsonpath \"$.message\" startsWith \"hello\"")
|
||||||
];
|
];
|
||||||
let error = Error {
|
let _error = Error {
|
||||||
source_info: SourceInfo::init(3, 0, 3, 0),
|
source_info: SourceInfo::init(3, 0, 3, 0),
|
||||||
description: String::from("Assert Error"),
|
description: String::from("Assert Error"),
|
||||||
fixme: String::from("actual: string <tutu>\nexpected: starts with string <toto>"),
|
fixme: String::from("actual: string <tutu>\nexpected: starts with string <toto>"),
|
||||||
@ -239,8 +239,6 @@ mod tests {
|
|||||||
color: false,
|
color: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
eprintln!("{}", error.format());
|
|
||||||
|
|
||||||
//assert_eq!(1,2);
|
//assert_eq!(1,2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,6 @@ impl Selector {
|
|||||||
elements.push(elem.clone());
|
elements.push(elem.clone());
|
||||||
}
|
}
|
||||||
for value in obj.values() {
|
for value in obj.values() {
|
||||||
eprintln!(">> value = {:?}", value);
|
|
||||||
for element in Selector::RecursiveKey(key.clone()).eval(value.clone()) {
|
for element in Selector::RecursiveKey(key.clone()).eval(value.clone()) {
|
||||||
elements.push(element);
|
elements.push(element);
|
||||||
};
|
};
|
||||||
@ -89,7 +88,6 @@ impl Selector {
|
|||||||
|
|
||||||
impl Predicate {
|
impl Predicate {
|
||||||
pub fn eval(&self, elem: serde_json::Value) -> bool {
|
pub fn eval(&self, elem: serde_json::Value) -> bool {
|
||||||
//eprintln!("eval elem {:?}", elem);
|
|
||||||
match elem {
|
match elem {
|
||||||
serde_json::Value::Object(ref obj) => match (obj.get(self.key.as_str()), self.func.clone()) {
|
serde_json::Value::Object(ref obj) => match (obj.get(self.key.as_str()), self.func.clone()) {
|
||||||
(Some(serde_json::Value::Number(v)), PredicateFunc::Equal(ref num))
|
(Some(serde_json::Value::Number(v)), PredicateFunc::Equal(ref num))
|
||||||
|
@ -190,7 +190,6 @@ fn template_element_string(char_parser: CharParser, reader: &mut Reader) -> Pars
|
|||||||
loop {
|
loop {
|
||||||
match char_parser(reader) {
|
match char_parser(reader) {
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
//eprintln!(">>error {:?}", e);
|
|
||||||
if e.recoverable {
|
if e.recoverable {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@ -198,7 +197,6 @@ fn template_element_string(char_parser: CharParser, reader: &mut Reader) -> Pars
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok((c, s)) => {
|
Ok((c, s)) => {
|
||||||
//eprintln!(">> {:?}", (c, s.clone()));
|
|
||||||
if s == "{" && bracket {
|
if s == "{" && bracket {
|
||||||
break;
|
break;
|
||||||
} else if s == "{" && !bracket {
|
} else if s == "{" && !bracket {
|
||||||
|
@ -159,8 +159,7 @@ impl PredicateFunc {
|
|||||||
}
|
}
|
||||||
PredicateFuncValue::EqualExpression { value: expected, .. } => {
|
PredicateFuncValue::EqualExpression { value: expected, .. } => {
|
||||||
let expected = expected.eval(variables)?;
|
let expected = expected.eval(variables)?;
|
||||||
eprintln!(">> {:?}", expected);
|
todo!(">> {:?}", expected)
|
||||||
todo!()
|
|
||||||
}
|
}
|
||||||
PredicateFuncValue::CountEqual { value: expected, .. } => {
|
PredicateFuncValue::CountEqual { value: expected, .. } => {
|
||||||
let expected = expected.to_string();
|
let expected = expected.to_string();
|
||||||
|
Loading…
Reference in New Issue
Block a user