aboutsummaryrefslogtreecommitdiff
path: root/test-suite/tests/spanned.rs
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/tests/spanned.rs')
-rw-r--r--test-suite/tests/spanned.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/test-suite/tests/spanned.rs b/test-suite/tests/spanned.rs
index d8f7a12..a8d29d4 100644
--- a/test-suite/tests/spanned.rs
+++ b/test-suite/tests/spanned.rs
@@ -1,12 +1,12 @@
extern crate serde;
-extern crate toml;
+extern crate milf;
#[macro_use]
extern crate serde_derive;
use std::collections::HashMap;
use std::fmt::Debug;
-use toml::value::Datetime;
-use toml::Spanned;
+use milf::value::Datetime;
+use milf::Spanned;
/// A set of good datetimes.
pub fn good_datetimes() -> Vec<&'static str> {
@@ -41,7 +41,7 @@ fn test_spanned_field() {
where
T: serde::Deserialize<'de> + Debug + PartialEq,
{
- let foo: Foo<T> = toml::from_str(s).unwrap();
+ let foo: Foo<T> = milf::from_str(s).unwrap();
assert_eq!(6, foo.foo.start());
if let Some(end) = end {
@@ -52,7 +52,7 @@ fn test_spanned_field() {
assert_eq!(expected, &s[foo.foo.start()..foo.foo.end()]);
// Test for Spanned<> at the top level
- let foo_outer: Spanned<BareFoo<T>> = toml::from_str(s).unwrap();
+ let foo_outer: Spanned<BareFoo<T>> = milf::from_str(s).unwrap();
assert_eq!(0, foo_outer.start());
assert_eq!(s.len(), foo_outer.end());
@@ -94,13 +94,13 @@ fn test_inner_spanned_table() {
}
fn good(s: &str, zero: bool) {
- let foo: Foo = toml::from_str(s).unwrap();
+ let foo: Foo = milf::from_str(s).unwrap();
if zero {
assert_eq!(foo.foo.start(), 0);
// We'd actually have to assert equality with s.len() here,
// but the current implementation doesn't support that,
- // and it's not possible with toml's data format to support it
+ // and it's not possible with milf's data format to support it
// in the general case as spans aren't always well-defined.
// So this check mainly serves as a reminder that this test should
// be updated *if* one day there is support for emitting the actual span.
@@ -141,7 +141,7 @@ fn test_outer_spanned_table() {
}
fn good(s: &str) {
- let foo: Foo = toml::from_str(s).unwrap();
+ let foo: Foo = milf::from_str(s).unwrap();
for (k, v) in foo.foo.iter() {
assert_eq!(&s[k.start()..k.end()], k.get_ref());
@@ -174,7 +174,7 @@ fn test_spanned_nested() {
}
fn good(s: &str) {
- let foo: Foo = toml::from_str(s).unwrap();
+ let foo: Foo = milf::from_str(s).unwrap();
for (k, v) in foo.foo.iter() {
assert_eq!(&s[k.start()..k.end()], k.get_ref());
@@ -214,13 +214,13 @@ fn test_spanned_array() {
}
fn good(s: &str) {
- let foo_list: Foo = toml::from_str(s).unwrap();
+ let foo_list: Foo = milf::from_str(s).unwrap();
for foo in foo_list.foo.iter() {
assert_eq!(foo.start(), 0);
// We'd actually have to assert equality with s.len() here,
// but the current implementation doesn't support that,
- // and it's not possible with toml's data format to support it
+ // and it's not possible with milf's data format to support it
// in the general case as spans aren't always well-defined.
// So this check mainly serves as a reminder that this test should
// be updated *if* one day there is support for emitting the actual span.