From 7bbbfd046324363c8db1fb15d39aeb02fe7331b5 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 21 Mar 2021 14:10:24 -0600 Subject: hilarious and original joke --- test-suite/tests/spanned.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test-suite/tests/spanned.rs') 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 = toml::from_str(s).unwrap(); + let foo: Foo = 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> = toml::from_str(s).unwrap(); + let foo_outer: Spanned> = 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. -- cgit v1.2.3