diff options
author | Melody Horn <melody@boringcactus.com> | 2021-03-21 14:10:24 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-03-21 14:10:24 -0600 |
commit | 7bbbfd046324363c8db1fb15d39aeb02fe7331b5 (patch) | |
tree | a416bb991c23e083d0b5816dfc8b00cd1aceda78 /test-suite/tests/parser.rs | |
parent | b1417006df376e6c406bff43740dd11aa7ef744e (diff) | |
download | milf-rs-main.tar.gz milf-rs-main.zip |
Diffstat (limited to 'test-suite/tests/parser.rs')
-rw-r--r-- | test-suite/tests/parser.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test-suite/tests/parser.rs b/test-suite/tests/parser.rs index 169df79..0d14803 100644 --- a/test-suite/tests/parser.rs +++ b/test-suite/tests/parser.rs @@ -1,10 +1,10 @@ -extern crate toml; +extern crate milf; -use toml::Value; +use milf::Value; macro_rules! bad { - ($toml:expr, $msg:expr) => { - match $toml.parse::<toml::Value>() { + ($milf:expr, $msg:expr) => { + match $milf.parse::<milf::Value>() { Ok(s) => panic!("parsed to: {:#?}", s), Err(e) => assert_eq!(e.to_string(), $msg), } @@ -493,7 +493,7 @@ fn bad_underscores() { bad!("foo = 0__0", "invalid number at line 1 column 7"); bad!( "foo = __0", - "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + "invalid MILF value, did you mean to use a quoted string? at line 1 column 7" ); bad!("foo = 1_0_", "invalid number at line 1 column 7"); } @@ -540,19 +540,19 @@ fn booleans() { bad!( "foo = true2", - "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + "invalid MILF value, did you mean to use a quoted string? at line 1 column 7" ); bad!( "foo = false2", - "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + "invalid MILF value, did you mean to use a quoted string? at line 1 column 7" ); bad!( "foo = t1", - "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + "invalid MILF value, did you mean to use a quoted string? at line 1 column 7" ); bad!( "foo = f2", - "invalid TOML value, did you mean to use a quoted string? at line 1 column 7" + "invalid MILF value, did you mean to use a quoted string? at line 1 column 7" ); } @@ -643,8 +643,8 @@ fn datetimes() { macro_rules! t { ($actual:expr) => {{ let f = format!("foo = {}", $actual); - let toml = f.parse::<Value>().expect(&format!("failed: {}", f)); - assert_eq!(toml["foo"].as_datetime().unwrap().to_string(), $actual); + let milf = f.parse::<Value>().expect(&format!("failed: {}", f)); + assert_eq!(milf["foo"].as_datetime().unwrap().to_string(), $actual); }}; } |