Skip to content

Commit

Permalink
Port smol_str test to new integration test style
Browse files Browse the repository at this point in the history
  • Loading branch information
GREsau committed Sep 12, 2024
1 parent 26c26bd commit 441fb70
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 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.

1 change: 1 addition & 0 deletions schemars/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ indexmap2 = { version = "2.0", default-features = false, features = ["serde"], p
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" }
smol_str02 = { version = "0.2.1", default-features = false, features = ["serde"], package = "smol_str" }
url2 = { version = "2.0", default-features = false, features = ["serde"], package = "url" }
uuid1 = { version = "1.0", default-features = false, features = ["serde"], package = "uuid" }

Expand Down
5 changes: 0 additions & 5 deletions schemars/tests/expected/smol_str.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 @@ -33,6 +33,8 @@ mod same_name;
mod semver;
#[cfg(feature = "smallvec1")]
mod smallvec;
#[cfg(feature = "smol_str02")]
mod smol_str;
mod std_types;
#[cfg(feature = "url2")]
mod url;
Expand Down
11 changes: 11 additions & 0 deletions schemars/tests/integration/smol_str.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use smol_str02::SmolStr;

use crate::prelude::*;

#[test]
fn smol_str() {
test!(SmolStr)
.assert_identical::<String>()
.assert_allows_ser_roundtrip(["".into(), "test".into()])
.assert_matches_de_roundtrip(arbitrary_values());
}
8 changes: 0 additions & 8 deletions schemars/tests/smol_str.rs

This file was deleted.

0 comments on commit 441fb70

Please sign in to comment.