diff --git a/json_tests/Cargo.toml b/json_tests/Cargo.toml index fd0535d..278bc1c 100644 --- a/json_tests/Cargo.toml +++ b/json_tests/Cargo.toml @@ -7,12 +7,12 @@ build = "build.rs" [features] default = ["serde_macros"] with-syntex = ["syntex", "serde_codegen"] -nightly-testing = ["clippy", "skeptic", "serde_json/clippy"] +nightly-testing = ["clippy", "serde_json/clippy"] [build-dependencies] syntex = { version = "*", optional = true } serde_codegen = { version = "*", optional = true } -skeptic = { version = "^0.4.0", optional = true } +skeptic = "^0.4.0" [dependencies] clippy = { version = "^0.*", optional = true } @@ -21,7 +21,7 @@ rustc-serialize = "*" serde = "*" serde_json = { version = "*", path = "../json" } serde_macros = { version = "*", optional = true } -skeptic = { version = "^0.4.0", optional = true } +skeptic = "^0.4.0" [[test]] name = "test" diff --git a/json_tests/build.rs b/json_tests/build.rs index f0988df..80123c0 100644 --- a/json_tests/build.rs +++ b/json_tests/build.rs @@ -1,3 +1,5 @@ +extern crate skeptic; + #[cfg(feature = "with-syntex")] mod with_syntex { extern crate syntex; @@ -29,21 +31,8 @@ mod with_syntex { pub fn main() {} } -#[cfg(feature = "nightly-testing")] -mod nightly { - extern crate skeptic; - - pub fn main() { - skeptic::generate_doc_tests(&["../README.md"]); - } -} - -#[cfg(not(feature = "nightly-testing"))] -mod nightly { - pub fn main() {} -} - pub fn main() { with_syntex::main(); - nightly::main(); + + skeptic::generate_doc_tests(&["../README.md"]); } diff --git a/json_tests/tests/skeptic.rs b/json_tests/tests/skeptic.rs deleted file mode 100644 index 61e4ca1..0000000 --- a/json_tests/tests/skeptic.rs +++ /dev/null @@ -1,5 +0,0 @@ -#![cfg(feature = "nightly-testing")] -#![allow(toplevel_ref_arg)] -#![allow(useless_format)] - -include!(concat!(env!("OUT_DIR"), "/skeptic-tests.rs")); diff --git a/json_tests/tests/test.rs b/json_tests/tests/test.rs index 5e77327..cd709e4 100644 --- a/json_tests/tests/test.rs +++ b/json_tests/tests/test.rs @@ -6,9 +6,18 @@ extern crate serde; extern crate serde_json; +extern crate skeptic; #[cfg(feature = "with-syntex")] include!(concat!(env!("OUT_DIR"), "/test.rs")); #[cfg(not(feature = "with-syntex"))] include!("test.rs.in"); + +#[cfg(feature = "nightly-testing")] +mod skeptic_tests { + #![cfg_attr(feature = "nightly-testing", allow(toplevel_ref_arg))] + #![cfg_attr(feature = "nightly-testing", allow(useless_format))] + + include!(concat!(env!("OUT_DIR"), "/skeptic-tests.rs")); +} diff --git a/json_tests/tests/test.rs.in b/json_tests/tests/test.rs.in index 2f3a7a2..a921739 100644 --- a/json_tests/tests/test.rs.in +++ b/json_tests/tests/test.rs.in @@ -1,3 +1,2 @@ -mod skeptic; mod test_json; mod test_json_builder;