diff options
author | Alex Crichton <alex@alexcrichton.com> | 2017-02-08 21:23:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 21:23:29 -0800 |
commit | beff7f992d738db3565d899a72542baae57f835d (patch) | |
tree | 76498b837fc5f1f6ba0a5f53e1b2d85c6638da4d /tests/invalid.rs | |
parent | 473908c9722eeedeec1777237a135f582faa78d8 (diff) | |
parent | f66d8bcf33530c858a502bfa170f2383a8cbc204 (diff) | |
download | milf-rs-beff7f992d738db3565d899a72542baae57f835d.tar.gz milf-rs-beff7f992d738db3565d899a72542baae57f835d.zip |
Merge pull request #137 from alexcrichton/serde-upgrade
Rewrite crate with serde support from ground up
Diffstat (limited to 'tests/invalid.rs')
-rw-r--r-- | tests/invalid.rs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/invalid.rs b/tests/invalid.rs index 63e4de8..4679684 100644 --- a/tests/invalid.rs +++ b/tests/invalid.rs @@ -1,17 +1,9 @@ extern crate toml; -use toml::{Parser}; - fn run(toml: &str) { - let mut p = Parser::new(toml); - let table = p.parse(); - assert!(table.is_none()); - assert!(p.errors.len() > 0); - - // test Parser::to_linecol with the generated error offsets - for error in &p.errors { - p.to_linecol(error.lo); - p.to_linecol(error.hi); + println!("test if invalid:\n{}", toml); + if let Ok(e) = toml.parse::<toml::Value>() { + panic!("parsed to: {:#?}", e); } } @@ -32,8 +24,6 @@ test!(datetime_malformed_no_secs, include_str!("invalid/datetime-malformed-no-secs.toml")); test!(datetime_malformed_no_t, include_str!("invalid/datetime-malformed-no-t.toml")); -test!(datetime_malformed_no_z, - include_str!("invalid/datetime-malformed-no-z.toml")); test!(datetime_malformed_with_milli, include_str!("invalid/datetime-malformed-with-milli.toml")); test!(duplicate_keys, |