Skip to content

Commit

Permalink
Merge pull request #2228 from serde-rs/expandtest
Browse files Browse the repository at this point in the history
Update macrotest to 1.0.9 and enable in CI
  • Loading branch information
dtolnay committed Jun 20, 2022
2 parents 227bf30 + bac90d1 commit 7891ae7
Show file tree
Hide file tree
Showing 14 changed files with 941 additions and 673 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Expand Up @@ -16,6 +16,10 @@ jobs:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
- run: cd test_suite && cargo test --features unstable
- uses: dtolnay/install@cargo-expand
if: github.event_name != 'pull_request'
- run: cd test_suite && cargo test --features expandtest --test expandtest -- --include-ignored
if: github.event_name != 'pull_request'

windows:
name: Test suite (windows)
Expand Down
3 changes: 2 additions & 1 deletion test_suite/Cargo.toml
Expand Up @@ -18,7 +18,8 @@ toolchain_find = "0.2"

[dev-dependencies]
fnv = "1.0"
macrotest = "=1.0.0"
macrotest = "=1.0.9"
prettyplease = "=0.1.14"
rustversion = "1.0"
serde = { path = "../serde", features = ["rc", "derive"] }
serde_derive = { path = "../serde_derive", features = ["deserialize_in_place"] }
Expand Down
6 changes: 1 addition & 5 deletions test_suite/build.rs
Expand Up @@ -18,12 +18,8 @@ fn has_cargo_expand() -> bool {
.unwrap_or(false)
}

fn has_rustfmt() -> bool {
toolchain_find::find_installed_component("rustfmt").is_some()
}

fn main() {
if cfg!(feature = "expandtest") && has_cargo_expand() && has_rustfmt() {
if cfg!(feature = "expandtest") && has_cargo_expand() {
println!("cargo:rustc-cfg=expandtest");
}
}
333 changes: 161 additions & 172 deletions test_suite/tests/expand/de_enum.expanded.rs

Large diffs are not rendered by default.

148 changes: 93 additions & 55 deletions test_suite/tests/expand/default_ty_param.expanded.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7891ae7

Please sign in to comment.