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/macros.rs | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'test-suite/tests/macros.rs') diff --git a/test-suite/tests/macros.rs b/test-suite/tests/macros.rs index 20831a0..3cc5e81 100644 --- a/test-suite/tests/macros.rs +++ b/test-suite/tests/macros.rs @@ -1,7 +1,7 @@ #![recursion_limit = "256"] #[macro_use] -extern crate toml; +extern crate milf; use std::f64; @@ -9,11 +9,11 @@ macro_rules! table { ($($key:expr => $value:expr,)*) => {{ // https://github.com/rust-lang/rust/issues/60643 #[allow(unused_mut)] - let mut table = toml::value::Table::new(); + let mut table = milf::value::Table::new(); $( table.insert($key.to_string(), $value.into()); )* - toml::Value::Table(table) + milf::Value::Table(table) }}; } @@ -21,22 +21,22 @@ macro_rules! array { ($($element:expr,)*) => {{ // https://github.com/rust-lang/rust/issues/60643 #[allow(unused_mut)] - let mut array = toml::value::Array::new(); + let mut array = milf::value::Array::new(); $( array.push($element.into()); )* - toml::Value::Array(array) + milf::Value::Array(array) }}; } macro_rules! datetime { ($s:tt) => { - $s.parse::().unwrap() + $s.parse::().unwrap() }; } #[test] -fn test_cargo_toml() { +fn test_cargo_milf() { // Simple sanity check of: // // - Ordinary tables @@ -45,9 +45,9 @@ fn test_cargo_toml() { // - String values // - Table keys containing hyphen // - Table headers containing hyphen - let actual = toml! { + let actual = milf! { [package] - name = "toml" + name = "milf" version = "0.4.5" authors = ["Alex Crichton "] @@ -64,7 +64,7 @@ fn test_cargo_toml() { let expected = table! { "package" => table! { - "name" => "toml".to_owned(), + "name" => "milf".to_owned(), "version" => "0.4.5".to_owned(), "authors" => array! { "Alex Crichton ".to_owned(), @@ -89,8 +89,8 @@ fn test_cargo_toml() { #[test] fn test_array() { - // Copied from the TOML spec. - let actual = toml! { + // Copied from the MILF spec. + let actual = milf! { [[fruit]] name = "apple" @@ -144,7 +144,7 @@ fn test_array() { #[test] fn test_number() { - let actual = toml! { + let actual = milf! { positive = 1 negative = -1 table = { positive = 1, negative = -1 } @@ -193,7 +193,7 @@ fn test_number() { #[test] fn test_nan() { - let actual = toml! { + let actual = milf! { sf4 = nan sf5 = +nan sf6 = -nan @@ -205,8 +205,8 @@ fn test_nan() { #[test] fn test_datetime() { - let actual = toml! { - // Copied from the TOML spec. + let actual = milf! { + // Copied from the MILF spec. odt1 = 1979-05-27T07:32:00Z odt2 = 1979-05-27T00:32:00-07:00 odt3 = 1979-05-27T00:32:00.999999-07:00 @@ -284,7 +284,7 @@ fn test_datetime() { // This test requires rustc >= 1.20. #[test] fn test_quoted_key() { - let actual = toml! { + let actual = milf! { "quoted" = true table = { "quoted" = true } @@ -311,7 +311,7 @@ fn test_quoted_key() { #[test] fn test_empty() { - let actual = toml! { + let actual = milf! { empty_inline_table = {} empty_inline_array = [] @@ -334,7 +334,7 @@ fn test_empty() { #[test] fn test_dotted_keys() { - let actual = toml! { + let actual = milf! { a.b = 123 a.c = 1979-05-27T07:32:00Z [table] -- cgit v1.2.3