aboutsummaryrefslogtreecommitdiff
path: root/test-suite/tests/macros.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-21 14:10:24 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-21 14:10:24 -0600
commit7bbbfd046324363c8db1fb15d39aeb02fe7331b5 (patch)
treea416bb991c23e083d0b5816dfc8b00cd1aceda78 /test-suite/tests/macros.rs
parentb1417006df376e6c406bff43740dd11aa7ef744e (diff)
downloadmilf-rs-main.tar.gz
milf-rs-main.zip
hilarious and original jokeHEADmain
Diffstat (limited to 'test-suite/tests/macros.rs')
-rw-r--r--test-suite/tests/macros.rs38
1 files changed, 19 insertions, 19 deletions
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::<toml::value::Datetime>().unwrap()
+ $s.parse::<milf::value::Datetime>().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 <alex@alexcrichton.com>"]
@@ -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 <alex@alexcrichton.com>".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]