Move tests to integration tests

This commit is contained in:
Alex Crichton 2015-01-15 12:44:05 -08:00
parent aef183823c
commit 0d8ce979a4
105 changed files with 10 additions and 9 deletions

View file

@ -60,7 +60,7 @@ pub use serialization::DecodeErrorKind::{ExpectedType, NilTooLong};
mod parser; mod parser;
mod show; mod show;
mod serialization; mod serialization;
#[cfg(test)]mod test;
/// Representation of a TOML value. /// Representation of a TOML value.
#[derive(PartialEq, Clone, Show)] #[derive(PartialEq, Clone, Show)]
#[allow(missing_docs)] #[allow(missing_docs)]

View file

@ -1,2 +0,0 @@
mod valid;
mod invalid;

View file

@ -1,4 +1,6 @@
use {Parser}; extern crate toml;
use toml::{Parser};
fn run(toml: &str) { fn run(toml: &str) {
let mut p = Parser::new(toml); let mut p = Parser::new(toml);

View file

@ -1,11 +1,12 @@
extern crate serialize; extern crate "rustc-serialize" as rustc_serialize;
extern crate toml;
use std::num::strconv; use std::num::strconv;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use self::serialize::json::{self, Json}; use rustc_serialize::json::Json;
use {Parser, Value}; use toml::{Parser, Value};
use Value::{Table, Integer, Float, Boolean, Datetime, Array}; use toml::Value::{Table, Integer, Float, Boolean, Datetime, Array};
fn to_json(toml: Value) -> Json { fn to_json(toml: Value) -> Json {
fn doit(s: &str, json: Json) -> Json { fn doit(s: &str, json: Json) -> Json {
@ -53,7 +54,7 @@ fn run(toml: &str, json: &str) {
assert!(table.is_some()); assert!(table.is_some());
let table = table.unwrap(); 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)); let toml_json = to_json(Table(table));
assert!(json == toml_json, assert!(json == toml_json,
"expected\n{}\ngot\n{}\n", "expected\n{}\ngot\n{}\n",

Some files were not shown because too many files have changed in this diff Show more