-
-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port rust_decimal/bigdecimal tests to new integration test style
- Loading branch information
Showing
9 changed files
with
38 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use crate::prelude::*; | ||
|
||
#[test] | ||
fn decimal_types() { | ||
#[cfg(feature = "rust_decimal1")] | ||
test!(rust_decimal1::Decimal) | ||
.assert_snapshot() | ||
.assert_allows_ser_roundtrip_default() | ||
.assert_matches_de_roundtrip(arbitrary_values()); | ||
|
||
#[cfg(feature = "bigdecimal04")] | ||
test!(bigdecimal04::BigDecimal) | ||
.assert_snapshot() | ||
.assert_allows_ser_roundtrip_default() | ||
.assert_matches_de_roundtrip(arbitrary_values()); | ||
|
||
#[cfg(all(feature = "rust_decimal1", feature = "bigdecimal04"))] | ||
test!(bigdecimal04::BigDecimal).assert_identical::<rust_decimal1::Decimal>(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
6 changes: 6 additions & 0 deletions
6
.../tests/integration/snapshots/schemars/tests/integration/decimal.rs~decimal_types.ser.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "Decimal", | ||
"type": "string", | ||
"pattern": "^-?[0-9]+(\\.[0-9]+)?$" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters