Update to edition 2018
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
11a5c49470
commit
5aee776f66
5 changed files with 16 additions and 16 deletions
10
src/tests.rs
10
src/tests.rs
|
|
@ -1,9 +1,7 @@
|
|||
use std::iter::Iterator;
|
||||
use crate::element::Element;
|
||||
|
||||
use quick_xml::Reader;
|
||||
|
||||
use element::Element;
|
||||
|
||||
const TEST_STRING: &'static str = r#"<?xml version="1.0" encoding="utf-8"?><root xmlns="root_ns" a="b" xml:lang="en">meow<child c="d"/><child xmlns="child_ns" d="e" xml:lang="fr"/>nya</root>"#;
|
||||
|
||||
fn build_test_tree() -> Element {
|
||||
|
|
@ -234,12 +232,12 @@ fn write_comments() {
|
|||
#[test]
|
||||
fn xml_error() {
|
||||
match "<a></b>".parse::<Element>() {
|
||||
Err(::error::Error::XmlError(_)) => (),
|
||||
Err(crate::error::Error::XmlError(_)) => (),
|
||||
err => panic!("No or wrong error: {:?}", err)
|
||||
}
|
||||
|
||||
match "<a></".parse::<Element>() {
|
||||
Err(::error::Error::XmlError(_)) => (),
|
||||
Err(crate::error::Error::XmlError(_)) => (),
|
||||
err => panic!("No or wrong error: {:?}", err)
|
||||
}
|
||||
}
|
||||
|
|
@ -247,7 +245,7 @@ fn xml_error() {
|
|||
#[test]
|
||||
fn invalid_element_error() {
|
||||
match "<a:b:c>".parse::<Element>() {
|
||||
Err(::error::Error::InvalidElement) => (),
|
||||
Err(crate::error::Error::InvalidElement) => (),
|
||||
err => panic!("No or wrong error: {:?}", err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue