File tree Expand file tree Collapse file tree 5 files changed +64
-3
lines changed
test-suites/src/commonTest/kotlin/io/github/optimumcode/json/schema/suite Expand file tree Collapse file tree 5 files changed +64
-3
lines changed Original file line number Diff line number Diff line change 1+ package io.github.optimumcode.json.schema.suite.draft2019_09
2+
3+ import io.github.optimumcode.json.schema.SchemaType.DRAFT_2019_09
4+ import io.github.optimumcode.json.schema.suite.COMMON_FORMAT_FILTER
5+ import io.github.optimumcode.json.schema.suite.TestFilter
6+ import io.github.optimumcode.json.schema.suite.runTestSuites
7+ import io.kotest.core.spec.style.FunSpec
8+
9+ @Suppress(" unused" , " ClassName" )
10+ internal class Draft2019_09_TestSuite : FunSpec () {
11+ init {
12+ runTestSuites(
13+ draftName = " draft2019-09" ,
14+ schemaType = DRAFT_2019_09 ,
15+ filter =
16+ TestFilter (
17+ excludeSuites =
18+ mapOf (
19+ // impl does not support referencing external schemas
20+ " minContains" to
21+ setOf (
22+ // this is very questionable tests - the 'contains' should fail
23+ // if there is no match to it according to spec
24+ " minContains = 0 with no maxContains" ,
25+ ),
26+ ),
27+ excludeTests =
28+ mapOf (
29+ // this is very questionable tests - the 'contains' should fail if there is no match to it according to spec
30+ " minContains = 0 with maxContains" to
31+ setOf (
32+ " empty data" ,
33+ ),
34+ ),
35+ ),
36+ formatFilter = COMMON_FORMAT_FILTER ,
37+ )
38+ }
39+ }
Original file line number Diff line number Diff line change 1+ package io.github.optimumcode.json.schema.suite.draft2020_12
2+
3+ import io.github.optimumcode.json.schema.suite.TestFilter
4+ import io.github.optimumcode.json.schema.suite.runTestSuites
5+ import io.kotest.core.spec.style.FunSpec
6+
7+ @Suppress(" unused" , " ClassName" )
8+ internal class Draft2020_12_TestSuite : FunSpec () {
9+ init {
10+ runTestSuites(
11+ draftName = " draft2020-12" ,
12+ formatFilter =
13+ TestFilter (
14+ excludeSuites =
15+ mapOf (
16+ // Kotlin regex is not ECMA script
17+ " ecmascript-regex" to setOf (),
18+ ),
19+ ),
20+ )
21+ }
22+ }
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import io.github.optimumcode.json.schema.suite.runTestSuites
66import io.kotest.core.spec.style.FunSpec
77
88@Suppress(" unused" )
9- internal class TestSuite : FunSpec () {
9+ internal class Draft4TestSuite : FunSpec () {
1010 init {
1111 runTestSuites(
1212 draftName = " draft4" ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import io.github.optimumcode.json.schema.suite.runTestSuites
66import io.kotest.core.spec.style.FunSpec
77
88@Suppress(" unused" )
9- internal class TestSuite : FunSpec () {
9+ internal class Draft6TestSuite : FunSpec () {
1010 init {
1111 runTestSuites(
1212 draftName = " draft6" ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import io.github.optimumcode.json.schema.suite.runTestSuites
66import io.kotest.core.spec.style.FunSpec
77
88@Suppress(" unused" )
9- internal class TestSuite : FunSpec () {
9+ internal class Draft7TestSuite : FunSpec () {
1010 init {
1111 runTestSuites(
1212 draftName = " draft7" ,
You can’t perform that action at this time.
0 commit comments