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 show;
mod serialization;
#[cfg(test)]mod test;
/// Representation of a TOML value.
#[derive(PartialEq, Clone, Show)]
#[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) {
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::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