Move tests to integration tests
This commit is contained in:
parent
aef183823c
commit
0d8ce979a4
|
@ -60,7 +60,7 @@ pub use serialization::DecodeErrorKind::{ExpectedType, NilTooLong};
|
|||
mod parser;
|
||||
mod show;
|
||||
mod serialization;
|
||||
#[cfg(test)]mod test;
|
||||
|
||||
/// Representation of a TOML value.
|
||||
#[derive(PartialEq, Clone, Show)]
|
||||
#[allow(missing_docs)]
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
mod valid;
|
||||
mod invalid;
|
|
@ -1,4 +1,6 @@
|
|||
use {Parser};
|
||||
extern crate toml;
|
||||
|
||||
use toml::{Parser};
|
||||
|
||||
fn run(toml: &str) {
|
||||
let mut p = Parser::new(toml);
|
|
@ -1,11 +1,12 @@
|
|||
extern crate serialize;
|
||||
extern crate "rustc-serialize" as rustc_serialize;
|
||||
extern crate toml;
|
||||
|
||||
use std::num::strconv;
|
||||
use std::collections::BTreeMap;
|
||||
use self::serialize::json::{self, Json};
|
||||
use rustc_serialize::json::Json;
|
||||
|
||||
use {Parser, Value};
|
||||
use Value::{Table, Integer, Float, Boolean, Datetime, Array};
|
||||
use toml::{Parser, Value};
|
||||
use toml::Value::{Table, Integer, Float, Boolean, Datetime, Array};
|
||||
|
||||
fn to_json(toml: Value) -> Json {
|
||||
fn doit(s: &str, json: Json) -> Json {
|
||||
|
@ -53,7 +54,7 @@ fn run(toml: &str, json: &str) {
|
|||
assert!(table.is_some());
|
||||
let table = table.unwrap();
|
||||
|
||||
let json = json::from_str(json).unwrap();
|
||||
let json = Json::from_str(json).unwrap();
|
||||
let toml_json = to_json(Table(table));
|
||||
assert!(json == toml_json,
|
||||
"expected\n{}\ngot\n{}\n",
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue