You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/jsonschema/src/keywords/mod.rs
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -400,7 +400,11 @@ mod tests {
400
400
#[test_case(&json!({"anyOf":[{"type":"integer"},{"minimum":2}]}),&json!(1.5),r"1.5 is not valid under any of the schemas listed in the 'anyOf' keyword")]
401
401
#[test_case(&json!({"const":2}),&json!(5),r"2 was expected")]
402
402
#[test_case(&json!({"contains":{"minimum":5}}),&json!([2,3,4]),r"None of [2,3,4] are valid under the given schema")]
403
-
#[test_case(&json!({"enum":[1,2,3]}),&json!(4),r"4 is not one of [1,2,3]")]
403
+
#[test_case(&json!({"enum":[1]}),&json!(4),r"4 is not one of 1")]
404
+
#[test_case(&json!({"enum":[1,2]}),&json!(4),r"4 is not one of 1 or 2")]
405
+
#[test_case(&json!({"enum":[1,2,3]}),&json!(4),r"4 is not one of 1, 2 or 3")]
406
+
#[test_case(&json!({"enum":[1,2,3,4]}),&json!(5),r"5 is not one of 1, 2 or 2 other candidates")]
407
+
#[test_case(&json!({"enum":[1,2,3,4,5]}),&json!(6),r"6 is not one of 1, 2 or 3 other candidates")]
404
408
#[test_case(&json!({"exclusiveMaximum":3}),&json!(3.0),r"3.0 is greater than or equal to the maximum of 3")]
405
409
#[test_case(&json!({"exclusiveMaximum":3.0}),&json!(3.0),r"3.0 is greater than or equal to the maximum of 3.0")]
406
410
#[test_case(&json!({"exclusiveMinimum":1}),&json!(1.0),r"1.0 is less than or equal to the minimum of 1")]
0 commit comments