Support uuid v1 and arrayvec 0.7 (#142)
This commit is contained in:
parent
043d794e39
commit
74974d3e95
15 changed files with 157 additions and 72 deletions
|
@ -1,13 +1,22 @@
|
|||
mod util;
|
||||
use arrayvec::{ArrayString, ArrayVec};
|
||||
use util::*;
|
||||
|
||||
#[test]
|
||||
fn arrayvec() -> TestResult {
|
||||
test_default_generated_schema::<ArrayVec<[i32; 16]>>("arrayvec")
|
||||
fn arrayvec05() -> TestResult {
|
||||
test_default_generated_schema::<arrayvec05::ArrayVec<[i32; 16]>>("arrayvec")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn arrayvec_string() -> TestResult {
|
||||
test_default_generated_schema::<ArrayString<[u8; 16]>>("arrayvec_string")
|
||||
fn arrayvec05_string() -> TestResult {
|
||||
test_default_generated_schema::<arrayvec05::ArrayString<[u8; 16]>>("arrayvec_string")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn arrayvec07() -> TestResult {
|
||||
test_default_generated_schema::<arrayvec07::ArrayVec<i32, 16>>("arrayvec")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn arrayvec07_string() -> TestResult {
|
||||
test_default_generated_schema::<arrayvec07::ArrayString<16>>("arrayvec_string")
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ use pretty_assertions::assert_eq;
|
|||
use schemars::{gen::SchemaSettings, schema::RootSchema, schema_for, JsonSchema};
|
||||
use std::error::Error;
|
||||
use std::fs;
|
||||
use std::panic;
|
||||
|
||||
pub type TestResult = Result<(), Box<dyn Error>>;
|
||||
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
mod util;
|
||||
use util::*;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[test]
|
||||
fn uuid() -> TestResult {
|
||||
test_default_generated_schema::<Uuid>("uuid")
|
||||
fn uuid08() -> TestResult {
|
||||
test_default_generated_schema::<uuid08::Uuid>("uuid")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn uuid1() -> TestResult {
|
||||
test_default_generated_schema::<uuid1::Uuid>("uuid")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue