Skip to content

Commit

Permalink
Port smallvec tests to new integration test style
Browse files Browse the repository at this point in the history
  • Loading branch information
GREsau committed Sep 11, 2024
1 parent 9dc98c3 commit c16a901
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

9 changes: 3 additions & 6 deletions schemars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ validator = { version = "0.18.1", features = ["derive"] }
regex = { version = "1.10.6", default-features = false }

arrayvec07 = { version = "0.7", default-features = false, features = ["serde"], package = "arrayvec"}
bigdecimal04 = { version = "0.4", default-features = false, features = ["serde"], package = "bigdecimal" }
bytes1 = { version = "1.0", default-features = false, features = ["serde"], package = "bytes" }
chrono04 = { version = "0.4", default-features = false, features = ["serde"], package = "chrono" }
bigdecimal04 = { version = "0.4", default-features = false, features = ["serde"], package = "bigdecimal" }
rust_decimal1 = { version = "1", default-features = false, features = ["serde"], package = "rust_decimal" }
either1 = { version = "1.3", default-features = false, features = ["serde"], package = "either" }
indexmap2 = { version = "2.0", default-features = false, features = ["serde"], package = "indexmap" }
rust_decimal1 = { version = "1", default-features = false, features = ["serde"], package = "rust_decimal" }
semver1 = { version = "1.0.9", default-features = false, features = ["serde"], package = "semver" }
smallvec1 = { version = "1.0", default-features = false, features = ["serde"], package = "smallvec" }

[features]
default = ["derive", "std"]
Expand Down Expand Up @@ -83,10 +84,6 @@ required-features = ["_ui_test"]
name = "uuid"
required-features = ["uuid1"]

[[test]]
name = "smallvec"
required-features = ["smallvec1"]

[[test]]
name = "url"
required-features = ["url2"]
Expand Down
8 changes: 0 additions & 8 deletions schemars/tests/expected/smallvec.json

This file was deleted.

2 changes: 2 additions & 0 deletions schemars/tests/integration/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ mod macros;
mod same_name;
#[cfg(feature = "semver1")]
mod semver;
#[cfg(feature = "smallvec1")]
mod smallvec;
mod std_types;
mod validator;

Expand Down
10 changes: 10 additions & 0 deletions schemars/tests/integration/smallvec.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::prelude::*;
use smallvec1::{smallvec, SmallVec};

#[test]
fn smallvec() {
test!(SmallVec<[usize; 2]>)
.assert_identical::<Vec<usize>>()
.assert_allows_ser_roundtrip([smallvec![], smallvec![1, 2, 3, 4, 5]])
.assert_matches_de_roundtrip(arbitrary_values());
}
8 changes: 0 additions & 8 deletions schemars/tests/smallvec.rs

This file was deleted.

0 comments on commit c16a901

Please sign in to comment.