From 06f916cb60808edba0690a91430cef40a5fdfdd4 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Mon, 14 May 2018 16:59:24 +0200 Subject: Add the preserve_order feature --- test-suite/tests/display.rs | 5 ++--- test-suite/tests/serde.rs | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'test-suite/tests') diff --git a/test-suite/tests/display.rs b/test-suite/tests/display.rs index ca4fdd8..0174de1 100644 --- a/test-suite/tests/display.rs +++ b/test-suite/tests/display.rs @@ -1,11 +1,10 @@ extern crate toml; -use std::collections::BTreeMap; - use toml::Value::{String, Integer, Float, Boolean, Array, Table}; +use toml::map::Map; macro_rules! map( ($($k:expr => $v:expr),*) => ({ - let mut _m = BTreeMap::new(); + let mut _m = Map::new(); $(_m.insert($k.to_string(), $v);)* _m }) ); diff --git a/test-suite/tests/serde.rs b/test-suite/tests/serde.rs index c1b6d78..6bcd145 100644 --- a/test-suite/tests/serde.rs +++ b/test-suite/tests/serde.rs @@ -9,6 +9,7 @@ use serde::{Deserialize, Deserializer}; use toml::Value; use toml::Value::{Table, Integer, Array, Float}; +use toml::map::Map; macro_rules! t { ($e:expr) => (match $e { @@ -63,7 +64,7 @@ macro_rules! error { } macro_rules! map( ($($k:ident: $v:expr),*) => ({ - let mut _m = BTreeMap::new(); + let mut _m = Map::new(); $(_m.insert(stringify!($k).to_string(), $v);)* _m }) ); @@ -97,7 +98,7 @@ fn smoke_hyphen() { a_b: isize, } - let mut m = BTreeMap::new(); + let mut m = Map::new(); m.insert("a-b".to_string(), Integer(2)); equivalent! { Foo2 { a_b: 2 }, -- cgit v1.2.3 From 0372ba6925aa2c6db4d27022562064e25cdc5312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 28 Dec 2018 15:39:48 +0100 Subject: Update the serde test-suite map! macro --- test-suite/tests/serde.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-suite/tests') diff --git a/test-suite/tests/serde.rs b/test-suite/tests/serde.rs index 6bcd145..9bbf7e0 100644 --- a/test-suite/tests/serde.rs +++ b/test-suite/tests/serde.rs @@ -65,7 +65,7 @@ macro_rules! error { macro_rules! map( ($($k:ident: $v:expr),*) => ({ let mut _m = Map::new(); - $(_m.insert(stringify!($k).to_string(), $v);)* + $(_m.insert(stringify!($k).to_string(), t!(Value::try_from($v)));)* _m }) ); -- cgit v1.2.3