mirror of
https://github.com/serde-rs/json.git
synced 2025-10-02 15:26:00 +00:00
fix(tests): Fix the skeptic tests on stable rust
This commit is contained in:
parent
c53ce95dbb
commit
7bc9b0a98e
@ -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"
|
||||
|
@ -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"]);
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
#![cfg(feature = "nightly-testing")]
|
||||
#![allow(toplevel_ref_arg)]
|
||||
#![allow(useless_format)]
|
||||
|
||||
include!(concat!(env!("OUT_DIR"), "/skeptic-tests.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"));
|
||||
}
|
||||
|
@ -1,3 +1,2 @@
|
||||
mod skeptic;
|
||||
mod test_json;
|
||||
mod test_json_builder;
|
||||
|
Loading…
x
Reference in New Issue
Block a user