diff --git a/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt b/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt index 207cadfb..7cc4faeb 100644 --- a/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt +++ b/buildSrc/src/main/kotlin/org/kson/jsonsuite/JsonTestSuiteGenerator.kt @@ -229,10 +229,8 @@ private fun generateSchemaSuiteTestClasses( ): String { return """package $testClassPackage -import org.kson.CoreCompileConfig -import org.kson.Kson +import org.kson.schema.JsonSchemaTest import kotlin.test.Test -import kotlin.test.assertEquals /** * DO NOT MANUALLY EDIT. This class is GENERATED by `./gradlew generateJsonTestSuite` task @@ -242,12 +240,12 @@ import kotlin.test.assertEquals * removing exclusions from [org.kson.jsonsuite.schemaTestSuiteExclusions] */ @Suppress("UNREACHABLE_CODE") // unreachable code is okay here until we complete the above TODO -class SchemaSuiteTest { +class SchemaSuiteTest : JsonSchemaTest { ${ tests.joinToString("\n") { val theTests = ArrayList() for (schema in it.schemaTestGroups) { - val schemaComment = if (schema.comment != null) "// " + schema.comment + "\n" else "" + val schemaComment = if (schema.comment != null) "// " + schema.comment else "" for (test in schema.tests) { // construct a legal and unique name for this test val schemaTestName = "${formatForTestName(it.testFileName)}_${formatForTestName(schema.description)}_${formatForTestName(test.description)}" @@ -271,12 +269,13 @@ ${ tests.joinToString("\n") { else { "" }} + | $schemaComment | assertKsonEnforcesSchema( | ${"\"\"\""} | ${formatForTest(test.data)} | ${"\"\"\""}, | ${"\"\"\""} - | ${schemaComment}${formatForTest(schema.schema)} + | ${formatForTest(schema.schema)} | ${"\"\"\""}, | ${test.valid}, | ${"\"\"\""}${formatForTest(schema.description)} -> ${formatForTest(test.description)}${"\"\"\""}) @@ -287,22 +286,6 @@ ${ tests.joinToString("\n") { } theTests.joinToString("\n\n") }} - - private fun assertKsonEnforcesSchema(ksonSource: String, - schemaJson: String, - shouldAcceptAsValid: Boolean, - description: String) { - // accepted as valid if and only if we parsed without error - val acceptedAsValid = !Kson.parseToAst( - ksonSource.trimIndent(), - coreCompileConfig = CoreCompileConfig(schemaJson = schemaJson.trimIndent())) - .hasErrors() - - assertEquals( - shouldAcceptAsValid, - acceptedAsValid, - description) - } } """ } diff --git a/buildSrc/src/main/kotlin/org/kson/jsonsuite/SchemaTestSuiteExclusionsList.kt b/buildSrc/src/main/kotlin/org/kson/jsonsuite/SchemaTestSuiteExclusionsList.kt index d5f3bf52..80743feb 100644 --- a/buildSrc/src/main/kotlin/org/kson/jsonsuite/SchemaTestSuiteExclusionsList.kt +++ b/buildSrc/src/main/kotlin/org/kson/jsonsuite/SchemaTestSuiteExclusionsList.kt @@ -9,637 +9,16 @@ package org.kson.jsonsuite * as support is filled out */ fun schemaTestSuiteExclusions() = setOf( - "additionalItems_additionalItemsAreAllowedByDefault_onlyTheFirstItemIsValidated", - "additionalItems_additionalItemsAsFalseWithoutItems_ignoresNon_arrays", - "additionalItems_additionalItemsAsFalseWithoutItems_itemsDefaultsToEmptySchemaSoEverythingIsValid", - "additionalItems_additionalItemsAsSchema_additionalItemsDoNotMatchSchema", - "additionalItems_additionalItemsAsSchema_additionalItemsMatchSchema", - "additionalItems_additionalItemsDoesNotLookInApplicators_InvalidCase_itemsDefinedInAllOfAreNotExamined", - "additionalItems_additionalItemsDoesNotLookInApplicators_ValidCase_itemsDefinedInAllOfAreNotExamined", - "additionalItems_additionalItemsWithHeterogeneousArray_heterogeneousInvalidInstance", - "additionalItems_additionalItemsWithHeterogeneousArray_validInstance", - "additionalItems_additionalItemsWithNullInstanceElements_allowsNullElements", - "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_additionalItemsAreNotPermitted", - "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_emptyArray", - "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_equalNumberOfItemsPresent", - "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_fewerNumberOfItemsPresent_1_", - "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_fewerNumberOfItemsPresent_2_", - "additionalItems_itemsValidationAdjustsTheStartingIndexForAdditionalItems_validItems", - "additionalItems_itemsValidationAdjustsTheStartingIndexForAdditionalItems_wrongTypeOfSecondItem", - "additionalItems_whenItemsIsSchema_AdditionalItemsDoesNothing_invalidWithAArrayOfMixedTypes", - "additionalItems_whenItemsIsSchema_AdditionalItemsDoesNothing_validWithAArrayOfTypeIntegers", - "additionalItems_whenItemsIsSchema_BooleanAdditionalItemsDoesNothing_allItemsMatchSchema", - "additionalProperties_additionalPropertiesAreAllowedByDefault_additionalPropertiesAreAllowed", - "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_anAdditionalPropertyIsInvalid", - "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresArrays", - "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresOtherNon_objects", - "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresStrings", - "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_noAdditionalPropertiesIsValid", - "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_patternPropertiesAreNotAdditionalProperties", - "additionalProperties_additionalPropertiesCanExistByItself_anAdditionalInvalidPropertyIsInvalid", - "additionalProperties_additionalPropertiesCanExistByItself_anAdditionalValidPropertyIsValid", - "additionalProperties_additionalPropertiesDoesNotLookInApplicators_propertiesDefinedInAllOfAreNotExamined", - "additionalProperties_additionalPropertiesWithNullValuedInstanceProperties_allowsNullValues", - "additionalProperties_additionalPropertiesWithSchema_anAdditionalInvalidPropertyIsInvalid", - "additionalProperties_additionalPropertiesWithSchema_anAdditionalValidPropertyIsValid", - "additionalProperties_additionalPropertiesWithSchema_noAdditionalPropertiesIsValid", - "additionalProperties_non_ASCIIPatternWithAdditionalProperties_matchingThePatternIsValid", - "additionalProperties_non_ASCIIPatternWithAdditionalProperties_notMatchingThePatternIsInvalid", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_False_OneOf_False", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_False_OneOf_True", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_True_OneOf_False", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_True_OneOf_True", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_False_OneOf_False", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_False_OneOf_True", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_True_OneOf_False", - "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_True_OneOf_True", - "allOf_allOfSimpleTypes_mismatchOne", - "allOf_allOfSimpleTypes_valid", - "allOf_allOfWithBaseSchema_mismatchBaseSchema", - "allOf_allOfWithBaseSchema_mismatchBoth", - "allOf_allOfWithBaseSchema_mismatchFirstAllOf", - "allOf_allOfWithBaseSchema_mismatchSecondAllOf", - "allOf_allOfWithBaseSchema_valid", - "allOf_allOfWithBooleanSchemas_AllFalse_anyValueIsInvalid", - "allOf_allOfWithBooleanSchemas_AllTrue_anyValueIsValid", - "allOf_allOfWithBooleanSchemas_SomeFalse_anyValueIsInvalid", - "allOf_allOfWithOneEmptySchema_anyDataIsValid", - "allOf_allOfWithTheFirstEmptySchema_numberIsValid", - "allOf_allOfWithTheFirstEmptySchema_stringIsInvalid", - "allOf_allOfWithTheLastEmptySchema_numberIsValid", - "allOf_allOfWithTheLastEmptySchema_stringIsInvalid", - "allOf_allOfWithTwoEmptySchemas_anyDataIsValid", - "allOf_allOf_allOf", - "allOf_allOf_mismatchFirst", - "allOf_allOf_mismatchSecond", - "allOf_allOf_wrongType", - "allOf_nestedAllOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid", - "allOf_nestedAllOf_ToCheckValidationSemantics_nullIsValid", - "anyOf_anyOfComplexTypes_bothAnyOfValid_complex_", - "anyOf_anyOfComplexTypes_firstAnyOfValid_complex_", - "anyOf_anyOfComplexTypes_neitherAnyOfValid_complex_", - "anyOf_anyOfComplexTypes_secondAnyOfValid_complex_", - "anyOf_anyOfWithBaseSchema_bothAnyOfInvalid", - "anyOf_anyOfWithBaseSchema_mismatchBaseSchema", - "anyOf_anyOfWithBaseSchema_oneAnyOfValid", - "anyOf_anyOfWithBooleanSchemas_AllFalse_anyValueIsInvalid", - "anyOf_anyOfWithBooleanSchemas_AllTrue_anyValueIsValid", - "anyOf_anyOfWithBooleanSchemas_SomeTrue_anyValueIsValid", - "anyOf_anyOfWithOneEmptySchema_numberIsValid", - "anyOf_anyOfWithOneEmptySchema_stringIsValid", - "anyOf_anyOf_bothAnyOfValid", - "anyOf_anyOf_firstAnyOfValid", - "anyOf_anyOf_neitherAnyOfValid", - "anyOf_anyOf_secondAnyOfValid", - "anyOf_nestedAnyOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid", - "anyOf_nestedAnyOf_ToCheckValidationSemantics_nullIsValid", - "boolean_schema_booleanSchema_false__arrayIsInvalid", - "boolean_schema_booleanSchema_false__booleanFalseIsInvalid", - "boolean_schema_booleanSchema_false__booleanTrueIsInvalid", - "boolean_schema_booleanSchema_false__emptyArrayIsInvalid", - "boolean_schema_booleanSchema_false__emptyObjectIsInvalid", - "boolean_schema_booleanSchema_false__nullIsInvalid", - "boolean_schema_booleanSchema_false__numberIsInvalid", - "boolean_schema_booleanSchema_false__objectIsInvalid", - "boolean_schema_booleanSchema_false__stringIsInvalid", - "const_constValidation_anotherTypeIsInvalid", - "const_constValidation_anotherValueIsInvalid", - "const_constValidation_sameValueIsValid", - "const_constWith0DoesNotMatchOtherZero_likeTypes_emptyArrayIsInvalid", - "const_constWith0DoesNotMatchOtherZero_likeTypes_emptyObjectIsInvalid", - "const_constWith0DoesNotMatchOtherZero_likeTypes_emptyStringIsInvalid", - "const_constWith0DoesNotMatchOtherZero_likeTypes_falseIsInvalid", - "const_constWith0DoesNotMatchOtherZero_likeTypes_floatZeroIsValid", - "const_constWith0DoesNotMatchOtherZero_likeTypes_integerZeroIsValid", - "const_constWith1DoesNotMatchTrue_floatOneIsValid", - "const_constWith1DoesNotMatchTrue_integerOneIsValid", - "const_constWith1DoesNotMatchTrue_trueIsInvalid", - "const_constWithArray_anotherArrayItemIsInvalid", - "const_constWithArray_arrayWithAdditionalItemsIsInvalid", - "const_constWithArray_sameArrayIsValid", - "const_constWithFalseDoesNotMatch0_falseIsValid", - "const_constWithFalseDoesNotMatch0_floatZeroIsInvalid", - "const_constWithFalseDoesNotMatch0_integerZeroIsInvalid", - "const_constWithNull_notNullIsInvalid", - "const_constWithNull_nullIsValid", - "const_constWithObject_anotherObjectIsInvalid", - "const_constWithObject_anotherTypeIsInvalid", - "const_constWithObject_sameObjectIsValid", - "const_constWithObject_sameObjectWithDifferentPropertyOrderIsValid", - "const_constWithTrueDoesNotMatch1_floatOneIsInvalid", - "const_constWithTrueDoesNotMatch1_integerOneIsInvalid", - "const_constWithTrueDoesNotMatch1_trueIsValid", - "const_constWith_2_0MatchesIntegerAndFloatTypes_float2_0IsInvalid", - "const_constWith_2_0MatchesIntegerAndFloatTypes_float_2_00001IsInvalid", - "const_constWith_2_0MatchesIntegerAndFloatTypes_float_2_0IsValid", - "const_constWith_2_0MatchesIntegerAndFloatTypes_integer2IsInvalid", - "const_constWith_2_0MatchesIntegerAndFloatTypes_integer_2IsValid", - "const_constWith__a__False_DoesNotMatch__a__0____a__0_0_IsInvalid", - "const_constWith__a__False_DoesNotMatch__a__0____a__0_IsInvalid", - "const_constWith__a__False_DoesNotMatch__a__0____a__False_IsValid", - "const_constWith__a__True_DoesNotMatch__a__1____a__1_0_IsInvalid", - "const_constWith__a__True_DoesNotMatch__a__1____a__1_IsInvalid", - "const_constWith__a__True_DoesNotMatch__a__1____a__True_IsValid", - "const_constWith_false_DoesNotMatch_0___0_0_IsInvalid", - "const_constWith_false_DoesNotMatch_0___0_IsInvalid", - "const_constWith_false_DoesNotMatch_0___false_IsValid", - "const_constWith_true_DoesNotMatch_1___1_0_IsInvalid", - "const_constWith_true_DoesNotMatch_1___1_IsInvalid", - "const_constWith_true_DoesNotMatch_1___true_IsValid", - "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_floatIsValid", - "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_floatMinusOneIsInvalid", - "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_integerIsValid", - "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_integerMinusOneIsInvalid", - "const_nulCharactersInStrings_doNotMatchStringLackingNul", - "const_nulCharactersInStrings_matchStringWithNul", - "contains_containsKeywordValidation_arrayWithItemMatchingSchema_5_IsValid", - "contains_containsKeywordValidation_arrayWithItemMatchingSchema_6_IsValid", - "contains_containsKeywordValidation_arrayWithTwoItemsMatchingSchema_5_6_IsValid", - "contains_containsKeywordValidation_arrayWithoutItemsMatchingSchemaIsInvalid", - "contains_containsKeywordValidation_emptyArrayIsInvalid", - "contains_containsKeywordValidation_notArrayIsValid", - "contains_containsKeywordWithBooleanSchemaFalse_anyNon_emptyArrayIsInvalid", - "contains_containsKeywordWithBooleanSchemaFalse_emptyArrayIsInvalid", - "contains_containsKeywordWithBooleanSchemaFalse_non_arraysAreValid", - "contains_containsKeywordWithBooleanSchemaTrue_anyNon_emptyArrayIsValid", - "contains_containsKeywordWithBooleanSchemaTrue_emptyArrayIsInvalid", - "contains_containsKeywordWithConstKeyword_arrayWithItem5IsValid", - "contains_containsKeywordWithConstKeyword_arrayWithTwoItems5IsValid", - "contains_containsKeywordWithConstKeyword_arrayWithoutItem5IsInvalid", - "contains_containsWithFalseIfSubschema_anyNon_emptyArrayIsValid", - "contains_containsWithFalseIfSubschema_emptyArrayIsInvalid", - "contains_containsWithNullInstanceElements_allowsNullItems", - "contains_items_Contains_doesNotMatchItems_MatchesContains", - "contains_items_Contains_matchesBothItemsAndContains", - "contains_items_Contains_matchesItems_DoesNotMatchContains", - "contains_items_Contains_matchesNeitherItemsNorContains", - "default_invalidStringValueForDefault_stillValidWhenTheInvalidDefaultIsUsed", - "default_invalidStringValueForDefault_validWhenPropertyIsSpecified", - "default_invalidTypeForDefault_stillValidWhenTheInvalidDefaultIsUsed", - "default_invalidTypeForDefault_validWhenPropertyIsSpecified", - "default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_anExplicitPropertyValueIsCheckedAgainstMaximum_failing_", - "default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_anExplicitPropertyValueIsCheckedAgainstMaximum_passing_", - "default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_missingPropertiesAreNotFilledInWithTheDefault", - "definitions_validateDefinitionAgainstMetaschema_invalidDefinitionSchema", - "definitions_validateDefinitionAgainstMetaschema_validDefinitionSchema", - "dependencies_dependenciesWithBooleanSubschemas_emptyObjectIsValid", - "dependencies_dependenciesWithBooleanSubschemas_objectWithBothPropertiesIsInvalid", - "dependencies_dependenciesWithBooleanSubschemas_objectWithPropertyHavingSchemaFalseIsInvalid", - "dependencies_dependenciesWithBooleanSubschemas_objectWithPropertyHavingSchemaTrueIsValid", - "dependencies_dependenciesWithEmptyArray_emptyObject", - "dependencies_dependenciesWithEmptyArray_non_objectIsValid", - "dependencies_dependenciesWithEmptyArray_objectWithOneProperty", - "dependencies_dependenciesWithEscapedCharacters_invalidObject1", - "dependencies_dependenciesWithEscapedCharacters_invalidObject2", - "dependencies_dependenciesWithEscapedCharacters_invalidObject3", - "dependencies_dependenciesWithEscapedCharacters_invalidObject4", - "dependencies_dependenciesWithEscapedCharacters_validObject1", - "dependencies_dependenciesWithEscapedCharacters_validObject2", - "dependencies_dependenciesWithEscapedCharacters_validObject3", - "dependencies_dependencies_ignoresArrays", - "dependencies_dependencies_ignoresOtherNon_objects", - "dependencies_dependencies_ignoresStrings", - "dependencies_dependencies_missingDependency", - "dependencies_dependencies_neither", - "dependencies_dependencies_nondependant", - "dependencies_dependencies_withDependency", - "dependencies_dependentSubschemaIncompatibleWithRoot_matchesBoth", - "dependencies_dependentSubschemaIncompatibleWithRoot_matchesDependency", - "dependencies_dependentSubschemaIncompatibleWithRoot_matchesRoot", - "dependencies_dependentSubschemaIncompatibleWithRoot_noDependency", - "dependencies_multipleDependenciesSubschema_noDependency", - "dependencies_multipleDependenciesSubschema_valid", - "dependencies_multipleDependenciesSubschema_wrongType", - "dependencies_multipleDependenciesSubschema_wrongTypeBoth", - "dependencies_multipleDependenciesSubschema_wrongTypeOther", - "dependencies_multipleDependencies_missingBothDependencies", - "dependencies_multipleDependencies_missingDependency", - "dependencies_multipleDependencies_missingOtherDependency", - "dependencies_multipleDependencies_neither", - "dependencies_multipleDependencies_nondependants", - "dependencies_multipleDependencies_withDependencies", - "enum_enumWith0DoesNotMatchFalse_falseIsInvalid", - "enum_enumWith0DoesNotMatchFalse_floatZeroIsValid", - "enum_enumWith0DoesNotMatchFalse_integerZeroIsValid", - "enum_enumWith1DoesNotMatchTrue_floatOneIsValid", - "enum_enumWith1DoesNotMatchTrue_integerOneIsValid", - "enum_enumWith1DoesNotMatchTrue_trueIsInvalid", - "enum_enumWithEscapedCharacters_anotherStringIsInvalid", - "enum_enumWithEscapedCharacters_member1IsValid", - "enum_enumWithEscapedCharacters_member2IsValid", - "enum_enumWithFalseDoesNotMatch0_falseIsValid", - "enum_enumWithFalseDoesNotMatch0_floatZeroIsInvalid", - "enum_enumWithFalseDoesNotMatch0_integerZeroIsInvalid", - "enum_enumWithTrueDoesNotMatch1_floatOneIsInvalid", - "enum_enumWithTrueDoesNotMatch1_integerOneIsInvalid", - "enum_enumWithTrueDoesNotMatch1_trueIsValid", - "enum_enumWith_0_DoesNotMatch_false___0_0_IsValid", - "enum_enumWith_0_DoesNotMatch_false___0_IsValid", - "enum_enumWith_0_DoesNotMatch_false___false_IsInvalid", - "enum_enumWith_1_DoesNotMatch_true___1_0_IsValid", - "enum_enumWith_1_DoesNotMatch_true___1_IsValid", - "enum_enumWith_1_DoesNotMatch_true___true_IsInvalid", - "enum_enumWith_false_DoesNotMatch_0___0_0_IsInvalid", - "enum_enumWith_false_DoesNotMatch_0___0_IsInvalid", - "enum_enumWith_false_DoesNotMatch_0___false_IsValid", - "enum_enumWith_true_DoesNotMatch_1___1_0_IsInvalid", - "enum_enumWith_true_DoesNotMatch_1___1_IsInvalid", - "enum_enumWith_true_DoesNotMatch_1___true_IsValid", - "enum_enumsInProperties_bothPropertiesAreValid", - "enum_enumsInProperties_missingAllPropertiesIsInvalid", - "enum_enumsInProperties_missingOptionalPropertyIsValid", - "enum_enumsInProperties_missingRequiredPropertyIsInvalid", - "enum_enumsInProperties_wrongBarValue", - "enum_enumsInProperties_wrongFooValue", - "enum_heterogeneousEnumValidation_extraPropertiesInObjectIsInvalid", - "enum_heterogeneousEnumValidation_objectsAreDeepCompared", - "enum_heterogeneousEnumValidation_oneOfTheEnumIsValid", - "enum_heterogeneousEnumValidation_somethingElseIsInvalid", - "enum_heterogeneousEnumValidation_validObjectMatches", - "enum_heterogeneousEnum_with_nullValidation_nullIsValid", - "enum_heterogeneousEnum_with_nullValidation_numberIsValid", - "enum_heterogeneousEnum_with_nullValidation_somethingElseIsInvalid", - "enum_nulCharactersInStrings_doNotMatchStringLackingNul", - "enum_nulCharactersInStrings_matchStringWithNul", - "enum_simpleEnumValidation_oneOfTheEnumIsValid", - "enum_simpleEnumValidation_somethingElseIsInvalid", - "exclusiveMaximum_exclusiveMaximumValidation_aboveTheExclusiveMaximumIsInvalid", - "exclusiveMaximum_exclusiveMaximumValidation_belowTheExclusiveMaximumIsValid", - "exclusiveMaximum_exclusiveMaximumValidation_boundaryPointIsInvalid", - "exclusiveMaximum_exclusiveMaximumValidation_ignoresNon_numbers", - "exclusiveMinimum_exclusiveMinimumValidation_aboveTheExclusiveMinimumIsValid", - "exclusiveMinimum_exclusiveMinimumValidation_belowTheExclusiveMinimumIsInvalid", - "exclusiveMinimum_exclusiveMinimumValidation_boundaryPointIsInvalid", - "exclusiveMinimum_exclusiveMinimumValidation_ignoresNon_numbers", - "format_dateFormat_allStringFormatsIgnoreArrays", - "format_dateFormat_allStringFormatsIgnoreBooleans", - "format_dateFormat_allStringFormatsIgnoreFloats", - "format_dateFormat_allStringFormatsIgnoreIntegers", - "format_dateFormat_allStringFormatsIgnoreNulls", - "format_dateFormat_allStringFormatsIgnoreObjects", - "format_date_timeFormat_allStringFormatsIgnoreArrays", - "format_date_timeFormat_allStringFormatsIgnoreBooleans", - "format_date_timeFormat_allStringFormatsIgnoreFloats", - "format_date_timeFormat_allStringFormatsIgnoreIntegers", - "format_date_timeFormat_allStringFormatsIgnoreNulls", - "format_date_timeFormat_allStringFormatsIgnoreObjects", - "format_emailFormat_allStringFormatsIgnoreArrays", - "format_emailFormat_allStringFormatsIgnoreBooleans", - "format_emailFormat_allStringFormatsIgnoreFloats", - "format_emailFormat_allStringFormatsIgnoreIntegers", - "format_emailFormat_allStringFormatsIgnoreNulls", - "format_emailFormat_allStringFormatsIgnoreObjects", - "format_hostnameFormat_allStringFormatsIgnoreArrays", - "format_hostnameFormat_allStringFormatsIgnoreBooleans", - "format_hostnameFormat_allStringFormatsIgnoreFloats", - "format_hostnameFormat_allStringFormatsIgnoreIntegers", - "format_hostnameFormat_allStringFormatsIgnoreNulls", - "format_hostnameFormat_allStringFormatsIgnoreObjects", - "format_idn_emailFormat_allStringFormatsIgnoreArrays", - "format_idn_emailFormat_allStringFormatsIgnoreBooleans", - "format_idn_emailFormat_allStringFormatsIgnoreFloats", - "format_idn_emailFormat_allStringFormatsIgnoreIntegers", - "format_idn_emailFormat_allStringFormatsIgnoreNulls", - "format_idn_emailFormat_allStringFormatsIgnoreObjects", - "format_idn_hostnameFormat_allStringFormatsIgnoreArrays", - "format_idn_hostnameFormat_allStringFormatsIgnoreBooleans", - "format_idn_hostnameFormat_allStringFormatsIgnoreFloats", - "format_idn_hostnameFormat_allStringFormatsIgnoreIntegers", - "format_idn_hostnameFormat_allStringFormatsIgnoreNulls", - "format_idn_hostnameFormat_allStringFormatsIgnoreObjects", - "format_ipv4Format_allStringFormatsIgnoreArrays", - "format_ipv4Format_allStringFormatsIgnoreBooleans", - "format_ipv4Format_allStringFormatsIgnoreFloats", - "format_ipv4Format_allStringFormatsIgnoreIntegers", - "format_ipv4Format_allStringFormatsIgnoreNulls", - "format_ipv4Format_allStringFormatsIgnoreObjects", - "format_ipv6Format_allStringFormatsIgnoreArrays", - "format_ipv6Format_allStringFormatsIgnoreBooleans", - "format_ipv6Format_allStringFormatsIgnoreFloats", - "format_ipv6Format_allStringFormatsIgnoreIntegers", - "format_ipv6Format_allStringFormatsIgnoreNulls", - "format_ipv6Format_allStringFormatsIgnoreObjects", - "format_iriFormat_allStringFormatsIgnoreArrays", - "format_iriFormat_allStringFormatsIgnoreBooleans", - "format_iriFormat_allStringFormatsIgnoreFloats", - "format_iriFormat_allStringFormatsIgnoreIntegers", - "format_iriFormat_allStringFormatsIgnoreNulls", - "format_iriFormat_allStringFormatsIgnoreObjects", - "format_iri_referenceFormat_allStringFormatsIgnoreArrays", - "format_iri_referenceFormat_allStringFormatsIgnoreBooleans", - "format_iri_referenceFormat_allStringFormatsIgnoreFloats", - "format_iri_referenceFormat_allStringFormatsIgnoreIntegers", - "format_iri_referenceFormat_allStringFormatsIgnoreNulls", - "format_iri_referenceFormat_allStringFormatsIgnoreObjects", - "format_json_pointerFormat_allStringFormatsIgnoreArrays", - "format_json_pointerFormat_allStringFormatsIgnoreBooleans", - "format_json_pointerFormat_allStringFormatsIgnoreFloats", - "format_json_pointerFormat_allStringFormatsIgnoreIntegers", - "format_json_pointerFormat_allStringFormatsIgnoreNulls", - "format_json_pointerFormat_allStringFormatsIgnoreObjects", - "format_regexFormat_allStringFormatsIgnoreArrays", - "format_regexFormat_allStringFormatsIgnoreBooleans", - "format_regexFormat_allStringFormatsIgnoreFloats", - "format_regexFormat_allStringFormatsIgnoreIntegers", - "format_regexFormat_allStringFormatsIgnoreNulls", - "format_regexFormat_allStringFormatsIgnoreObjects", - "format_relative_json_pointerFormat_allStringFormatsIgnoreArrays", - "format_relative_json_pointerFormat_allStringFormatsIgnoreBooleans", - "format_relative_json_pointerFormat_allStringFormatsIgnoreFloats", - "format_relative_json_pointerFormat_allStringFormatsIgnoreIntegers", - "format_relative_json_pointerFormat_allStringFormatsIgnoreNulls", - "format_relative_json_pointerFormat_allStringFormatsIgnoreObjects", - "format_timeFormat_allStringFormatsIgnoreArrays", - "format_timeFormat_allStringFormatsIgnoreBooleans", - "format_timeFormat_allStringFormatsIgnoreFloats", - "format_timeFormat_allStringFormatsIgnoreIntegers", - "format_timeFormat_allStringFormatsIgnoreNulls", - "format_timeFormat_allStringFormatsIgnoreObjects", - "format_uriFormat_allStringFormatsIgnoreArrays", - "format_uriFormat_allStringFormatsIgnoreBooleans", - "format_uriFormat_allStringFormatsIgnoreFloats", - "format_uriFormat_allStringFormatsIgnoreIntegers", - "format_uriFormat_allStringFormatsIgnoreNulls", - "format_uriFormat_allStringFormatsIgnoreObjects", - "format_uri_referenceFormat_allStringFormatsIgnoreArrays", - "format_uri_referenceFormat_allStringFormatsIgnoreBooleans", - "format_uri_referenceFormat_allStringFormatsIgnoreFloats", - "format_uri_referenceFormat_allStringFormatsIgnoreIntegers", - "format_uri_referenceFormat_allStringFormatsIgnoreNulls", - "format_uri_referenceFormat_allStringFormatsIgnoreObjects", - "format_uri_templateFormat_allStringFormatsIgnoreArrays", - "format_uri_templateFormat_allStringFormatsIgnoreBooleans", - "format_uri_templateFormat_allStringFormatsIgnoreFloats", - "format_uri_templateFormat_allStringFormatsIgnoreIntegers", - "format_uri_templateFormat_allStringFormatsIgnoreNulls", - "format_uri_templateFormat_allStringFormatsIgnoreObjects", - "if_then_else_ifAndElseWithoutThen_invalidThroughElse", - "if_then_else_ifAndElseWithoutThen_validThroughElse", - "if_then_else_ifAndElseWithoutThen_validWhenIfTestPasses", - "if_then_else_ifAndThenWithoutElse_invalidThroughThen", - "if_then_else_ifAndThenWithoutElse_validThroughThen", - "if_then_else_ifAndThenWithoutElse_validWhenIfTestFails", - "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__invalidRedirectsToElseAndFails", - "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__noRedirectsToThenAndFails", - "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__otherRedirectsToElseAndPasses", - "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__yesRedirectsToThenAndPasses", - "if_then_else_ifWithBooleanSchemaFalse_booleanSchemaFalseInIfAlwaysChoosesTheElsePath_invalid_", - "if_then_else_ifWithBooleanSchemaFalse_booleanSchemaFalseInIfAlwaysChoosesTheElsePath_valid_", - "if_then_else_ifWithBooleanSchemaTrue_booleanSchemaTrueInIfAlwaysChoosesTheThenPath_invalid_", - "if_then_else_ifWithBooleanSchemaTrue_booleanSchemaTrueInIfAlwaysChoosesTheThenPath_valid_", - "if_then_else_ignoreElseWithoutIf_validWhenInvalidAgainstLoneElse", - "if_then_else_ignoreElseWithoutIf_validWhenValidAgainstLoneElse", - "if_then_else_ignoreIfWithoutThenOrElse_validWhenInvalidAgainstLoneIf", - "if_then_else_ignoreIfWithoutThenOrElse_validWhenValidAgainstLoneIf", - "if_then_else_ignoreThenWithoutIf_validWhenInvalidAgainstLoneThen", - "if_then_else_ignoreThenWithoutIf_validWhenValidAgainstLoneThen", - "if_then_else_non_interferenceAcrossCombinedSchemas_valid_ButWouldHaveBeenInvalidThroughElse", - "if_then_else_non_interferenceAcrossCombinedSchemas_valid_ButWouldHaveBeenInvalidThroughThen", - "if_then_else_validateAgainstCorrectBranch_ThenVsElse_invalidThroughElse", - "if_then_else_validateAgainstCorrectBranch_ThenVsElse_invalidThroughThen", - "if_then_else_validateAgainstCorrectBranch_ThenVsElse_validThroughElse", - "if_then_else_validateAgainstCorrectBranch_ThenVsElse_validThroughThen", - "infinite_loop_detection_evaluatingTheSameSchemaLocationAgainstTheSameDataLocationTwiceIsNotASignOfAnInfiniteLoop_failingCase", "infinite_loop_detection_evaluatingTheSameSchemaLocationAgainstTheSameDataLocationTwiceIsNotASignOfAnInfiniteLoop_passingCase", - "items_aSchemaGivenForItems_ignoresNon_arrays", - "items_aSchemaGivenForItems_javaScriptPseudo_arrayIsValid", - "items_aSchemaGivenForItems_validItems", - "items_aSchemaGivenForItems_wrongTypeOfItems", - "items_anArrayOfSchemasForItems_arrayWithAdditionalItems", - "items_anArrayOfSchemasForItems_correctTypes", - "items_anArrayOfSchemasForItems_emptyArray", - "items_anArrayOfSchemasForItems_incompleteArrayOfItems", - "items_anArrayOfSchemasForItems_javaScriptPseudo_arrayIsValid", - "items_anArrayOfSchemasForItems_wrongTypes", - "items_array_formItemsWithNullInstanceElements_allowsNullElements", + "infinite_loop_detection_evaluatingTheSameSchemaLocationAgainstTheSameDataLocationTwiceIsNotASignOfAnInfiniteLoop_failingCase", + "definitions_validateDefinitionAgainstMetaschema_validDefinitionSchema", + "definitions_validateDefinitionAgainstMetaschema_invalidDefinitionSchema", "items_itemsAndSubitems_fewerItemsIsValid", "items_itemsAndSubitems_tooManyItems", "items_itemsAndSubitems_tooManySub_items", "items_itemsAndSubitems_validItems", "items_itemsAndSubitems_wrongItem", "items_itemsAndSubitems_wrongSub_item", - "items_itemsWithBooleanSchema_false__anyNon_emptyArrayIsInvalid", - "items_itemsWithBooleanSchema_false__emptyArrayIsValid", - "items_itemsWithBooleanSchema_true__anyArrayIsValid", - "items_itemsWithBooleanSchema_true__emptyArrayIsValid", - "items_itemsWithBooleanSchemas_arrayWithOneItemIsValid", - "items_itemsWithBooleanSchemas_arrayWithTwoItemsIsInvalid", - "items_itemsWithBooleanSchemas_emptyArrayIsValid", - "items_nestedItems_nestedArrayWithInvalidType", - "items_nestedItems_notDeepEnough", - "items_nestedItems_validNestedArray", - "items_single_formItemsWithNullInstanceElements_allowsNullElements", - "maxItems_maxItemsValidationWithADecimal_shorterIsValid", - "maxItems_maxItemsValidationWithADecimal_tooLongIsInvalid", - "maxItems_maxItemsValidation_exactLengthIsValid", - "maxItems_maxItemsValidation_ignoresNon_arrays", - "maxItems_maxItemsValidation_shorterIsValid", - "maxItems_maxItemsValidation_tooLongIsInvalid", - "maxLength_maxLengthValidationWithADecimal_shorterIsValid", - "maxLength_maxLengthValidationWithADecimal_tooLongIsInvalid", - "maxLength_maxLengthValidation_exactLengthIsValid", - "maxLength_maxLengthValidation_ignoresNon_strings", - "maxLength_maxLengthValidation_shorterIsValid", - "maxLength_maxLengthValidation_tooLongIsInvalid", - "maxLength_maxLengthValidation_twoGraphemesIsLongEnough", - "maxProperties_maxPropertiesValidationWithADecimal_shorterIsValid", - "maxProperties_maxPropertiesValidationWithADecimal_tooLongIsInvalid", - "maxProperties_maxPropertiesValidation_exactLengthIsValid", - "maxProperties_maxPropertiesValidation_ignoresArrays", - "maxProperties_maxPropertiesValidation_ignoresOtherNon_objects", - "maxProperties_maxPropertiesValidation_ignoresStrings", - "maxProperties_maxPropertiesValidation_shorterIsValid", - "maxProperties_maxPropertiesValidation_tooLongIsInvalid", - "maxProperties_maxProperties_0MeansTheObjectIsEmpty_noPropertiesIsValid", - "maxProperties_maxProperties_0MeansTheObjectIsEmpty_onePropertyIsInvalid", - "maximum_maximumValidationWithUnsignedInteger_aboveTheMaximumIsInvalid", - "maximum_maximumValidationWithUnsignedInteger_belowTheMaximumIsInvalid", - "maximum_maximumValidationWithUnsignedInteger_boundaryPointFloatIsValid", - "maximum_maximumValidationWithUnsignedInteger_boundaryPointIntegerIsValid", - "maximum_maximumValidation_aboveTheMaximumIsInvalid", - "maximum_maximumValidation_belowTheMaximumIsValid", - "maximum_maximumValidation_boundaryPointIsValid", - "maximum_maximumValidation_ignoresNon_numbers", - "minItems_minItemsValidationWithADecimal_longerIsValid", - "minItems_minItemsValidationWithADecimal_tooShortIsInvalid", - "minItems_minItemsValidation_exactLengthIsValid", - "minItems_minItemsValidation_ignoresNon_arrays", - "minItems_minItemsValidation_longerIsValid", - "minItems_minItemsValidation_tooShortIsInvalid", - "minLength_minLengthValidationWithADecimal_longerIsValid", - "minLength_minLengthValidationWithADecimal_tooShortIsInvalid", - "minLength_minLengthValidation_exactLengthIsValid", - "minLength_minLengthValidation_ignoresNon_strings", - "minLength_minLengthValidation_longerIsValid", - "minLength_minLengthValidation_oneGraphemeIsNotLongEnough", - "minLength_minLengthValidation_tooShortIsInvalid", - "minProperties_minPropertiesValidationWithADecimal_longerIsValid", - "minProperties_minPropertiesValidationWithADecimal_tooShortIsInvalid", - "minProperties_minPropertiesValidation_exactLengthIsValid", - "minProperties_minPropertiesValidation_ignoresArrays", - "minProperties_minPropertiesValidation_ignoresOtherNon_objects", - "minProperties_minPropertiesValidation_ignoresStrings", - "minProperties_minPropertiesValidation_longerIsValid", - "minProperties_minPropertiesValidation_tooShortIsInvalid", - "minimum_minimumValidationWithSignedInteger_boundaryPointIsValid", - "minimum_minimumValidationWithSignedInteger_boundaryPointWithFloatIsValid", - "minimum_minimumValidationWithSignedInteger_floatBelowTheMinimumIsInvalid", - "minimum_minimumValidationWithSignedInteger_ignoresNon_numbers", - "minimum_minimumValidationWithSignedInteger_intBelowTheMinimumIsInvalid", - "minimum_minimumValidationWithSignedInteger_negativeAboveTheMinimumIsValid", - "minimum_minimumValidationWithSignedInteger_positiveAboveTheMinimumIsValid", - "minimum_minimumValidation_aboveTheMinimumIsValid", - "minimum_minimumValidation_belowTheMinimumIsInvalid", - "minimum_minimumValidation_boundaryPointIsValid", - "minimum_minimumValidation_ignoresNon_numbers", - "multipleOf_byInt_ignoresNon_numbers", - "multipleOf_byInt_intByInt", - "multipleOf_byInt_intByIntFail", - "multipleOf_byNumber_35IsNotMultipleOf1_5", - "multipleOf_byNumber_4_5IsMultipleOf1_5", - "multipleOf_byNumber_zeroIsMultipleOfAnything", - "multipleOf_bySmallNumber_0_00751IsNotMultipleOf0_0001", - "multipleOf_bySmallNumber_0_0075IsMultipleOf0_0001", - "multipleOf_floatDivision_Inf_alwaysInvalid_ButNaiveImplementationsMayRaiseAnOverflowError", - "multipleOf_smallMultipleOfLargeInteger_anyIntegerIsAMultipleOf1e_8", - "not_allowEverythingWithBooleanSchemaFalse_arrayIsValid", - "not_allowEverythingWithBooleanSchemaFalse_booleanFalseIsValid", - "not_allowEverythingWithBooleanSchemaFalse_booleanTrueIsValid", - "not_allowEverythingWithBooleanSchemaFalse_emptyArrayIsValid", - "not_allowEverythingWithBooleanSchemaFalse_emptyObjectIsValid", - "not_allowEverythingWithBooleanSchemaFalse_nullIsValid", - "not_allowEverythingWithBooleanSchemaFalse_numberIsValid", - "not_allowEverythingWithBooleanSchemaFalse_objectIsValid", - "not_allowEverythingWithBooleanSchemaFalse_stringIsValid", - "not_doubleNegation_anyValueIsValid", - "not_forbidEverythingWithBooleanSchemaTrue_arrayIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_booleanFalseIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_booleanTrueIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_emptyArrayIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_emptyObjectIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_nullIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_numberIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_objectIsInvalid", - "not_forbidEverythingWithBooleanSchemaTrue_stringIsInvalid", - "not_forbidEverythingWithEmptySchema_arrayIsInvalid", - "not_forbidEverythingWithEmptySchema_booleanFalseIsInvalid", - "not_forbidEverythingWithEmptySchema_booleanTrueIsInvalid", - "not_forbidEverythingWithEmptySchema_emptyArrayIsInvalid", - "not_forbidEverythingWithEmptySchema_emptyObjectIsInvalid", - "not_forbidEverythingWithEmptySchema_nullIsInvalid", - "not_forbidEverythingWithEmptySchema_numberIsInvalid", - "not_forbidEverythingWithEmptySchema_objectIsInvalid", - "not_forbidEverythingWithEmptySchema_stringIsInvalid", - "not_forbiddenProperty_propertyAbsent", - "not_forbiddenProperty_propertyPresent", - "not_notMoreComplexSchema_match", - "not_notMoreComplexSchema_mismatch", - "not_notMoreComplexSchema_otherMatch", - "not_notMultipleTypes_mismatch", - "not_notMultipleTypes_otherMismatch", - "not_notMultipleTypes_valid", - "not_not_allowed", - "not_not_disallowed", - "oneOf_nestedOneOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid", - "oneOf_nestedOneOf_ToCheckValidationSemantics_nullIsValid", - "oneOf_oneOfComplexTypes_bothOneOfValid_complex_", - "oneOf_oneOfComplexTypes_firstOneOfValid_complex_", - "oneOf_oneOfComplexTypes_neitherOneOfValid_complex_", - "oneOf_oneOfComplexTypes_secondOneOfValid_complex_", - "oneOf_oneOfWithBaseSchema_bothOneOfValid", - "oneOf_oneOfWithBaseSchema_mismatchBaseSchema", - "oneOf_oneOfWithBaseSchema_oneOneOfValid", - "oneOf_oneOfWithBooleanSchemas_AllFalse_anyValueIsInvalid", - "oneOf_oneOfWithBooleanSchemas_AllTrue_anyValueIsInvalid", - "oneOf_oneOfWithBooleanSchemas_MoreThanOneTrue_anyValueIsInvalid", - "oneOf_oneOfWithBooleanSchemas_OneTrue_anyValueIsValid", - "oneOf_oneOfWithEmptySchema_bothValid_Invalid", - "oneOf_oneOfWithEmptySchema_oneValid_Valid", - "oneOf_oneOfWithMissingOptionalProperty_bothOneOfValid", - "oneOf_oneOfWithMissingOptionalProperty_firstOneOfValid", - "oneOf_oneOfWithMissingOptionalProperty_neitherOneOfValid", - "oneOf_oneOfWithMissingOptionalProperty_secondOneOfValid", - "oneOf_oneOfWithRequired_bothInvalid_Invalid", - "oneOf_oneOfWithRequired_bothValid_Invalid", - "oneOf_oneOfWithRequired_firstValid_Valid", - "oneOf_oneOfWithRequired_secondValid_Valid", - "oneOf_oneOf_bothOneOfValid", - "oneOf_oneOf_firstOneOfValid", - "oneOf_oneOf_neitherOneOfValid", - "oneOf_oneOf_secondOneOfValid", - "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_aSimultaneousMatchIsValid", - "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_aSingleValidMatchIsValid", - "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToBothIsInvalid", - "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToOneIsInvalid", - "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToTheOtherIsInvalid", - "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_multipleMatchesIsValid", - "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_aSingleInvalidMatchIsInvalid", - "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_aSingleValidMatchIsValid", - "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresArrays", - "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresOtherNon_objects", - "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresStrings", - "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_multipleInvalidMatchesIsInvalid", - "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_multipleValidMatchesIsValid", - "patternProperties_patternPropertiesWithBooleanSchemas_emptyObjectIsValid", - "patternProperties_patternPropertiesWithBooleanSchemas_objectWithAPropertyMatchingBothTrueAndFalseIsInvalid", - "patternProperties_patternPropertiesWithBooleanSchemas_objectWithBothPropertiesIsInvalid", - "patternProperties_patternPropertiesWithBooleanSchemas_objectWithPropertyMatchingSchemaFalseIsInvalid", - "patternProperties_patternPropertiesWithBooleanSchemas_objectWithPropertyMatchingSchemaTrueIsValid", - "patternProperties_patternPropertiesWithNullValuedInstanceProperties_allowsNullValues", - "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_nonRecognizedMembersAreIgnored", - "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_recognizedMembersAreAccountedFor", - "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_regexesAreCaseSensitive", - "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_regexesAreCaseSensitive_2", - "pattern_patternIsNotAnchored_matchesASubstring", - "pattern_patternValidation_aMatchingPatternIsValid", - "pattern_patternValidation_aNon_matchingPatternIsInvalid", - "pattern_patternValidation_ignoresArrays", - "pattern_patternValidation_ignoresBooleans", - "pattern_patternValidation_ignoresFloats", - "pattern_patternValidation_ignoresIntegers", - "pattern_patternValidation_ignoresNull", - "pattern_patternValidation_ignoresObjects", - "properties_objectPropertiesValidation_bothPropertiesInvalidIsInvalid", - "properties_objectPropertiesValidation_bothPropertiesPresentAndValidIsValid", - "properties_objectPropertiesValidation_doesn_tInvalidateOtherProperties", - "properties_objectPropertiesValidation_ignoresArrays", - "properties_objectPropertiesValidation_ignoresOtherNon_objects", - "properties_objectPropertiesValidation_onePropertyInvalidIsInvalid", - "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames___proto__NotValid", - "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_allPresentAndValid", - "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_constructorNotValid", - "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresArrays", - "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresOtherNon_objects", - "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_noneOfThePropertiesMentioned", - "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_toStringNotValid", - "properties_propertiesWithBooleanSchema_bothPropertiesPresentIsInvalid", - "properties_propertiesWithBooleanSchema_noPropertyPresentIsValid", - "properties_propertiesWithBooleanSchema_only_false_PropertyPresentIsInvalid", - "properties_propertiesWithBooleanSchema_only_true_PropertyPresentIsValid", - "properties_propertiesWithEscapedCharacters_objectWithAllNumbersIsValid", - "properties_propertiesWithEscapedCharacters_objectWithStringsIsInvalid", - "properties_propertiesWithNullValuedInstanceProperties_allowsNullValues", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyIgnoresProperty", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyInvalidatesOthers", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyValidatesOthers", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyInvalidatesNonproperty", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyInvalidatesProperty", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyValidatesNonproperty", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_propertyInvalidatesProperty", - "properties_properties_PatternProperties_AdditionalPropertiesInteraction_propertyValidatesProperty", - "propertyNames_propertyNamesValidationWithPattern_matchingPropertyNamesValid", - "propertyNames_propertyNamesValidationWithPattern_non_matchingPropertyNameIsInvalid", - "propertyNames_propertyNamesValidationWithPattern_objectWithoutPropertiesIsValid", - "propertyNames_propertyNamesValidation_allPropertyNamesValid", - "propertyNames_propertyNamesValidation_ignoresArrays", - "propertyNames_propertyNamesValidation_ignoresOtherNon_objects", - "propertyNames_propertyNamesValidation_ignoresStrings", - "propertyNames_propertyNamesValidation_objectWithoutPropertiesIsValid", - "propertyNames_propertyNamesValidation_somePropertyNamesInvalid", - "propertyNames_propertyNamesWithBooleanSchemaFalse_emptyObjectIsValid", - "propertyNames_propertyNamesWithBooleanSchemaFalse_objectWithAnyPropertiesIsInvalid", - "propertyNames_propertyNamesWithBooleanSchemaTrue_emptyObjectIsValid", - "propertyNames_propertyNamesWithBooleanSchemaTrue_objectWithAnyPropertiesIsValid", "refRemote_______refTo______refFindsLocation_independent______id_non_numberIsInvalid", "refRemote_______refTo______refFindsLocation_independent______id_numberIsValid", "refRemote_baseURIChange_ChangeFolderInSubschema_numberIsValid", @@ -741,169 +120,4 @@ fun schemaTestSuiteExclusions() = setOf( "ref_uRNBaseURIWithURNAndAnchorRef_aStringIsValid", "ref_uRNBaseURIWithURNAndJSONPointerRef_aNon_stringIsInvalid", "ref_uRNBaseURIWithURNAndJSONPointerRef_aStringIsValid", - "required_requiredDefaultValidation_notRequiredByDefault", - "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames___proto__Present", - "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_allPresent", - "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_constructorPresent", - "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresArrays", - "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresOtherNon_objects", - "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_noneOfThePropertiesMentioned", - "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_toStringPresent", - "required_requiredValidation_ignoresArrays", - "required_requiredValidation_ignoresOtherNon_objects", - "required_requiredValidation_ignoresStrings", - "required_requiredValidation_non_presentRequiredPropertyIsInvalid", - "required_requiredValidation_presentRequiredPropertyIsValid", - "required_requiredWithEmptyArray_propertyNotRequired", - "required_requiredWithEscapedCharacters_objectWithAllPropertiesPresentIsValid", - "required_requiredWithEscapedCharacters_objectWithSomePropertiesMissingIsInvalid", - "type_arrayTypeMatchesArrays_aBooleanIsNotAnArray", - "type_arrayTypeMatchesArrays_aFloatIsNotAnArray", - "type_arrayTypeMatchesArrays_aStringIsNotAnArray", - "type_arrayTypeMatchesArrays_anArrayIsAnArray", - "type_arrayTypeMatchesArrays_anIntegerIsNotAnArray", - "type_arrayTypeMatchesArrays_anObjectIsNotAnArray", - "type_arrayTypeMatchesArrays_nullIsNotAnArray", - "type_booleanTypeMatchesBooleans_aFloatIsNotABoolean", - "type_booleanTypeMatchesBooleans_aStringIsNotABoolean", - "type_booleanTypeMatchesBooleans_anArrayIsNotABoolean", - "type_booleanTypeMatchesBooleans_anEmptyStringIsNotABoolean", - "type_booleanTypeMatchesBooleans_anIntegerIsNotABoolean", - "type_booleanTypeMatchesBooleans_anObjectIsNotABoolean", - "type_booleanTypeMatchesBooleans_falseIsABoolean", - "type_booleanTypeMatchesBooleans_nullIsNotABoolean", - "type_booleanTypeMatchesBooleans_trueIsABoolean", - "type_booleanTypeMatchesBooleans_zeroIsNotABoolean", - "type_integerTypeMatchesIntegers_aBooleanIsNotAnInteger", - "type_integerTypeMatchesIntegers_aFloatIsNotAnInteger", - "type_integerTypeMatchesIntegers_aFloatWithZeroFractionalPartIsAnInteger", - "type_integerTypeMatchesIntegers_aStringIsNotAnInteger", - "type_integerTypeMatchesIntegers_aStringIsStillNotAnInteger_EvenIfItLooksLikeOne", - "type_integerTypeMatchesIntegers_anArrayIsNotAnInteger", - "type_integerTypeMatchesIntegers_anIntegerIsAnInteger", - "type_integerTypeMatchesIntegers_anObjectIsNotAnInteger", - "type_integerTypeMatchesIntegers_nullIsNotAnInteger", - "type_multipleTypesCanBeSpecifiedInAnArray_aBooleanIsInvalid", - "type_multipleTypesCanBeSpecifiedInAnArray_aFloatIsInvalid", - "type_multipleTypesCanBeSpecifiedInAnArray_aStringIsValid", - "type_multipleTypesCanBeSpecifiedInAnArray_anArrayIsInvalid", - "type_multipleTypesCanBeSpecifiedInAnArray_anIntegerIsValid", - "type_multipleTypesCanBeSpecifiedInAnArray_anObjectIsInvalid", - "type_multipleTypesCanBeSpecifiedInAnArray_nullIsInvalid", - "type_nullTypeMatchesOnlyTheNullObject_aFloatIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_aStringIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_anArrayIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_anEmptyStringIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_anIntegerIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_anObjectIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_falseIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_nullIsNull", - "type_nullTypeMatchesOnlyTheNullObject_trueIsNotNull", - "type_nullTypeMatchesOnlyTheNullObject_zeroIsNotNull", - "type_numberTypeMatchesNumbers_aBooleanIsNotANumber", - "type_numberTypeMatchesNumbers_aFloatIsANumber", - "type_numberTypeMatchesNumbers_aFloatWithZeroFractionalPartIsANumber_andAnInteger_", - "type_numberTypeMatchesNumbers_aStringIsNotANumber", - "type_numberTypeMatchesNumbers_aStringIsStillNotANumber_EvenIfItLooksLikeOne", - "type_numberTypeMatchesNumbers_anArrayIsNotANumber", - "type_numberTypeMatchesNumbers_anIntegerIsANumber", - "type_numberTypeMatchesNumbers_anObjectIsNotANumber", - "type_numberTypeMatchesNumbers_nullIsNotANumber", - "type_objectTypeMatchesObjects_aBooleanIsNotAnObject", - "type_objectTypeMatchesObjects_aFloatIsNotAnObject", - "type_objectTypeMatchesObjects_aStringIsNotAnObject", - "type_objectTypeMatchesObjects_anArrayIsNotAnObject", - "type_objectTypeMatchesObjects_anIntegerIsNotAnObject", - "type_objectTypeMatchesObjects_anObjectIsAnObject", - "type_objectTypeMatchesObjects_nullIsNotAnObject", - "type_stringTypeMatchesStrings_1IsNotAString", - "type_stringTypeMatchesStrings_aBooleanIsNotAString", - "type_stringTypeMatchesStrings_aFloatIsNotAString", - "type_stringTypeMatchesStrings_aStringIsAString", - "type_stringTypeMatchesStrings_aStringIsStillAString_EvenIfItLooksLikeANumber", - "type_stringTypeMatchesStrings_anArrayIsNotAString", - "type_stringTypeMatchesStrings_anEmptyStringIsStillAString", - "type_stringTypeMatchesStrings_anObjectIsNotAString", - "type_stringTypeMatchesStrings_nullIsNotAString", - "type_typeAsArrayWithOneItem_numberIsInvalid", - "type_typeAsArrayWithOneItem_stringIsValid", - "type_type_ArrayOrObject_arrayIsValid", - "type_type_ArrayOrObject_nullIsInvalid", - "type_type_ArrayOrObject_numberIsInvalid", - "type_type_ArrayOrObject_objectIsValid", - "type_type_ArrayOrObject_stringIsInvalid", - "type_type_Array_ObjectOrNull_arrayIsValid", - "type_type_Array_ObjectOrNull_nullIsValid", - "type_type_Array_ObjectOrNull_numberIsInvalid", - "type_type_Array_ObjectOrNull_objectIsValid", - "type_type_Array_ObjectOrNull_stringIsInvalid", - "uniqueItems_uniqueItemsValidation_0AndFalseAreUnique", - "uniqueItems_uniqueItemsValidation_1AndTrueAreUnique", - "uniqueItems_uniqueItemsValidation__0_And_false_AreUnique", - "uniqueItems_uniqueItemsValidation__1_And_true_AreUnique", - "uniqueItems_uniqueItemsValidation___a__False_And__a__0_AreUnique", - "uniqueItems_uniqueItemsValidation___a__True_And__a__1_AreUnique", - "uniqueItems_uniqueItemsValidation_differentObjectsAreUnique", - "uniqueItems_uniqueItemsValidation_falseIsNotEqualToZero", - "uniqueItems_uniqueItemsValidation_nested_0_And_false_AreUnique", - "uniqueItems_uniqueItemsValidation_nested_1_And_true_AreUnique", - "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfArraysIsInvalid", - "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfIntegersIsInvalid", - "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfMoreThanTwoArraysIsInvalid", - "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfMoreThanTwoIntegersIsInvalid", - "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfNestedObjectsIsInvalid", - "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfObjectsIsInvalid", - "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfStringsIsInvalid", - "uniqueItems_uniqueItemsValidation_non_uniqueHeterogeneousTypesAreInvalid", - "uniqueItems_uniqueItemsValidation_numbersAreUniqueIfMathematicallyUnequal", - "uniqueItems_uniqueItemsValidation_objectsAreNon_uniqueDespiteKeyOrder", - "uniqueItems_uniqueItemsValidation_propertyOrderOfArrayOfObjectsIsIgnored", - "uniqueItems_uniqueItemsValidation_trueIsNotEqualToOne", - "uniqueItems_uniqueItemsValidation_uniqueArrayOfArraysIsValid", - "uniqueItems_uniqueItemsValidation_uniqueArrayOfIntegersIsValid", - "uniqueItems_uniqueItemsValidation_uniqueArrayOfNestedObjectsIsValid", - "uniqueItems_uniqueItemsValidation_uniqueArrayOfObjectsIsValid", - "uniqueItems_uniqueItemsValidation_uniqueArrayOfStringsIsValid", - "uniqueItems_uniqueItemsValidation_uniqueHeterogeneousTypesAreValid", - "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__false_False_FromItemsArrayIsNotValid", - "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__false_True_FromItemsArrayIsValid", - "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__true_False_FromItemsArrayIsValid", - "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__true_True_FromItemsArrayIsNotValid", - "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false_extraItemsAreInvalidEvenIfUnique", - "uniqueItems_uniqueItemsWithAnArrayOfItems__false_False_FromItemsArrayIsNotValid", - "uniqueItems_uniqueItemsWithAnArrayOfItems__false_True_FromItemsArrayIsValid", - "uniqueItems_uniqueItemsWithAnArrayOfItems__true_False_FromItemsArrayIsValid", - "uniqueItems_uniqueItemsWithAnArrayOfItems__true_True_FromItemsArrayIsNotValid", - "uniqueItems_uniqueItemsWithAnArrayOfItems_non_uniqueArrayExtendedFrom_false_True_IsNotValid", - "uniqueItems_uniqueItemsWithAnArrayOfItems_non_uniqueArrayExtendedFrom_true_False_IsNotValid", - "uniqueItems_uniqueItemsWithAnArrayOfItems_uniqueArrayExtendedFrom_false_True_IsValid", - "uniqueItems_uniqueItemsWithAnArrayOfItems_uniqueArrayExtendedFrom_true_False_IsValid", - "uniqueItems_uniqueItems_falseValidation_0AndFalseAreUnique", - "uniqueItems_uniqueItems_falseValidation_1AndTrueAreUnique", - "uniqueItems_uniqueItems_falseValidation_falseIsNotEqualToZero", - "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfArraysIsValid", - "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfIntegersIsValid", - "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfNestedObjectsIsValid", - "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfObjectsIsValid", - "uniqueItems_uniqueItems_falseValidation_non_uniqueHeterogeneousTypesAreValid", - "uniqueItems_uniqueItems_falseValidation_numbersAreUniqueIfMathematicallyUnequal", - "uniqueItems_uniqueItems_falseValidation_trueIsNotEqualToOne", - "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfArraysIsValid", - "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfIntegersIsValid", - "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfNestedObjectsIsValid", - "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfObjectsIsValid", - "uniqueItems_uniqueItems_falseValidation_uniqueHeterogeneousTypesAreValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__false_False_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__false_True_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__true_False_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__true_True_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false_extraItemsAreInvalidEvenIfUnique", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems__false_False_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems__false_True_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems__true_False_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems__true_True_FromItemsArrayIsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems_non_uniqueArrayExtendedFrom_false_True_IsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems_non_uniqueArrayExtendedFrom_true_False_IsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems_uniqueArrayExtendedFrom_false_True_IsValid", - "uniqueItems_uniqueItems_falseWithAnArrayOfItems_uniqueArrayExtendedFrom_true_False_IsValid" -) \ No newline at end of file +) diff --git a/src/commonMain/kotlin/org/kson/Kson.kt b/src/commonMain/kotlin/org/kson/Kson.kt index 7b2de100..00a866fd 100644 --- a/src/commonMain/kotlin/org/kson/Kson.kt +++ b/src/commonMain/kotlin/org/kson/Kson.kt @@ -6,6 +6,7 @@ import org.kson.ast.* import org.kson.stdlibx.collections.ImmutableList import org.kson.parser.* import org.kson.parser.messages.MessageType +import org.kson.schema.SchemaParser import org.kson.tools.KsonFormatterConfig /** @@ -40,7 +41,13 @@ class Kson { if (coreCompileConfig.schemaJson == NO_SCHEMA) { return AstParseResult(ast, tokens, messageSink) } else { - TODO("Json Schema support for Kson not yet implemented") + val schemaParseResult = SchemaParser.parse(coreCompileConfig.schemaJson) + val jsonSchema = schemaParseResult.jsonSchema + ?: // schema todo make a schema parser entry point and suggest they run this through it to troubleshoot + throw IllegalStateException("Schema parse failed:\n" + LoggedMessage.print(schemaParseResult.messages)) + // validate against our schema, logging any errors to our message sink + jsonSchema.validate(ast?.toKsonApi() as KsonValue, messageSink) + return AstParseResult(ast, tokens, messageSink) } } diff --git a/src/commonMain/kotlin/org/kson/ast/KsonApi.kt b/src/commonMain/kotlin/org/kson/ast/KsonApi.kt index 09e11aa5..c82d7087 100644 --- a/src/commonMain/kotlin/org/kson/ast/KsonApi.kt +++ b/src/commonMain/kotlin/org/kson/ast/KsonApi.kt @@ -10,25 +10,134 @@ import org.kson.parser.NumberParser */ sealed class KsonApi(val location: Location) -abstract class KsonValue(location: Location) : KsonApi(location) +abstract class KsonValue(location: Location) : KsonApi(location) { + /** + * Ensure all our [KsonValue] classes implement their [equals] and [hashCode] + */ + abstract override fun equals(other: Any?): Boolean + abstract override fun hashCode(): Int +} -class KsonObject(private val propertyList: List, location: Location) : KsonValue(location) { +class KsonObject(val propertyList: List, location: Location) : KsonValue(location) { val propertyMap: Map by lazy { propertyList.associate { it.name.value to it.ksonValue } } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is KsonObject) return false + + if (propertyMap.size != other.propertyMap.size) return false + + return propertyMap.all { (key, value) -> + other.propertyMap[key]?.let { value == it } ?: false + } + } + + override fun hashCode(): Int { + return propertyMap.hashCode() + } +} + +class KsonList(val elements: List, location: Location) : KsonValue(location) { + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is KsonList) return false + + if (elements.size != other.elements.size) return false + + return elements.zip(other.elements).all { (a, b) -> + a.ksonValue == b.ksonValue + } + } + + override fun hashCode(): Int { + return elements.map { it.ksonValue.hashCode() }.hashCode() + } } -class KsonList(val elements: List, location: Location) : KsonValue(location) + class KsonListElement(val ksonValue: KsonValue, location: Location) : KsonApi(location) class KsonObjectProperty(val name: KsonString, val ksonValue: KsonValue, location: Location) :KsonApi(location) class EmbedBlock(val embedTag: String, val embedContent: String, - location: Location) : KsonValue(location) -class KsonString(val value: String, location: Location) : KsonValue(location) -class KsonNumber(val value: NumberParser.ParsedNumber, location: Location) : KsonValue(location) -class KsonBoolean(val value: Boolean, location: Location) : KsonValue(location) -class KsonNull(location: Location) : KsonValue(location) + location: Location) : KsonValue(location) { + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is EmbedBlock) return false + + return embedTag == other.embedTag && embedContent == other.embedContent + } + + override fun hashCode(): Int { + return 31 * embedTag.hashCode() + embedContent.hashCode() + } +} + +class KsonString(val value: String, location: Location) : KsonValue(location) { + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is KsonString) return false + + return value == other.value + } + + override fun hashCode(): Int { + return value.hashCode() + } +} + +class KsonNumber(val value: NumberParser.ParsedNumber, location: Location) : KsonValue(location) { + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is KsonNumber) return false + + // Numbers are equal if their numeric values are equal (supporting cross-type comparison) + val thisValue = when (value) { + is NumberParser.ParsedNumber.Integer -> value.value.toDouble() + is NumberParser.ParsedNumber.Decimal -> value.value + } + val otherValue = when (other.value) { + is NumberParser.ParsedNumber.Integer -> other.value.value.toDouble() + is NumberParser.ParsedNumber.Decimal -> other.value.value + } + + return thisValue == otherValue + } + + override fun hashCode(): Int { + // Use the double value for consistent hashing across integer/decimal representations + val doubleValue = when (value) { + is NumberParser.ParsedNumber.Integer -> value.value.toDouble() + is NumberParser.ParsedNumber.Decimal -> value.value + } + return doubleValue.hashCode() + } +} + +class KsonBoolean(val value: Boolean, location: Location) : KsonValue(location) { + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is KsonBoolean) return false + + return value == other.value + } + + override fun hashCode(): Int { + return value.hashCode() + } +} + +class KsonNull(location: Location) : KsonValue(location) { + override fun equals(other: Any?): Boolean { + return other is KsonNull + } + + override fun hashCode(): Int { + return KsonNull::class.hashCode() + } +} fun AstNode.toKsonApi(): KsonApi { if (this !is AstNodeImpl) { diff --git a/src/commonMain/kotlin/org/kson/parser/NumberParser.kt b/src/commonMain/kotlin/org/kson/parser/NumberParser.kt index eb1f4db2..ef0efeb7 100644 --- a/src/commonMain/kotlin/org/kson/parser/NumberParser.kt +++ b/src/commonMain/kotlin/org/kson/parser/NumberParser.kt @@ -29,10 +29,20 @@ class NumberParser(private val numberCandidate: String) { private var hasDecimalPoint = false private var hasExponent = false - sealed interface ParsedNumber { - val asString: String + sealed class ParsedNumber { + abstract val asString: String - class Integer(rawString: String) : ParsedNumber { + /** + * Get this [ParsedNumber] as a [Double] + */ + val asDouble: Double by lazy { + when (this) { + is Decimal -> value + is Integer -> value.toDouble() + } + } + + class Integer(rawString: String) : ParsedNumber() { override val asString = trimLeadingZeros(rawString) val value = convertToLong(rawString.trimStart('0').ifEmpty { "0" }) @@ -49,7 +59,7 @@ class NumberParser(private val numberCandidate: String) { } } - class Decimal(rawString: String) : ParsedNumber { + class Decimal(rawString: String) : ParsedNumber() { override val asString = trimLeadingZeros(rawString) val value: Double by lazy { asString.toDouble() diff --git a/src/commonMain/kotlin/org/kson/parser/messages/Message.kt b/src/commonMain/kotlin/org/kson/parser/messages/Message.kt index f66b899c..dc46acdf 100644 --- a/src/commonMain/kotlin/org/kson/parser/messages/Message.kt +++ b/src/commonMain/kotlin/org/kson/parser/messages/Message.kt @@ -287,6 +287,370 @@ enum class MessageType { val overflowNumber = parsedArgs.getArg("Overflow Number") return "The integer \"$overflowNumber\" is too large and cannot be represented." } + }, + SCHEMA_ADDITIONAL_ITEMS_NOT_ALLOWED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Additional items are not allowed" + } + }, + SCHEMA_ADDITIONAL_PROPERTIES_NOT_ALLOWED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Additional properties are not allowed" + } + }, + SCHEMA_ALL_OF_VALIDATION_FAILED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Value must match all of the specified schemas" + } + }, + SCHEMA_ANY_OF_VALIDATION_FAILED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Value must match at least one of the specified schemas" + } + }, + SCHEMA_ARRAY_REQUIRED { + override fun expectedArgs(): List { + return listOf("Schema Property Name") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val schemaPropertyName = parsedArgs.getArg("Schema Property Name") + return "Schema property \"$schemaPropertyName\" must be an array" + } + }, + SCHEMA_BOOLEAN_REQUIRED { + override fun expectedArgs(): List { + return listOf("Schema Property Name") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val schemaPropertyName = parsedArgs.getArg("Schema Property Name") + return "Schema property \"$schemaPropertyName\" must be true or false" + } + }, + SCHEMA_CONTAINS_VALIDATION_FAILED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Array must contain at least one item that matches the contains schema" + } + }, + SCHEMA_DEPENDENCIES_ARRAY_STRING_REQUIRED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Property names in a \"dependencies\" list must be strings" + } + }, + SCHEMA_EMPTY_SCHEMA { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Schema must not be empty" + } + }, + SCHEMA_ENUM_VALUE_NOT_ALLOWED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Value is not one of the allowed enum values" + } + }, + SCHEMA_FALSE_SCHEMA_ERROR { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Schema always fails" + } + }, + SCHEMA_INTEGER_REQUIRED { + override fun expectedArgs(): List { + return listOf("Schema Property Name") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val schemaPropertyName = parsedArgs.getArg("Schema Property Name") + return "Schema property \"$schemaPropertyName\" must be an integer" + } + }, + SCHEMA_NOT_VALIDATION_FAILED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Value must not match the specified schema" + } + }, + SCHEMA_NUMBER_REQUIRED { + override fun expectedArgs(): List { + return listOf("Schema Property Name") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val schemaPropertyName = parsedArgs.getArg("Schema Property Name") + return "Schema property \"$schemaPropertyName\" must be a number" + } + }, + SCHEMA_OBJECT_OR_BOOLEAN { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Schema must be an object or boolean" + } + }, + SCHEMA_OBJECT_REQUIRED { + override fun expectedArgs(): List { + return listOf("Schema Property Name") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val schemaPropertyName = parsedArgs.getArg("Schema Property Name") + return "Schema property \"$schemaPropertyName\" must be a number" + } + }, + SCHEMA_ONE_OF_VALIDATION_FAILED { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Value must match exactly one of the specified schemas" + } + }, + SCHEMA_REQUIRED_PROPERTY_MISSING { + override fun expectedArgs(): List { + return listOf("Missing Properties") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val missingProperties = parsedArgs.getArg("Missing Properties") + return "Missing required properties: $missingProperties" + } + }, + SCHEMA_STRING_ARRAY_ENTRY_ERROR { + override fun expectedArgs(): List { + return listOf("Schema Property Name") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val schemaPropertyName = parsedArgs.getArg("Schema Property Name") + return "Schema \"$schemaPropertyName\" array entries must be a strings" + } + }, + SCHEMA_STRING_REQUIRED { + override fun expectedArgs(): List { + return listOf("Schema Property Name") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val schemaPropertyName = parsedArgs.getArg("Schema Property Name") + return "Schema property \"$schemaPropertyName\" must be a string" + } + }, + SCHEMA_TYPE_ARRAY_ENTRY_ERROR { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Schema \"type\" array entries must be a strings" + } + }, + SCHEMA_TYPE_TYPE_ERROR { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Schema \"type\" must be a string or array of strings" + } + }, + SCHEMA_VALUE_MUST_BE_MULTIPLE_OF { + override fun expectedArgs(): List { + return listOf("Multiple Of Value") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val multipleOfValue = parsedArgs.getArg("Multiple Of Value") + return "Value must be multiple of $multipleOfValue" + } + }, + SCHEMA_STRING_LENGTH_TOO_SHORT { + override fun expectedArgs(): List { + return listOf("Minimum Length") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val minLength = parsedArgs.getArg("Minimum Length") + return "String length must be >= $minLength" + } + }, + SCHEMA_STRING_LENGTH_TOO_LONG { + override fun expectedArgs(): List { + return listOf("Maximum Length") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val maxLength = parsedArgs.getArg("Maximum Length") + return "String length must be <= $maxLength" + } + }, + SCHEMA_VALUE_TYPE_MISMATCH { + override fun expectedArgs(): List { + return listOf("Expected Types", "Actual Type") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val expectedTypes = parsedArgs.getArg("Expected Types") + val actualType = parsedArgs.getArg("Actual Type") + return "Expected one of: $expectedTypes, but got: $actualType" + } + }, + SCHEMA_ARRAY_ITEMS_NOT_UNIQUE { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Items in this array must be unique" + } + }, + SCHEMA_VALUE_TOO_LARGE { + override fun expectedArgs(): List { + return listOf("Maximum Value") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val maximum = parsedArgs.getArg("Maximum Value") + return "Value must be <= $maximum" + } + }, + SCHEMA_VALUE_TOO_LARGE_EXCLUSIVE { + override fun expectedArgs(): List { + return listOf("Exclusive Maximum Value") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val exclusiveMaximum = parsedArgs.getArg("Exclusive Maximum Value") + return "Value must be < $exclusiveMaximum" + } + }, + SCHEMA_VALUE_TOO_SMALL { + override fun expectedArgs(): List { + return listOf("Minimum Value") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val minimum = parsedArgs.getArg("Minimum Value") + return "Value must be >= $minimum" + } + }, + SCHEMA_VALUE_TOO_SMALL_EXCLUSIVE { + override fun expectedArgs(): List { + return listOf("Exclusive Minimum Value") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val exclusiveMinimum = parsedArgs.getArg("Exclusive Minimum Value") + return "Value must be > $exclusiveMinimum" + } + }, + SCHEMA_VALUE_NOT_EQUAL_TO_CONST { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Value must be exactly equal to const value" + } + }, + SCHEMA_ARRAY_TOO_LONG { + override fun expectedArgs(): List { + return listOf("Maximum Items") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val maxItems = parsedArgs.getArg("Maximum Items") + return "Array length must be <= $maxItems" + } + }, + SCHEMA_ARRAY_TOO_SHORT { + override fun expectedArgs(): List { + return listOf("Minimum Items") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val minItems = parsedArgs.getArg("Minimum Items") + return "Array length must be >= $minItems" + } + }, + SCHEMA_OBJECT_TOO_MANY_PROPERTIES { + override fun expectedArgs(): List { + return listOf("Maximum Properties") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val maxProperties = parsedArgs.getArg("Maximum Properties") + return "Object must have <= $maxProperties properties" + } + }, + SCHEMA_OBJECT_TOO_FEW_PROPERTIES { + override fun expectedArgs(): List { + return listOf("Minimum Properties") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val minProperties = parsedArgs.getArg("Minimum Properties") + return "Object must have >= $minProperties properties" + } + }, + SCHEMA_STRING_PATTERN_MISMATCH { + override fun expectedArgs(): List { + return listOf("Pattern") + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + val pattern = parsedArgs.getArg("Pattern") + return "String must match pattern: $pattern" + } + }, + SCHEMA_MISSING_REQUIRED_DEPENDENCIES { + override fun expectedArgs(): List { + return emptyList() + } + + override fun doFormat(parsedArgs: ParsedErrorArgs): String { + return "Missing required dependencies" + } }; /** @@ -341,12 +705,8 @@ enum class MessageType { * Lookup wrapper for [MessageType.create] arguments to protect against typo'ed lookups */ protected class ParsedErrorArgs(private val messageType: MessageType, args: List) { - private val parsedArgs: Map - - init { - // zip the given args up with corresponding argName for lookups - parsedArgs = messageType.expectedArgs().zip(args).toMap() - } + // zip the given args up with corresponding argName for lookups + private val parsedArgs: Map = messageType.expectedArgs().zip(args).toMap() /** * Get an arg by name, or error loudly if no such arg exists diff --git a/src/commonMain/kotlin/org/kson/schema/JsonSchema.kt b/src/commonMain/kotlin/org/kson/schema/JsonSchema.kt new file mode 100644 index 00000000..d82842fb --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/JsonSchema.kt @@ -0,0 +1,94 @@ +package org.kson.schema +import org.kson.ast.KsonNumber +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.parser.NumberParser +import org.kson.parser.messages.MessageType +import org.kson.schema.validators.TypeValidator + + +/** + * Base [JsonSchema] type that [KsonValue]s may be validated against + */ +sealed interface JsonSchema { + fun validate(ksonValue: KsonValue, messageSink: MessageSink) + + fun valid(node: KsonValue, messageSink: MessageSink): Boolean { + val numErrors = messageSink.loggedMessages().size + validate(node, messageSink) + return messageSink.loggedMessages().size == numErrors + } +} + +/** + * The main [JsonSchema] object representation + */ +class JsonObjectSchema( + val title: String?, + val description: String?, + val default: KsonValue?, + val definitions: Map?, + + private val typeValidator: TypeValidator?, + private val schemaValidators: List +) : JsonSchema { + + /** + * Validates a [KsonValue] node against this schema, logging any validation errors to the [messageSink] + */ + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (typeValidator != null) { + if (!typeValidator.validate(ksonValue, messageSink)) { + // we're not the right type for this document, validation cannot continue + return + } + } + + // no `type` violations, run all other validators configured for this schema + schemaValidators.forEach { validator -> + validator.validate(ksonValue, messageSink) + } + } +} + +/** + * The most basic valid JsonSchema: `true` accepts all Json, `false` accepts none. + */ +class JsonBooleanSchema(val valid: Boolean) : JsonSchema { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (valid) { + return + } else { + messageSink.error(ksonValue.location, MessageType.SCHEMA_FALSE_SCHEMA_ERROR.create()) + } + } +} + +/** + * Converts the given `KsonNumber` to its corresponding integer representation, if applicable. + * + * This function checks if the `KsonNumber` represents an integer or a decimal number that can + * safely be interpreted as an integer according to JSON Schema rules. If the value is a decimal + * but matches a pattern of all zeros after the decimal point (e.g., "1.0"), it is converted to + * a long integer. Otherwise, it returns `null`. + * + * @param ksonNumber The `KsonNumber` instance to be converted to a long integer + * @return The integer value of the `KsonNumber` if it represents an integer or a decimal that + * can be safely interpreted as an integer, otherwise, returns `null` + */ +fun asSchemaInteger(ksonNumber: KsonNumber): Long? { + return when (ksonNumber.value) { + is NumberParser.ParsedNumber.Integer -> ksonNumber.value.value + is NumberParser.ParsedNumber.Decimal -> { + if (ksonNumber.value.asString.matches(allZerosDecimalRegex)) { + // 1.0-type numbers are considered integers by JsonSchema, and it's safe to `toInt` it + ksonNumber.value.value.toLong() + } else { + null + } + } + } +} + +// cached regex for testing if all the digits after the decimal are zero in a decimal string +private val allZerosDecimalRegex = Regex(".*\\.0*") diff --git a/src/commonMain/kotlin/org/kson/schema/JsonSchemaValidator.kt b/src/commonMain/kotlin/org/kson/schema/JsonSchemaValidator.kt new file mode 100644 index 00000000..619b2073 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/JsonSchemaValidator.kt @@ -0,0 +1,86 @@ +package org.kson.schema + +import org.kson.ast.KsonList +import org.kson.ast.KsonNumber +import org.kson.ast.KsonObject +import org.kson.ast.KsonString +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink + +// schema todo capture file/location info from schema to link back to schema def? +interface JsonSchemaValidator { + /** + * Validates that the given [ksonValue] satisfies this [JsonNumberValidator]. Logs any validation errors to the + * given [messageSink] + */ + fun validate(ksonValue: KsonValue, messageSink: MessageSink) +} + +abstract class JsonNumberValidator : JsonSchemaValidator { + final override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (ksonValue !is KsonNumber) { + return + } + + validateNumber(ksonValue, messageSink) + } + + abstract fun validateNumber(node: KsonNumber, messageSink: MessageSink) +} + +abstract class JsonArrayValidator : JsonSchemaValidator { + final override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (ksonValue !is KsonList) { + return + } + + validateArray(ksonValue, messageSink) + } + + abstract fun validateArray(node: KsonList, messageSink: MessageSink) +} + +abstract class JsonObjectValidator : JsonSchemaValidator { + final override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (ksonValue !is KsonObject) { + return + } + + validateObject(ksonValue, messageSink) + } + + abstract fun validateObject(node: KsonObject, messageSink: MessageSink) +} + +abstract class JsonStringValidator : JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (ksonValue !is KsonString) { + return + } + + validateString(ksonValue, messageSink) + } + + abstract fun validateString(node: KsonString, messageSink: MessageSink) + + /** + * Count Unicode code points in a string, not UTF-16 code units. + * This is required by JSON Schema specification. + */ + protected fun countCodePoints(str: String): Int { + var count = 0 + var index = 0 + while (index < str.length) { + val char = str[index] + index += if (char.isHighSurrogate() && index + 1 < str.length && str[index + 1].isLowSurrogate()) { + // This is a surrogate pair, count as one code point + 2 + } else { + // Regular character, count as one code point + 1 + } + count++ + } + return count + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/SchemaParser.kt b/src/commonMain/kotlin/org/kson/schema/SchemaParser.kt new file mode 100644 index 00000000..ee404754 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/SchemaParser.kt @@ -0,0 +1,393 @@ +package org.kson.schema + +import org.kson.ast.* +import org.kson.parser.* +import org.kson.parser.messages.MessageType.* +import org.kson.schema.validators.* + +/** + * Parses a JSON Schema string into our JsonSchema model. + */ +object SchemaParser { + /** + * Parse a JSON schema string into a JsonSchema object. + */ + fun parse(schemaJson: String): SchemaParseResult { + // Parse JSON directly using Lexer and Parser to avoid circular dependency + val messageSink = MessageSink() + val tokens = Lexer(schemaJson).tokenize() + + if (tokens[0].tokenType == TokenType.EOF) { + messageSink.error(tokens[0].lexeme.location, SCHEMA_EMPTY_SCHEMA.create()) + return SchemaParseResult(null, messageSink) + } + + val builder = KsonBuilder(tokens) + Parser(builder).parse() + val schemaAst = builder.buildTree(messageSink) + + if (schemaAst == null || messageSink.hasErrors()) { + return SchemaParseResult(null, messageSink) + } + + val jsonSchema = parseSchemaElement(schemaAst.toKsonApi() as KsonValue, messageSink) + return SchemaParseResult(jsonSchema, messageSink) + } + + private fun parseSchemaElement(schemaValue: KsonValue, messageSink: MessageSink): JsonSchema? { + return when (schemaValue) { + is KsonBoolean -> JsonBooleanSchema(schemaValue.value) + is KsonObject -> parseObjectSchema(schemaValue, messageSink) + else -> { + messageSink.error(schemaValue.location, SCHEMA_OBJECT_OR_BOOLEAN.create()) + null + } + } + } + + private fun parseObjectSchema(schemaObject: KsonObject, messageSink: MessageSink): JsonSchema { + val schemaProperties = schemaObject.propertyMap + + val title = schemaProperties["title"] ?.let { title -> + if (title is KsonString) { + title.value + } else { + messageSink.error(title.location, SCHEMA_STRING_REQUIRED.create("title")) + null + } + } + val description = schemaProperties["description"] ?.let { description -> + if (description is KsonString) { + description.value + } else { + messageSink.error(description.location, SCHEMA_STRING_REQUIRED.create("description")) + null + } + } + val default = schemaProperties["default"] + val definitions = schemaProperties["definitions"] ?.let { definitions -> + if (definitions is KsonObject) { + definitions.propertyMap.mapValues { (_, value) -> + parseSchemaElement(value, messageSink) + } + } else { + messageSink.error(definitions.location, SCHEMA_OBJECT_REQUIRED.create("definitions")) + null + } + } + + val typeValidator = schemaProperties["type"] ?.let { typeValue -> + when (typeValue) { + is KsonString -> TypeValidator(typeValue.value) + is KsonList -> { + val typeArrayEntries = ArrayList() + for (element in typeValue.elements) { + if (element.ksonValue is KsonString) { + typeArrayEntries.add(element.ksonValue.value) + } else { + messageSink.error(element.location, SCHEMA_TYPE_ARRAY_ENTRY_ERROR.create()) + } + } + TypeValidator(typeArrayEntries) + } + else -> { + messageSink.error(typeValue.location, SCHEMA_TYPE_TYPE_ERROR.create()) + null + } + } + } + + // Collect all declared validators in this schema + val validators = mutableListOf() + schemaProperties["minimum"] ?.let { minimum -> + if (minimum is KsonNumber) { + validators.add(MinimumValidator(minimum.value.asDouble)) + } else { + messageSink.error(minimum.location, SCHEMA_NUMBER_REQUIRED.create("minimum")) + } + } + schemaProperties["maximum"] ?.let { maximum -> + if (maximum is KsonNumber) { + validators.add(MaximumValidator(maximum.value.asDouble)) + } else { + messageSink.error(maximum.location, SCHEMA_NUMBER_REQUIRED.create("maximum")) + } + } + + schemaProperties["multipleOf"] ?.let { multipleOf -> + if (multipleOf is KsonNumber) { + validators.add(MultipleOfValidator(multipleOf.value.asDouble)) + } else { + messageSink.error(multipleOf.location, SCHEMA_NUMBER_REQUIRED.create("multipleOf")) + } + } + + schemaProperties["exclusiveMinimum"] ?.let { exclusiveMinimum -> + if (exclusiveMinimum is KsonNumber) { + validators.add(ExclusiveMinimumValidator(exclusiveMinimum.value.asDouble)) + } else { + messageSink.error(exclusiveMinimum.location, SCHEMA_NUMBER_REQUIRED.create("exclusiveMinimum")) + } + } + + schemaProperties["exclusiveMaximum"] ?.let { exclusiveMaximum -> + if (exclusiveMaximum is KsonNumber) { + validators.add(ExclusiveMaximumValidator(exclusiveMaximum.value.asDouble)) + } else { + messageSink.error(exclusiveMaximum.location, SCHEMA_NUMBER_REQUIRED.create("exclusiveMaximum")) + } + } + + schemaProperties["minLength"] ?.let { minLength -> + if (minLength is KsonNumber) { + asSchemaInteger(minLength) ?.let { minLengthLong -> + validators.add(MinLengthValidator(minLengthLong)) + } + } else { + messageSink.error(minLength.location, SCHEMA_INTEGER_REQUIRED.create("minLength")) + } + } + + schemaProperties["maxLength"] ?.let { maxLength -> + if (maxLength is KsonNumber) { + asSchemaInteger(maxLength) ?.let { maxLengthLong -> + validators.add(MaxLengthValidator(maxLengthLong)) + } + } else { + messageSink.error(maxLength.location, SCHEMA_INTEGER_REQUIRED.create("maxLength")) + } + } + + schemaProperties["pattern"] ?.let { pattern -> + if (pattern is KsonString) { + validators.add(PatternValidator(pattern.value)) + } else { + messageSink.error(pattern.location, SCHEMA_STRING_REQUIRED.create("pattern")) + } + } + + schemaProperties["enum"] ?.let { enum -> + if (enum is KsonList) { + validators.add(EnumValidator(enum)) + } else { + messageSink.error(enum.location, SCHEMA_ARRAY_REQUIRED.create("enum")) + } + } + + schemaProperties["items"]?.let { itemsValue -> + val additionalItemsValidator = schemaProperties["additionalItems"]?.let { additionalItems -> + when (additionalItems) { + is KsonBoolean -> AdditionalItemsBooleanValidator(additionalItems.value) + else -> AdditionalItemsSchemaValidator(parseSchemaElement(additionalItems, messageSink)) + } + } + + when (itemsValue) { + is KsonList -> { + val leadingItemsValidator = LeadingItemsTupleValidator(itemsValue.elements.mapNotNull { + parseSchemaElement(it.ksonValue, messageSink) + }) + validators.add(ItemsValidator(leadingItemsValidator, additionalItemsValidator)) + } + else -> { + val itemsSchema = parseSchemaElement(itemsValue, messageSink) + if (itemsSchema != null) { + val leadingItemsValidator = LeadingItemsSchemaValidator(itemsSchema) + validators.add(ItemsValidator(leadingItemsValidator, additionalItemsValidator)) + } else { + // no-op todo this shouldn't be necessary - bug in Intellij inspections? + } + } + } + } + + schemaProperties["contains"]?.let { contains -> + parseSchemaElement(contains, messageSink) ?.let { + validators.add(ContainsValidator(it)) + } + } + + schemaProperties["minItems"] ?.let { minItems -> + if (minItems is KsonNumber) { + asSchemaInteger(minItems) ?.let { minItemsLong -> + validators.add(MinItemsValidator(minItemsLong)) + } + } else { + messageSink.error(minItems.location, SCHEMA_INTEGER_REQUIRED.create("minItems")) + } + } + + schemaProperties["maxItems"] ?.let { maxItems -> + if (maxItems is KsonNumber) { + asSchemaInteger(maxItems) ?.let { maxItemsLong -> + validators.add(MaxItemsValidator(maxItemsLong)) + } + } else { + messageSink.error(maxItems.location, SCHEMA_INTEGER_REQUIRED.create("maxItems")) + } + } + + schemaProperties["uniqueItems"] ?.let { uniqueItems -> + if (uniqueItems is KsonBoolean) { + validators.add(UniqueItemsValidator(uniqueItems.value)) + } else { + messageSink.error(uniqueItems.location, SCHEMA_BOOLEAN_REQUIRED.create("uniqueItems")) + } + } + + val propertySchemas = schemaProperties["properties"] ?.let { properties -> + if (properties is KsonObject) { + properties.propertyMap.mapValues { + parseSchemaElement(it.value, messageSink) + } + } else { + messageSink.error(properties.location, SCHEMA_OBJECT_REQUIRED.create("properties")) + null + } + } + + val patternPropertySchemas = schemaProperties["patternProperties"] ?.let { patternProperties -> + if (patternProperties is KsonObject) { + patternProperties.propertyMap.mapValues { + parseSchemaElement(it.value, messageSink) ?: return@mapValues null + } + } else { + messageSink.error(patternProperties.location, SCHEMA_OBJECT_REQUIRED.create("patternProperties")) + null + } + } + + val additionalPropertiesValidator = schemaProperties["additionalProperties"]?.let { additionalProperties -> + when (additionalProperties) { + is KsonBoolean -> AdditionalPropertiesBooleanValidator(additionalProperties.value) + else -> AdditionalPropertiesSchemaValidator(parseSchemaElement(additionalProperties, messageSink)) + } + } + + if (propertySchemas != null || patternPropertySchemas != null || additionalPropertiesValidator != null) { + validators.add(PropertiesValidator(propertySchemas, patternPropertySchemas, additionalPropertiesValidator)) + } + + schemaProperties["required"] ?.let { required -> + if (required is KsonList) { + val requiredArrayEntries = ArrayList() + for (element in required.elements) { + if (element.ksonValue is KsonString) { + requiredArrayEntries.add(element.ksonValue.value) + } else { + messageSink.error(element.location, SCHEMA_STRING_ARRAY_ENTRY_ERROR.create("required")) + } + } + validators.add(RequiredValidator(requiredArrayEntries)) + } else { + messageSink.error(required.location, SCHEMA_ARRAY_REQUIRED.create("required")) + } + } + + schemaProperties["minProperties"] ?.let { minProperties -> + if (minProperties is KsonNumber) { + asSchemaInteger(minProperties) ?.let { minPropertiesLong -> + validators.add(MinPropertiesValidator(minPropertiesLong)) + } + } else { + messageSink.error(minProperties.location, SCHEMA_INTEGER_REQUIRED.create("minProperties")) + } + } + + schemaProperties["maxProperties"] ?.let { maxProperties -> + if (maxProperties is KsonNumber) { + asSchemaInteger(maxProperties) ?.let { maxPropertiesLong -> + validators.add(MaxPropertiesValidator(maxPropertiesLong)) + } + } else { + messageSink.error(maxProperties.location, SCHEMA_INTEGER_REQUIRED.create("maxProperties")) + } + } + + schemaProperties["const"] ?.let { const -> + validators.add(ConstValidator(const)) + } + + schemaProperties["allOf"] ?.let { allOf -> + if (allOf is KsonList) { + val allOfArrayEntries = ArrayList() + for (element in allOf.elements) { + allOfArrayEntries.add(parseSchemaElement(element.ksonValue, messageSink) ?: continue) + } + validators.add(AllOfValidator(allOfArrayEntries)) + } else { + messageSink.error(allOf.location, SCHEMA_ARRAY_REQUIRED.create("allOf")) + } + } + + schemaProperties["anyOf"] ?.let { anyOf -> + if (anyOf is KsonList) { + val anyOfArrayEntries = ArrayList() + for (element in anyOf.elements) { + anyOfArrayEntries.add(parseSchemaElement(element.ksonValue, messageSink) ?: continue) + } + validators.add(AnyOfValidator(anyOfArrayEntries)) + } else { + messageSink.error(anyOf.location, SCHEMA_ARRAY_REQUIRED.create("anyOf")) + } + } + + schemaProperties["oneOf"] ?.let { oneOf -> + if (oneOf is KsonList) { + val oneOfArrayEntries = ArrayList() + for (element in oneOf.elements) { + oneOfArrayEntries.add(parseSchemaElement(element.ksonValue, messageSink) ?: continue) + } + validators.add(OneOfValidator(oneOfArrayEntries)) + } else { + messageSink.error(oneOf.location, SCHEMA_ARRAY_REQUIRED.create("oneOf")) + } + } + + schemaProperties["not"]?.let { not -> + validators.add(NotValidator(parseSchemaElement(not, messageSink))) + } + + schemaProperties["if"]?.let { ifElement -> + val ifSchema = parseSchemaElement(ifElement, messageSink) + val thenSchema = schemaProperties["then"]?.let { parseSchemaElement(it, messageSink) } + val elseSchema = schemaProperties["else"]?.let { parseSchemaElement(it, messageSink) } + validators.add(IfValidator(ifSchema, thenSchema, elseSchema)) + } + + schemaProperties["dependencies"] ?.let { dependencies -> + if (dependencies !is KsonObject) { + messageSink.error(dependencies.location, SCHEMA_OBJECT_REQUIRED.create("dependencies")) + return@let + } + + val dependencyMap = dependencies.propertyMap.mapValues { (_, value) -> + if (value is KsonList) { + val dependencyArrayEntries = mutableSetOf() + for (element in value.elements) { + if (element.ksonValue is KsonString) { + dependencyArrayEntries.add(element.ksonValue.value) + } else { + messageSink.error(element.location, SCHEMA_DEPENDENCIES_ARRAY_STRING_REQUIRED.create()) + } + } + return@mapValues DependencyValidatorArray(dependencyArrayEntries) + } else { + return@mapValues DependencyValidatorSchema(parseSchemaElement(value, messageSink)) + } + } + validators.add(DependenciesValidator(dependencyMap)) + } + + schemaProperties["propertyNames"] ?.let { propertyNames -> + validators.add(PropertyNamesValidator(parseSchemaElement(propertyNames, messageSink))) + } + + return JsonObjectSchema(title, description, default, definitions, typeValidator, validators) + } +} + +data class SchemaParseResult(val jsonSchema: JsonSchema?, + private val messageSink: MessageSink) { + val messages = messageSink.loggedMessages() +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/AllOfValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/AllOfValidator.kt new file mode 100644 index 00000000..ce7fc3a3 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/AllOfValidator.kt @@ -0,0 +1,20 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonSchema +import org.kson.schema.JsonSchemaValidator + +class AllOfValidator(val allOf: List) : JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + val allValid = allOf.all { + val allOfMessageSink = MessageSink() + it.validate(ksonValue, allOfMessageSink) + !allOfMessageSink.hasErrors() + } + if (!allValid) { + messageSink.error(ksonValue.location, MessageType.SCHEMA_ALL_OF_VALIDATION_FAILED.create()) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/AnyOfValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/AnyOfValidator.kt new file mode 100644 index 00000000..663ac21b --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/AnyOfValidator.kt @@ -0,0 +1,22 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonSchema +import org.kson.schema.JsonSchemaValidator + +class AnyOfValidator(private val anyOf: List) : JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + val anyValid = anyOf.any { + val anyOfMessageSink = MessageSink() + it.validate(ksonValue, anyOfMessageSink) + // were we valid + !anyOfMessageSink.hasErrors() + } + + if (!anyValid) { + messageSink.error(ksonValue.location, MessageType.SCHEMA_ANY_OF_VALIDATION_FAILED.create()) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/ConstValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/ConstValidator.kt new file mode 100644 index 00000000..f6aedff9 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/ConstValidator.kt @@ -0,0 +1,14 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonSchemaValidator + +class ConstValidator(private val const: KsonValue) : JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (ksonValue != const) { + messageSink.error(ksonValue.location, MessageType.SCHEMA_VALUE_NOT_EQUAL_TO_CONST.create()) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/ContainsValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/ContainsValidator.kt new file mode 100644 index 00000000..03add357 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/ContainsValidator.kt @@ -0,0 +1,20 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonList +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonArrayValidator +import org.kson.schema.JsonSchema + +class ContainsValidator(private val containsSchema: JsonSchema) : JsonArrayValidator() { + override fun validateArray(node: KsonList, messageSink: MessageSink) { + val foundMatchingElement = node.elements.any { element -> + val containsMessageSink = MessageSink() + containsSchema.validate(element.ksonValue, containsMessageSink) + !containsMessageSink.hasErrors() + } + if (!foundMatchingElement) { + messageSink.error(node.location, MessageType.SCHEMA_CONTAINS_VALIDATION_FAILED.create()) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/DependenciesValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/DependenciesValidator.kt new file mode 100644 index 00000000..3208f4bf --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/DependenciesValidator.kt @@ -0,0 +1,46 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonObject +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonObjectValidator +import org.kson.schema.JsonSchema + +class DependenciesValidator(private val dependencies: Map) + : JsonObjectValidator() { + override fun validateObject(node: KsonObject, messageSink: MessageSink) { + val properties = node.propertyMap + dependencies.forEach { (name, dependency) -> + properties[name]?.let { + dependency.validate(node, messageSink) + } + } + } +} + +sealed interface DependencyValidator { + fun validate(ksonObject: KsonObject, messageSink: MessageSink): Boolean +} +data class DependencyValidatorArray(val dependency: Set) : DependencyValidator { + override fun validate(ksonObject: KsonObject, messageSink: MessageSink): Boolean { + val propertyNames = ksonObject.propertyMap.keys + val allPresent = dependency.all { + propertyNames.contains(it) + } + if (!allPresent) { + messageSink.error(ksonObject.location, MessageType.SCHEMA_MISSING_REQUIRED_DEPENDENCIES.create()) + } + return allPresent + } +} +data class DependencyValidatorSchema(val dependency: JsonSchema?) : DependencyValidator { + override fun validate(ksonObject: KsonObject, messageSink: MessageSink): Boolean { + if (dependency == null) { + return true + } + val numErrors = messageSink.loggedMessages().size + dependency.validate(ksonObject, messageSink) + // valid if we didn't add any new errors + return messageSink.loggedMessages().size == numErrors + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/EnumValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/EnumValidator.kt new file mode 100644 index 00000000..4c7d0bd9 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/EnumValidator.kt @@ -0,0 +1,16 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonList +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonSchemaValidator + +class EnumValidator(private val enum: KsonList) : JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + val enumValues = enum.elements.map { it.ksonValue } + if (!enumValues.contains(ksonValue)) { + messageSink.error(ksonValue.location, MessageType.SCHEMA_ENUM_VALUE_NOT_ALLOWED.create()) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/ExclusiveMaximumValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/ExclusiveMaximumValidator.kt new file mode 100644 index 00000000..f9dfbcec --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/ExclusiveMaximumValidator.kt @@ -0,0 +1,15 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonNumber +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonNumberValidator + +class ExclusiveMaximumValidator(private val exclusiveMaximum: Double) : JsonNumberValidator() { + override fun validateNumber(node: KsonNumber, messageSink: MessageSink) { + val number = node.value.asDouble + if (number >= exclusiveMaximum) { + messageSink.error(node.location, MessageType.SCHEMA_VALUE_TOO_LARGE_EXCLUSIVE.create(exclusiveMaximum.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/ExclusiveMinimumValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/ExclusiveMinimumValidator.kt new file mode 100644 index 00000000..49b94f1c --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/ExclusiveMinimumValidator.kt @@ -0,0 +1,15 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonNumber +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonNumberValidator + +class ExclusiveMinimumValidator(private val exclusiveMinimum: Double) : JsonNumberValidator() { + override fun validateNumber(node: KsonNumber, messageSink: MessageSink) { + val number = node.value.asDouble + if (number <= exclusiveMinimum) { + messageSink.error(node.location, MessageType.SCHEMA_VALUE_TOO_SMALL_EXCLUSIVE.create(exclusiveMinimum.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/IfValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/IfValidator.kt new file mode 100644 index 00000000..4dcb6227 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/IfValidator.kt @@ -0,0 +1,24 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.schema.JsonSchema +import org.kson.schema.JsonSchemaValidator + +class IfValidator(private val ifSchema: JsonSchema?, private val thenSchema: JsonSchema?, private val elseSchema: JsonSchema?) : + JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (ifSchema == null) { + return + } + + val tmpMessageSink = MessageSink() + if (ifSchema.valid(ksonValue, tmpMessageSink)) { + // if condition is true, run then schema if it exists + thenSchema?.validate(ksonValue, messageSink) + } else { + // if condition is false, run else schema if it exists + elseSchema?.validate(ksonValue, messageSink) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/ItemsValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/ItemsValidator.kt new file mode 100644 index 00000000..30658631 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/ItemsValidator.kt @@ -0,0 +1,69 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonList +import org.kson.ast.KsonValue +import org.kson.parser.Location +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonArrayValidator +import org.kson.schema.JsonSchema + +class ItemsValidator(private val itemsValidator: LeadingItemsValidator, private val additionalItemsValidator: AdditionalItemsValidator?) : JsonArrayValidator() { + + override fun validateArray(node: KsonList, messageSink: MessageSink) { + val remainingItems = itemsValidator.validateArray(node, messageSink) + additionalItemsValidator?.validateArray(remainingItems, node.location, messageSink) + } +} + +sealed interface LeadingItemsValidator { + fun validateArray(list: KsonList, messageSink: MessageSink): List +} + +data class LeadingItemsTupleValidator(private val schemas: List) : LeadingItemsValidator { + override fun validateArray(list: KsonList, messageSink: MessageSink): List { + var index = 0 + for (i in schemas.indices) { + if (i >= list.elements.size) { + break + } + schemas[i].validate(list.elements[i].ksonValue, messageSink) + index = i + 1 + } + return if (index < list.elements.size) { + list.elements.subList(index, list.elements.size).map { it.ksonValue } + } else { + emptyList() + } + } +} + +data class LeadingItemsSchemaValidator(private val jsonSchema: JsonSchema): LeadingItemsValidator { + override fun validateArray(list: KsonList, messageSink: MessageSink): List { + list.elements.forEach { + jsonSchema.validate(it.ksonValue, messageSink) + } + return emptyList() + } +} + +sealed interface AdditionalItemsValidator { + fun validateArray(remainingItems: List, location: Location, messageSink: MessageSink) +} +data class AdditionalItemsBooleanValidator(val allowed: Boolean): AdditionalItemsValidator { + override fun validateArray(remainingItems: List, location: Location, messageSink: MessageSink) { + if (!allowed && remainingItems.isNotEmpty()) { + messageSink.error(location, MessageType.SCHEMA_ADDITIONAL_ITEMS_NOT_ALLOWED.create()) + } + } +} +data class AdditionalItemsSchemaValidator(val schema: JsonSchema?): AdditionalItemsValidator { + override fun validateArray(remainingItems: List, location: Location, messageSink: MessageSink) { + if (schema == null) { + return + } + remainingItems.forEach { + schema.validate(it, messageSink) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MaxItemsValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MaxItemsValidator.kt new file mode 100644 index 00000000..7bd2aea4 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MaxItemsValidator.kt @@ -0,0 +1,14 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonList +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonArrayValidator + +class MaxItemsValidator(private val maxItems: Long) : JsonArrayValidator() { + override fun validateArray(node: KsonList, messageSink: MessageSink) { + if (node.elements.size > maxItems) { + messageSink.error(node.location, MessageType.SCHEMA_ARRAY_TOO_LONG.create(maxItems.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MaxLengthValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MaxLengthValidator.kt new file mode 100644 index 00000000..7b50e96b --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MaxLengthValidator.kt @@ -0,0 +1,15 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonString +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonStringValidator + +class MaxLengthValidator(private val maxLength: Long) : JsonStringValidator() { + override fun validateString(node: KsonString, messageSink: MessageSink) { + val str = node.value + if (countCodePoints(str) > maxLength) { + messageSink.error(node.location, MessageType.SCHEMA_STRING_LENGTH_TOO_LONG.create(maxLength.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MaxPropertiesValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MaxPropertiesValidator.kt new file mode 100644 index 00000000..aa8bca33 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MaxPropertiesValidator.kt @@ -0,0 +1,14 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonObject +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonObjectValidator + +class MaxPropertiesValidator(private val maxProperties: Long) : JsonObjectValidator() { + override fun validateObject(node: KsonObject, messageSink: MessageSink) { + if (node.propertyMap.size > maxProperties) { + messageSink.error(node.location, MessageType.SCHEMA_OBJECT_TOO_MANY_PROPERTIES.create(maxProperties.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MaximumValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MaximumValidator.kt new file mode 100644 index 00000000..c5f8302a --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MaximumValidator.kt @@ -0,0 +1,15 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonNumber +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonNumberValidator + +class MaximumValidator(private val maximum: Double) : JsonNumberValidator() { + override fun validateNumber(node: KsonNumber, messageSink: MessageSink) { + val number = node.value.asDouble + if (number > maximum) { + messageSink.error(node.location, MessageType.SCHEMA_VALUE_TOO_LARGE.create(maximum.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MinItemsValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MinItemsValidator.kt new file mode 100644 index 00000000..3ee61c1f --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MinItemsValidator.kt @@ -0,0 +1,14 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonList +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonArrayValidator + +class MinItemsValidator(private val minItems: Long) : JsonArrayValidator() { + override fun validateArray(node: KsonList, messageSink: MessageSink) { + if (node.elements.size < minItems) { + messageSink.error(node.location, MessageType.SCHEMA_ARRAY_TOO_SHORT.create(minItems.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MinLengthValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MinLengthValidator.kt new file mode 100644 index 00000000..8e4fe7d3 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MinLengthValidator.kt @@ -0,0 +1,17 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonString +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonStringValidator + +class MinLengthValidator(private val minLength: Long) : JsonStringValidator() { + override fun validateString(node: KsonString, messageSink: MessageSink) { + val str = node.value + minLength.let { min -> + if (countCodePoints(str) < min) { + messageSink.error(node.location, MessageType.SCHEMA_STRING_LENGTH_TOO_SHORT.create(min.toString())) + } + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MinPropertiesValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MinPropertiesValidator.kt new file mode 100644 index 00000000..eb57fba6 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MinPropertiesValidator.kt @@ -0,0 +1,16 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonObject +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonObjectValidator + +class MinPropertiesValidator(private val minProperties: Long) : JsonObjectValidator() { + override fun validateObject(node: KsonObject, messageSink: MessageSink) { + if (node.propertyMap.size < minProperties) { + messageSink.error(node.location, + MessageType.SCHEMA_OBJECT_TOO_FEW_PROPERTIES.create(minProperties.toString()) + ) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MinimumValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MinimumValidator.kt new file mode 100644 index 00000000..fdaf7fee --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MinimumValidator.kt @@ -0,0 +1,15 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonNumber +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonNumberValidator + +class MinimumValidator(private val minimum: Double) : JsonNumberValidator() { + override fun validateNumber(node: KsonNumber, messageSink: MessageSink) { + val number = node.value.asDouble + if (number < minimum) { + messageSink.error(node.location, MessageType.SCHEMA_VALUE_TOO_SMALL.create(minimum.toString())) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/MultipleOfValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/MultipleOfValidator.kt new file mode 100644 index 00000000..8cf797b5 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/MultipleOfValidator.kt @@ -0,0 +1,24 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonNumber +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonNumberValidator +import kotlin.math.abs +import kotlin.math.max + +class MultipleOfValidator(private val multipleOf: Double) : JsonNumberValidator() { + override fun validateNumber(node: KsonNumber, messageSink: MessageSink) { + val number = node.value.asDouble + if (multipleOf != 0.0) { + val remainder = number % multipleOf + val epsilon = 1e-10 * max(abs(number), abs(multipleOf)) + if (abs(remainder) > epsilon && abs(remainder - multipleOf) > epsilon) { + messageSink.error( + node.location, + MessageType.SCHEMA_VALUE_MUST_BE_MULTIPLE_OF.create(multipleOf.toString()) + ) + } + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/NotValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/NotValidator.kt new file mode 100644 index 00000000..63498734 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/NotValidator.kt @@ -0,0 +1,19 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonSchema +import org.kson.schema.JsonSchemaValidator + +class NotValidator(private val notSchema: JsonSchema?) : JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + if (notSchema == null) { + return + } + val notMessageSink = MessageSink() + if(notSchema.valid(ksonValue, notMessageSink)) { + messageSink.error(ksonValue.location, MessageType.SCHEMA_NOT_VALIDATION_FAILED.create()) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/OneOfValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/OneOfValidator.kt new file mode 100644 index 00000000..24797370 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/OneOfValidator.kt @@ -0,0 +1,20 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonValue +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonSchema +import org.kson.schema.JsonSchemaValidator + +class OneOfValidator(private val oneOf: List) : JsonSchemaValidator { + override fun validate(ksonValue: KsonValue, messageSink: MessageSink) { + val hasExactlyOneOf = oneOf.count { + val oneOfMessageSink = MessageSink() + it.valid(ksonValue, oneOfMessageSink) + } == 1 + if (!hasExactlyOneOf) { + // schema todo maybe merge in some of the errors we found? + messageSink.error(ksonValue.location, MessageType.SCHEMA_ONE_OF_VALIDATION_FAILED.create()) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/PatternValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/PatternValidator.kt new file mode 100644 index 00000000..ea72199d --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/PatternValidator.kt @@ -0,0 +1,16 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonString +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonStringValidator + +class PatternValidator(pattern: String) : JsonStringValidator() { + private val pattern = Regex(pattern) + override fun validateString(node: KsonString, messageSink: MessageSink) { + val str = node.value + if (!pattern.containsMatchIn(str)) { + messageSink.error(node.location, MessageType.SCHEMA_STRING_PATTERN_MISMATCH.create(pattern.pattern)) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/PropertiesValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/PropertiesValidator.kt new file mode 100644 index 00000000..8817f841 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/PropertiesValidator.kt @@ -0,0 +1,73 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonObject +import org.kson.ast.KsonValue +import org.kson.parser.Location +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonObjectValidator +import org.kson.schema.JsonSchema + +class PropertiesValidator(private val propertySchemas: Map?, + private val patternPropertySchemas: Map?, + private val additionalPropertiesValidator: AdditionalPropertiesValidator?) + : JsonObjectValidator() { + override fun validateObject(node: KsonObject, messageSink: MessageSink) { + val objectProperties = node.propertyMap + val seenKeys = mutableSetOf() + + // First, validate regular properties + propertySchemas?.forEach { (key, schema) -> + objectProperties[key]?.let { objectProperty -> + schema?.validate(objectProperty, messageSink) + } + seenKeys.add(key) + } + + // Then validate pattern properties - need to check ALL patterns for each property + patternPropertySchemas?.let { patterns -> + objectProperties.forEach { (propertyName, propertyValue) -> + var matchedAnyPattern = false + + patterns.forEach { (pattern, schema) -> + val patternMatcher = Regex(pattern) + if (patternMatcher.containsMatchIn(propertyName)) { + matchedAnyPattern = true + schema?.validate(propertyValue, messageSink) + } + } + + if (matchedAnyPattern) { + seenKeys.add(propertyName) + } + } + } + + // Finally, validate additional properties + val remainingProperties = node.propertyMap.filter { !seenKeys.contains(it.key) } + additionalPropertiesValidator?.validateProperties(remainingProperties, node.location, messageSink) + } +} + +sealed interface AdditionalPropertiesValidator { + fun validateProperties(remainingProperties: Map, location: Location, messageSink: MessageSink) +} + +data class AdditionalPropertiesBooleanValidator(val allowed: Boolean) : AdditionalPropertiesValidator { + override fun validateProperties(remainingProperties: Map, location: Location, messageSink: MessageSink) { + if (!allowed && remainingProperties.isNotEmpty()) { + messageSink.error(location, MessageType.SCHEMA_ADDITIONAL_PROPERTIES_NOT_ALLOWED.create()) + } + } +} + +data class AdditionalPropertiesSchemaValidator(val schema: JsonSchema?) : AdditionalPropertiesValidator { + override fun validateProperties(remainingProperties: Map, location: Location, messageSink: MessageSink) { + if (schema == null) { + return + } + remainingProperties.forEach { + schema.validate(it.value, messageSink) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/PropertyNamesValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/PropertyNamesValidator.kt new file mode 100644 index 00000000..67795130 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/PropertyNamesValidator.kt @@ -0,0 +1,14 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonObject +import org.kson.parser.MessageSink +import org.kson.schema.JsonObjectValidator +import org.kson.schema.JsonSchema + +class PropertyNamesValidator(private val propertyNamesSchema: JsonSchema?) : JsonObjectValidator() { + override fun validateObject(node: KsonObject, messageSink: MessageSink) { + node.propertyList.forEach { + propertyNamesSchema?.validate(it.name, messageSink) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/RequiredValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/RequiredValidator.kt new file mode 100644 index 00000000..b6c31388 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/RequiredValidator.kt @@ -0,0 +1,16 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonObject +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonObjectValidator + +class RequiredValidator(private val required: List) : JsonObjectValidator() { + override fun validateObject(node: KsonObject, messageSink: MessageSink) { + val propertyNames = node.propertyMap.keys + val missingProperties = required.filter { !propertyNames.contains(it) } + if (missingProperties.isNotEmpty()) { + messageSink.error(node.location, MessageType.SCHEMA_REQUIRED_PROPERTY_MISSING.create(missingProperties.joinToString(", "))) + } + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/TypeValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/TypeValidator.kt new file mode 100644 index 00000000..f325998b --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/TypeValidator.kt @@ -0,0 +1,46 @@ +package org.kson.schema.validators + +import org.kson.ast.* +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.asSchemaInteger + +/** + * Json Schema `type:` validator + */ +class TypeValidator(private val allowedTypes: List) { + constructor(type: String) : this(listOf(type)) + + /** + * Validates whether the given [ksonValue] is valid according to this [TypeValidator]. + * If [ksonValue] is invalid, validation errors are written to [messageSink] and this method returns false + * + * @return true if [ksonValue] is valid, [false otherwise] + */ + fun validate(ksonValue: KsonValue, messageSink: MessageSink): Boolean { + val nodeType = when (ksonValue) { + is KsonBoolean -> "boolean" + is KsonNull -> "null" + is KsonNumber -> { + if (asSchemaInteger(ksonValue) != null) { + "integer" + } else { + "number" + } + } + is KsonString -> "string" + is KsonList -> "array" + is KsonObject -> "object" + else -> "unknown" + } + + if (!allowedTypes.contains(nodeType) + // if our node is an integer, this type is valid if the more-general "number" is an allowedType + && !(nodeType == "integer" && allowedTypes.contains("number"))) { + messageSink.error(ksonValue.location, MessageType.SCHEMA_VALUE_TYPE_MISMATCH.create(allowedTypes.joinToString(), nodeType)) + return false + } + + return true + } +} diff --git a/src/commonMain/kotlin/org/kson/schema/validators/UniqueItemsValidator.kt b/src/commonMain/kotlin/org/kson/schema/validators/UniqueItemsValidator.kt new file mode 100644 index 00000000..9021e1d9 --- /dev/null +++ b/src/commonMain/kotlin/org/kson/schema/validators/UniqueItemsValidator.kt @@ -0,0 +1,29 @@ +package org.kson.schema.validators + +import org.kson.ast.KsonList +import org.kson.ast.KsonListElement +import org.kson.parser.MessageSink +import org.kson.parser.messages.MessageType +import org.kson.schema.JsonArrayValidator + +class UniqueItemsValidator(private val uniqueItems: Boolean) : JsonArrayValidator() { + override fun validateArray(node: KsonList, messageSink: MessageSink) { + if (uniqueItems && !areItemsUnique(node.elements)) { + messageSink.error(node.location, MessageType.SCHEMA_ARRAY_ITEMS_NOT_UNIQUE.create()) + } + } + + /** + * Check if all items in a list are unique using JSON Schema equality semantics. + */ + private fun areItemsUnique(elements: List): Boolean { + for (i in elements.indices) { + for (j in i + 1 until elements.size) { + if (elements[i].ksonValue == elements[j].ksonValue) { + return false + } + } + } + return true + } +} diff --git a/src/commonTest/kotlin/org/kson/parser/json/generated/SchemaSuiteTest.kt b/src/commonTest/kotlin/org/kson/parser/json/generated/SchemaSuiteTest.kt index c5d3608c..d54237af 100644 --- a/src/commonTest/kotlin/org/kson/parser/json/generated/SchemaSuiteTest.kt +++ b/src/commonTest/kotlin/org/kson/parser/json/generated/SchemaSuiteTest.kt @@ -1,9 +1,7 @@ package org.kson.parser.json.generated -import org.kson.CoreCompileConfig -import org.kson.Kson +import org.kson.schema.JsonSchemaTest import kotlin.test.Test -import kotlin.test.assertEquals /** * DO NOT MANUALLY EDIT. This class is GENERATED by `./gradlew generateJsonTestSuite` task @@ -13,7 +11,7 @@ import kotlin.test.assertEquals * removing exclusions from [org.kson.jsonsuite.schemaTestSuiteExclusions] */ @Suppress("UNREACHABLE_CODE") // unreachable code is okay here until we complete the above TODO -class SchemaSuiteTest { +class SchemaSuiteTest : JsonSchemaTest { /** * Test generated by [org.kson.jsonsuite.JsonTestSuiteGenerator] based on `buildSrc/support/jsonsuite/JSON-Schema-Test-Suite/tests/draft7/additionalItems.json`: @@ -21,12 +19,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsAsSchema_additionalItemsMatchSchema() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsAsSchema_additionalItemsMatchSchema" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [null,2,3,4] @@ -44,12 +37,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsAsSchema_additionalItemsDoNotMatchSchema() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsAsSchema_additionalItemsDoNotMatchSchema" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [null,2,3,"foo"] @@ -67,12 +55,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_whenItemsIsSchema_AdditionalItemsDoesNothing_validWithAArrayOfTypeIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_whenItemsIsSchema_AdditionalItemsDoesNothing_validWithAArrayOfTypeIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -90,12 +73,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_whenItemsIsSchema_AdditionalItemsDoesNothing_invalidWithAArrayOfMixedTypes() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_whenItemsIsSchema_AdditionalItemsDoesNothing_invalidWithAArrayOfMixedTypes" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"2","3"] @@ -113,12 +91,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_whenItemsIsSchema_BooleanAdditionalItemsDoesNothing_allItemsMatchSchema() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_whenItemsIsSchema_BooleanAdditionalItemsDoesNothing_allItemsMatchSchema" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3,4,5] @@ -136,12 +109,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_emptyArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_emptyArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -159,12 +127,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_fewerNumberOfItemsPresent_1_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_fewerNumberOfItemsPresent_1_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -182,12 +145,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_fewerNumberOfItemsPresent_2_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_fewerNumberOfItemsPresent_2_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2] @@ -205,12 +163,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_equalNumberOfItemsPresent() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_equalNumberOfItemsPresent" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -228,12 +181,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_additionalItemsAreNotPermitted() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_arrayOfItemsWithNoAdditionalItemsPermitted_additionalItemsAreNotPermitted" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3,4] @@ -251,12 +199,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsAsFalseWithoutItems_itemsDefaultsToEmptySchemaSoEverythingIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsAsFalseWithoutItems_itemsDefaultsToEmptySchemaSoEverythingIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3,4,5] @@ -274,12 +217,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsAsFalseWithoutItems_ignoresNon_arrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsAsFalseWithoutItems_ignoresNon_arrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -297,12 +235,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsAreAllowedByDefault_onlyTheFirstItemIsValidated() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsAreAllowedByDefault_onlyTheFirstItemIsValidated" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"foo",false] @@ -320,12 +253,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsDoesNotLookInApplicators_ValidCase_itemsDefinedInAllOfAreNotExamined() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsDoesNotLookInApplicators_ValidCase_itemsDefinedInAllOfAreNotExamined" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,null] @@ -343,12 +271,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsDoesNotLookInApplicators_InvalidCase_itemsDefinedInAllOfAreNotExamined() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsDoesNotLookInApplicators_InvalidCase_itemsDefinedInAllOfAreNotExamined" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"hello"] @@ -366,12 +289,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_itemsValidationAdjustsTheStartingIndexForAdditionalItems_validItems() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_itemsValidationAdjustsTheStartingIndexForAdditionalItems_validItems" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["x",2,3] @@ -389,12 +307,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_itemsValidationAdjustsTheStartingIndexForAdditionalItems_wrongTypeOfSecondItem() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_itemsValidationAdjustsTheStartingIndexForAdditionalItems_wrongTypeOfSecondItem" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["x","y"] @@ -412,12 +325,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsWithHeterogeneousArray_heterogeneousInvalidInstance() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsWithHeterogeneousArray_heterogeneousInvalidInstance" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo","bar",37] @@ -435,12 +343,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsWithHeterogeneousArray_validInstance() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsWithHeterogeneousArray_validInstance" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [null] @@ -458,12 +361,7 @@ class SchemaSuiteTest { */ @Test fun additionalItems_additionalItemsWithNullInstanceElements_allowsNullElements() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalItems_additionalItemsWithNullInstanceElements_allowsNullElements" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [null] @@ -480,12 +378,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_noAdditionalPropertiesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_noAdditionalPropertiesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -503,12 +396,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_anAdditionalPropertyIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_anAdditionalPropertyIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"quux":"boom"} @@ -526,12 +414,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -549,12 +432,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresStrings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresStrings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foobarbaz" @@ -572,12 +450,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -595,12 +468,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_patternPropertiesAreNotAdditionalProperties() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesBeingFalseDoesNotAllowOtherProperties_patternPropertiesAreNotAdditionalProperties" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"vroom":2} @@ -618,12 +486,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_non_ASCIIPatternWithAdditionalProperties_matchingThePatternIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_non_ASCIIPatternWithAdditionalProperties_matchingThePatternIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"ármányos":2} @@ -641,12 +504,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_non_ASCIIPatternWithAdditionalProperties_notMatchingThePatternIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_non_ASCIIPatternWithAdditionalProperties_notMatchingThePatternIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"élmény":2} @@ -664,12 +522,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesWithSchema_noAdditionalPropertiesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesWithSchema_noAdditionalPropertiesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -687,12 +540,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesWithSchema_anAdditionalValidPropertyIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesWithSchema_anAdditionalValidPropertyIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"quux":true} @@ -710,12 +558,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesWithSchema_anAdditionalInvalidPropertyIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesWithSchema_anAdditionalInvalidPropertyIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"quux":12} @@ -733,12 +576,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesCanExistByItself_anAdditionalValidPropertyIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesCanExistByItself_anAdditionalValidPropertyIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":true} @@ -756,12 +594,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesCanExistByItself_anAdditionalInvalidPropertyIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesCanExistByItself_anAdditionalInvalidPropertyIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -779,12 +612,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesAreAllowedByDefault_additionalPropertiesAreAllowed() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesAreAllowedByDefault_additionalPropertiesAreAllowed" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"quux":true} @@ -802,12 +630,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesDoesNotLookInApplicators_propertiesDefinedInAllOfAreNotExamined() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesDoesNotLookInApplicators_propertiesDefinedInAllOfAreNotExamined" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":true} @@ -825,12 +648,7 @@ class SchemaSuiteTest { */ @Test fun additionalProperties_additionalPropertiesWithNullValuedInstanceProperties_allowsNullValues() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "additionalProperties_additionalPropertiesWithNullValuedInstanceProperties_allowsNullValues" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":null} @@ -847,12 +665,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOf_allOf() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOf_allOf" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"baz","bar":2} @@ -870,12 +683,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOf_mismatchSecond() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOf_mismatchSecond" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"baz"} @@ -893,12 +701,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOf_mismatchFirst() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOf_mismatchFirst" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -916,12 +719,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOf_wrongType() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOf_wrongType" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"baz","bar":"quux"} @@ -939,12 +737,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBaseSchema_valid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBaseSchema_valid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"quux","bar":2,"baz":null} @@ -962,12 +755,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBaseSchema_mismatchBaseSchema() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBaseSchema_mismatchBaseSchema" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"quux","baz":null} @@ -985,12 +773,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBaseSchema_mismatchFirstAllOf() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBaseSchema_mismatchFirstAllOf" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2,"baz":null} @@ -1008,12 +791,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBaseSchema_mismatchSecondAllOf() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBaseSchema_mismatchSecondAllOf" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"quux","bar":2} @@ -1031,12 +809,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBaseSchema_mismatchBoth() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBaseSchema_mismatchBoth" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -1054,12 +827,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfSimpleTypes_valid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfSimpleTypes_valid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 25 @@ -1077,12 +845,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfSimpleTypes_mismatchOne() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfSimpleTypes_mismatchOne" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 35 @@ -1100,12 +863,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBooleanSchemas_AllTrue_anyValueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBooleanSchemas_AllTrue_anyValueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1123,12 +881,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBooleanSchemas_SomeFalse_anyValueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBooleanSchemas_SomeFalse_anyValueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1146,12 +899,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithBooleanSchemas_AllFalse_anyValueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithBooleanSchemas_AllFalse_anyValueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1169,12 +917,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithOneEmptySchema_anyDataIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithOneEmptySchema_anyDataIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -1192,12 +935,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithTwoEmptySchemas_anyDataIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithTwoEmptySchemas_anyDataIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -1215,12 +953,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithTheFirstEmptySchema_numberIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithTheFirstEmptySchema_numberIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -1238,12 +971,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithTheFirstEmptySchema_stringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithTheFirstEmptySchema_stringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1261,12 +989,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithTheLastEmptySchema_numberIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithTheLastEmptySchema_numberIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -1284,12 +1007,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfWithTheLastEmptySchema_stringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfWithTheLastEmptySchema_stringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1307,12 +1025,7 @@ class SchemaSuiteTest { */ @Test fun allOf_nestedAllOf_ToCheckValidationSemantics_nullIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_nestedAllOf_ToCheckValidationSemantics_nullIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -1330,12 +1043,7 @@ class SchemaSuiteTest { */ @Test fun allOf_nestedAllOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_nestedAllOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -1353,12 +1061,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_False_OneOf_False() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_False_OneOf_False" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -1376,12 +1079,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_False_OneOf_True() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_False_OneOf_True" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 5 @@ -1399,12 +1097,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_True_OneOf_False() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_True_OneOf_False" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -1422,12 +1115,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_True_OneOf_True() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_False_AnyOf_True_OneOf_True" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 15 @@ -1445,12 +1133,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_False_OneOf_False() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_False_OneOf_False" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2 @@ -1468,12 +1151,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_False_OneOf_True() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_False_OneOf_True" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 10 @@ -1491,12 +1169,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_True_OneOf_False() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_True_OneOf_False" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 6 @@ -1514,12 +1187,7 @@ class SchemaSuiteTest { */ @Test fun allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_True_OneOf_True() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "allOf_allOfCombinedWithAnyOf_OneOf_allOf_True_AnyOf_True_OneOf_True" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 30 @@ -1536,12 +1204,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOf_firstAnyOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOf_firstAnyOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -1559,12 +1222,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOf_secondAnyOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOf_secondAnyOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2.5 @@ -1582,12 +1240,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOf_bothAnyOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOf_bothAnyOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -1605,12 +1258,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOf_neitherAnyOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOf_neitherAnyOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.5 @@ -1628,12 +1276,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithBaseSchema_mismatchBaseSchema() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithBaseSchema_mismatchBaseSchema" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -1651,12 +1294,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithBaseSchema_oneAnyOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithBaseSchema_oneAnyOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foobar" @@ -1674,12 +1312,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithBaseSchema_bothAnyOfInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithBaseSchema_bothAnyOfInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1697,12 +1330,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithBooleanSchemas_AllTrue_anyValueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithBooleanSchemas_AllTrue_anyValueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1720,12 +1348,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithBooleanSchemas_SomeTrue_anyValueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithBooleanSchemas_SomeTrue_anyValueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1743,12 +1366,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithBooleanSchemas_AllFalse_anyValueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithBooleanSchemas_AllFalse_anyValueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1766,12 +1384,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfComplexTypes_firstAnyOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfComplexTypes_firstAnyOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -1789,12 +1402,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfComplexTypes_secondAnyOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfComplexTypes_secondAnyOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"baz"} @@ -1812,12 +1420,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfComplexTypes_bothAnyOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfComplexTypes_bothAnyOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"baz","bar":2} @@ -1835,12 +1438,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfComplexTypes_neitherAnyOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfComplexTypes_neitherAnyOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":2,"bar":"quux"} @@ -1858,12 +1456,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithOneEmptySchema_stringIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithOneEmptySchema_stringIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -1881,12 +1474,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_anyOfWithOneEmptySchema_numberIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_anyOfWithOneEmptySchema_numberIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -1904,12 +1492,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_nestedAnyOf_ToCheckValidationSemantics_nullIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_nestedAnyOf_ToCheckValidationSemantics_nullIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -1927,12 +1510,7 @@ class SchemaSuiteTest { */ @Test fun anyOf_nestedAnyOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "anyOf_nestedAnyOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -1949,6 +1527,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__numberIsValid() { + assertKsonEnforcesSchema( """ 1 @@ -1966,6 +1545,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__stringIsValid() { + assertKsonEnforcesSchema( """ "foo" @@ -1983,6 +1563,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__booleanTrueIsValid() { + assertKsonEnforcesSchema( """ true @@ -2000,6 +1581,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__booleanFalseIsValid() { + assertKsonEnforcesSchema( """ false @@ -2017,6 +1599,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__nullIsValid() { + assertKsonEnforcesSchema( """ null @@ -2034,6 +1617,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__objectIsValid() { + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -2051,6 +1635,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__emptyObjectIsValid() { + assertKsonEnforcesSchema( """ {} @@ -2068,6 +1653,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__arrayIsValid() { + assertKsonEnforcesSchema( """ ["foo"] @@ -2085,6 +1671,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_true__emptyArrayIsValid() { + assertKsonEnforcesSchema( """ [] @@ -2102,12 +1689,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__numberIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__numberIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -2125,12 +1707,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__stringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__stringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -2148,12 +1725,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__booleanTrueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__booleanTrueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -2171,12 +1743,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__booleanFalseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__booleanFalseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -2194,12 +1761,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -2217,12 +1779,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__objectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__objectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -2240,12 +1797,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__emptyObjectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__emptyObjectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -2263,12 +1815,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__arrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__arrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -2286,12 +1833,7 @@ class SchemaSuiteTest { */ @Test fun boolean_schema_booleanSchema_false__emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "boolean_schema_booleanSchema_false__emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -2308,12 +1850,7 @@ class SchemaSuiteTest { */ @Test fun const_constValidation_sameValueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constValidation_sameValueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2 @@ -2331,12 +1868,7 @@ class SchemaSuiteTest { */ @Test fun const_constValidation_anotherValueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constValidation_anotherValueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 5 @@ -2354,12 +1886,7 @@ class SchemaSuiteTest { */ @Test fun const_constValidation_anotherTypeIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constValidation_anotherTypeIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "a" @@ -2377,12 +1904,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithObject_sameObjectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithObject_sameObjectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar","baz":"bax"} @@ -2400,12 +1922,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithObject_sameObjectWithDifferentPropertyOrderIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithObject_sameObjectWithDifferentPropertyOrderIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"baz":"bax","foo":"bar"} @@ -2423,12 +1940,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithObject_anotherObjectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithObject_anotherObjectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -2446,12 +1958,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithObject_anotherTypeIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithObject_anotherTypeIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2] @@ -2469,12 +1976,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithArray_sameArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithArray_sameArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":"bar"}] @@ -2492,12 +1994,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithArray_anotherArrayItemIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithArray_anotherArrayItemIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [2] @@ -2515,12 +2012,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithArray_arrayWithAdditionalItemsIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithArray_arrayWithAdditionalItemsIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -2538,12 +2030,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithNull_nullIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithNull_nullIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -2561,12 +2048,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithNull_notNullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithNull_notNullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -2584,12 +2066,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithFalseDoesNotMatch0_falseIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithFalseDoesNotMatch0_falseIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -2607,12 +2084,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithFalseDoesNotMatch0_integerZeroIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithFalseDoesNotMatch0_integerZeroIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -2630,12 +2102,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithFalseDoesNotMatch0_floatZeroIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithFalseDoesNotMatch0_floatZeroIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.0 @@ -2653,12 +2120,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithTrueDoesNotMatch1_trueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithTrueDoesNotMatch1_trueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -2676,12 +2138,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithTrueDoesNotMatch1_integerOneIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithTrueDoesNotMatch1_integerOneIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -2699,12 +2156,7 @@ class SchemaSuiteTest { */ @Test fun const_constWithTrueDoesNotMatch1_floatOneIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWithTrueDoesNotMatch1_floatOneIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.0 @@ -2722,12 +2174,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_false_DoesNotMatch_0___false_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_false_DoesNotMatch_0___false_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false] @@ -2745,12 +2192,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_false_DoesNotMatch_0___0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_false_DoesNotMatch_0___0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0] @@ -2768,12 +2210,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_false_DoesNotMatch_0___0_0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_false_DoesNotMatch_0___0_0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0.0] @@ -2791,12 +2228,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_true_DoesNotMatch_1___true_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_true_DoesNotMatch_1___true_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true] @@ -2814,12 +2246,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_true_DoesNotMatch_1___1_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_true_DoesNotMatch_1___1_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -2837,12 +2264,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_true_DoesNotMatch_1___1_0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_true_DoesNotMatch_1___1_0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1.0] @@ -2860,12 +2282,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith__a__False_DoesNotMatch__a__0____a__False_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith__a__False_DoesNotMatch__a__0____a__False_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":false} @@ -2883,12 +2300,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith__a__False_DoesNotMatch__a__0____a__0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith__a__False_DoesNotMatch__a__0____a__0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":0} @@ -2906,12 +2318,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith__a__False_DoesNotMatch__a__0____a__0_0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith__a__False_DoesNotMatch__a__0____a__0_0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":0.0} @@ -2929,12 +2336,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith__a__True_DoesNotMatch__a__1____a__True_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith__a__True_DoesNotMatch__a__1____a__True_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":true} @@ -2952,12 +2354,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith__a__True_DoesNotMatch__a__1____a__1_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith__a__True_DoesNotMatch__a__1____a__1_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":1} @@ -2975,12 +2372,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith__a__True_DoesNotMatch__a__1____a__1_0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith__a__True_DoesNotMatch__a__1____a__1_0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":1.0} @@ -2998,12 +2390,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith0DoesNotMatchOtherZero_likeTypes_falseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith0DoesNotMatchOtherZero_likeTypes_falseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -3021,12 +2408,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith0DoesNotMatchOtherZero_likeTypes_integerZeroIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith0DoesNotMatchOtherZero_likeTypes_integerZeroIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -3044,12 +2426,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith0DoesNotMatchOtherZero_likeTypes_floatZeroIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith0DoesNotMatchOtherZero_likeTypes_floatZeroIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.0 @@ -3067,12 +2444,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith0DoesNotMatchOtherZero_likeTypes_emptyObjectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith0DoesNotMatchOtherZero_likeTypes_emptyObjectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -3090,12 +2462,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith0DoesNotMatchOtherZero_likeTypes_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith0DoesNotMatchOtherZero_likeTypes_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -3113,12 +2480,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith0DoesNotMatchOtherZero_likeTypes_emptyStringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith0DoesNotMatchOtherZero_likeTypes_emptyStringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "" @@ -3136,12 +2498,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith1DoesNotMatchTrue_trueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith1DoesNotMatchTrue_trueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -3159,12 +2516,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith1DoesNotMatchTrue_integerOneIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith1DoesNotMatchTrue_integerOneIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -3182,12 +2534,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith1DoesNotMatchTrue_floatOneIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith1DoesNotMatchTrue_floatOneIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.0 @@ -3205,12 +2552,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_2_0MatchesIntegerAndFloatTypes_integer_2IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_2_0MatchesIntegerAndFloatTypes_integer_2IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -2 @@ -3228,12 +2570,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_2_0MatchesIntegerAndFloatTypes_integer2IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_2_0MatchesIntegerAndFloatTypes_integer2IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2 @@ -3251,12 +2588,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_2_0MatchesIntegerAndFloatTypes_float_2_0IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_2_0MatchesIntegerAndFloatTypes_float_2_0IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -2.0 @@ -3274,12 +2606,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_2_0MatchesIntegerAndFloatTypes_float2_0IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_2_0MatchesIntegerAndFloatTypes_float2_0IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2.0 @@ -3297,12 +2624,7 @@ class SchemaSuiteTest { */ @Test fun const_constWith_2_0MatchesIntegerAndFloatTypes_float_2_00001IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_constWith_2_0MatchesIntegerAndFloatTypes_float_2_00001IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -2.00001 @@ -3320,12 +2642,7 @@ class SchemaSuiteTest { */ @Test fun const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_integerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_integerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 9007199254740992 @@ -3343,12 +2660,7 @@ class SchemaSuiteTest { */ @Test fun const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_integerMinusOneIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_integerMinusOneIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 9007199254740991 @@ -3366,12 +2678,7 @@ class SchemaSuiteTest { */ @Test fun const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_floatIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_floatIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 9007199254740992.0 @@ -3389,12 +2696,7 @@ class SchemaSuiteTest { */ @Test fun const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_floatMinusOneIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_floatAndIntegersAreEqualUpTo64_bitRepresentationLimits_floatMinusOneIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 9007199254740991.0 @@ -3412,12 +2714,7 @@ class SchemaSuiteTest { */ @Test fun const_nulCharactersInStrings_matchStringWithNul() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_nulCharactersInStrings_matchStringWithNul" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "hello\u0000there" @@ -3435,12 +2732,7 @@ class SchemaSuiteTest { */ @Test fun const_nulCharactersInStrings_doNotMatchStringLackingNul() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "const_nulCharactersInStrings_doNotMatchStringLackingNul" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "hellothere" @@ -3457,12 +2749,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordValidation_arrayWithItemMatchingSchema_5_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordValidation_arrayWithItemMatchingSchema_5_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [3,4,5] @@ -3480,12 +2767,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordValidation_arrayWithItemMatchingSchema_6_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordValidation_arrayWithItemMatchingSchema_6_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [3,4,6] @@ -3503,12 +2785,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordValidation_arrayWithTwoItemsMatchingSchema_5_6_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordValidation_arrayWithTwoItemsMatchingSchema_5_6_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [3,4,5,6] @@ -3526,12 +2803,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordValidation_arrayWithoutItemsMatchingSchemaIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordValidation_arrayWithoutItemsMatchingSchemaIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [2,3,4] @@ -3549,12 +2821,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordValidation_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordValidation_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -3572,12 +2839,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordValidation_notArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordValidation_notArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -3595,12 +2857,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithConstKeyword_arrayWithItem5IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithConstKeyword_arrayWithItem5IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [3,4,5] @@ -3618,12 +2875,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithConstKeyword_arrayWithTwoItems5IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithConstKeyword_arrayWithTwoItems5IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [3,4,5,5] @@ -3641,12 +2893,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithConstKeyword_arrayWithoutItem5IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithConstKeyword_arrayWithoutItem5IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3,4] @@ -3664,12 +2911,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithBooleanSchemaTrue_anyNon_emptyArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithBooleanSchemaTrue_anyNon_emptyArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -3687,12 +2929,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithBooleanSchemaTrue_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithBooleanSchemaTrue_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -3710,12 +2947,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithBooleanSchemaFalse_anyNon_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithBooleanSchemaFalse_anyNon_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -3733,12 +2965,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithBooleanSchemaFalse_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithBooleanSchemaFalse_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -3756,12 +2983,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsKeywordWithBooleanSchemaFalse_non_arraysAreValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsKeywordWithBooleanSchemaFalse_non_arraysAreValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "contains does not apply to strings" @@ -3779,12 +3001,7 @@ class SchemaSuiteTest { */ @Test fun contains_items_Contains_matchesItems_DoesNotMatchContains() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_items_Contains_matchesItems_DoesNotMatchContains" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [2,4,8] @@ -3802,12 +3019,7 @@ class SchemaSuiteTest { */ @Test fun contains_items_Contains_doesNotMatchItems_MatchesContains() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_items_Contains_doesNotMatchItems_MatchesContains" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [3,6,9] @@ -3825,12 +3037,7 @@ class SchemaSuiteTest { */ @Test fun contains_items_Contains_matchesBothItemsAndContains() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_items_Contains_matchesBothItemsAndContains" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [6,12] @@ -3848,12 +3055,7 @@ class SchemaSuiteTest { */ @Test fun contains_items_Contains_matchesNeitherItemsNorContains() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_items_Contains_matchesNeitherItemsNorContains" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,5] @@ -3871,12 +3073,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsWithFalseIfSubschema_anyNon_emptyArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsWithFalseIfSubschema_anyNon_emptyArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -3894,12 +3091,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsWithFalseIfSubschema_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsWithFalseIfSubschema_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -3917,12 +3109,7 @@ class SchemaSuiteTest { */ @Test fun contains_containsWithNullInstanceElements_allowsNullItems() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "contains_containsWithNullInstanceElements_allowsNullItems" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [null] @@ -3939,12 +3126,7 @@ class SchemaSuiteTest { */ @Test fun default_invalidTypeForDefault_validWhenPropertyIsSpecified() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "default_invalidTypeForDefault_validWhenPropertyIsSpecified" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":13} @@ -3962,12 +3144,7 @@ class SchemaSuiteTest { */ @Test fun default_invalidTypeForDefault_stillValidWhenTheInvalidDefaultIsUsed() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "default_invalidTypeForDefault_stillValidWhenTheInvalidDefaultIsUsed" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -3985,12 +3162,7 @@ class SchemaSuiteTest { */ @Test fun default_invalidStringValueForDefault_validWhenPropertyIsSpecified() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "default_invalidStringValueForDefault_validWhenPropertyIsSpecified" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":"good"} @@ -4008,12 +3180,7 @@ class SchemaSuiteTest { */ @Test fun default_invalidStringValueForDefault_stillValidWhenTheInvalidDefaultIsUsed() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "default_invalidStringValueForDefault_stillValidWhenTheInvalidDefaultIsUsed" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -4031,12 +3198,7 @@ class SchemaSuiteTest { */ @Test fun default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_anExplicitPropertyValueIsCheckedAgainstMaximum_passing_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_anExplicitPropertyValueIsCheckedAgainstMaximum_passing_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"alpha":1} @@ -4054,12 +3216,7 @@ class SchemaSuiteTest { */ @Test fun default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_anExplicitPropertyValueIsCheckedAgainstMaximum_failing_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_anExplicitPropertyValueIsCheckedAgainstMaximum_failing_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"alpha":5} @@ -4077,12 +3234,7 @@ class SchemaSuiteTest { */ @Test fun default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_missingPropertiesAreNotFilledInWithTheDefault() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "default_theDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing_missingPropertiesAreNotFilledInWithTheDefault" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -4105,6 +3257,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"definitions":{"foo":{"type":"integer"}}} @@ -4128,6 +3281,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"definitions":{"foo":{"type":1}}} @@ -4144,12 +3298,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependencies_neither() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependencies_neither" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -4167,12 +3316,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependencies_nondependant() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependencies_nondependant" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -4190,12 +3334,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependencies_withDependency() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependencies_withDependency" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -4213,12 +3352,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependencies_missingDependency() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependencies_missingDependency" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -4236,12 +3370,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependencies_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependencies_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["bar"] @@ -4259,12 +3388,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependencies_ignoresStrings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependencies_ignoresStrings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foobar" @@ -4282,12 +3406,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependencies_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependencies_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -4305,12 +3424,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEmptyArray_emptyObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEmptyArray_emptyObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -4328,12 +3442,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEmptyArray_objectWithOneProperty() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEmptyArray_objectWithOneProperty" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -4351,12 +3460,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEmptyArray_non_objectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEmptyArray_non_objectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -4374,12 +3478,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependencies_neither() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependencies_neither" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -4397,12 +3496,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependencies_nondependants() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependencies_nondependants" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -4420,12 +3514,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependencies_withDependencies() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependencies_withDependencies" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"quux":3} @@ -4443,12 +3532,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependencies_missingDependency() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependencies_missingDependency" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"quux":2} @@ -4466,12 +3550,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependencies_missingOtherDependency() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependencies_missingOtherDependency" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":1,"quux":2} @@ -4489,12 +3568,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependencies_missingBothDependencies() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependencies_missingBothDependencies" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"quux":1} @@ -4512,12 +3586,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependenciesSubschema_valid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependenciesSubschema_valid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -4535,12 +3604,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependenciesSubschema_noDependency() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependenciesSubschema_noDependency" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"quux"} @@ -4558,12 +3622,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependenciesSubschema_wrongType() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependenciesSubschema_wrongType" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"quux","bar":2} @@ -4581,12 +3640,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependenciesSubschema_wrongTypeOther() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependenciesSubschema_wrongTypeOther" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":2,"bar":"quux"} @@ -4604,12 +3658,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_multipleDependenciesSubschema_wrongTypeBoth() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_multipleDependenciesSubschema_wrongTypeBoth" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"quux","bar":"quux"} @@ -4627,12 +3676,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithBooleanSubschemas_objectWithPropertyHavingSchemaTrueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithBooleanSubschemas_objectWithPropertyHavingSchemaTrueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -4650,12 +3694,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithBooleanSubschemas_objectWithPropertyHavingSchemaFalseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithBooleanSubschemas_objectWithPropertyHavingSchemaFalseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -4673,12 +3712,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithBooleanSubschemas_objectWithBothPropertiesIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithBooleanSubschemas_objectWithBothPropertiesIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -4696,12 +3730,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithBooleanSubschemas_emptyObjectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithBooleanSubschemas_emptyObjectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -4719,12 +3748,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEscapedCharacters_validObject1() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEscapedCharacters_validObject1" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\nbar":1,"foo\rbar":2} @@ -4742,12 +3766,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEscapedCharacters_validObject2() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEscapedCharacters_validObject2" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\tbar":1,"a":2,"b":3,"c":4} @@ -4765,12 +3784,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEscapedCharacters_validObject3() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEscapedCharacters_validObject3" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo'bar":1,"foo\"bar":2} @@ -4788,12 +3802,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEscapedCharacters_invalidObject1() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEscapedCharacters_invalidObject1" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\nbar":1,"foo":2} @@ -4811,12 +3820,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEscapedCharacters_invalidObject2() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEscapedCharacters_invalidObject2" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\tbar":1,"a":2} @@ -4834,12 +3838,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEscapedCharacters_invalidObject3() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEscapedCharacters_invalidObject3" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo'bar":1} @@ -4857,12 +3856,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependenciesWithEscapedCharacters_invalidObject4() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependenciesWithEscapedCharacters_invalidObject4" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\"bar":2} @@ -4880,12 +3874,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependentSubschemaIncompatibleWithRoot_matchesRoot() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependentSubschemaIncompatibleWithRoot_matchesRoot" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -4903,12 +3892,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependentSubschemaIncompatibleWithRoot_matchesDependency() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependentSubschemaIncompatibleWithRoot_matchesDependency" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":1} @@ -4926,12 +3910,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependentSubschemaIncompatibleWithRoot_matchesBoth() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependentSubschemaIncompatibleWithRoot_matchesBoth" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -4949,12 +3928,7 @@ class SchemaSuiteTest { */ @Test fun dependencies_dependentSubschemaIncompatibleWithRoot_noDependency() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "dependencies_dependentSubschemaIncompatibleWithRoot_noDependency" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"baz":1} @@ -4971,12 +3945,7 @@ class SchemaSuiteTest { */ @Test fun enum_simpleEnumValidation_oneOfTheEnumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_simpleEnumValidation_oneOfTheEnumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -4994,12 +3963,7 @@ class SchemaSuiteTest { */ @Test fun enum_simpleEnumValidation_somethingElseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_simpleEnumValidation_somethingElseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 4 @@ -5017,12 +3981,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnumValidation_oneOfTheEnumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnumValidation_oneOfTheEnumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -5040,12 +3999,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnumValidation_somethingElseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnumValidation_somethingElseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -5063,12 +4017,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnumValidation_objectsAreDeepCompared() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnumValidation_objectsAreDeepCompared" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":false} @@ -5086,12 +4035,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnumValidation_validObjectMatches() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnumValidation_validObjectMatches" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":12} @@ -5109,12 +4053,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnumValidation_extraPropertiesInObjectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnumValidation_extraPropertiesInObjectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":12,"boo":42} @@ -5132,12 +4071,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnum_with_nullValidation_nullIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnum_with_nullValidation_nullIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -5155,12 +4089,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnum_with_nullValidation_numberIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnum_with_nullValidation_numberIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 6 @@ -5178,12 +4107,7 @@ class SchemaSuiteTest { */ @Test fun enum_heterogeneousEnum_with_nullValidation_somethingElseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_heterogeneousEnum_with_nullValidation_somethingElseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "test" @@ -5201,12 +4125,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumsInProperties_bothPropertiesAreValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumsInProperties_bothPropertiesAreValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"foo","bar":"bar"} @@ -5224,12 +4143,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumsInProperties_wrongFooValue() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumsInProperties_wrongFooValue" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"foot","bar":"bar"} @@ -5247,12 +4161,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumsInProperties_wrongBarValue() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumsInProperties_wrongBarValue" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"foo","bar":"bart"} @@ -5270,12 +4179,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumsInProperties_missingOptionalPropertyIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumsInProperties_missingOptionalPropertyIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":"bar"} @@ -5293,12 +4197,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumsInProperties_missingRequiredPropertyIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumsInProperties_missingRequiredPropertyIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"foo"} @@ -5316,12 +4215,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumsInProperties_missingAllPropertiesIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumsInProperties_missingAllPropertiesIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -5339,12 +4233,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithEscapedCharacters_member1IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithEscapedCharacters_member1IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo\nbar" @@ -5362,12 +4251,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithEscapedCharacters_member2IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithEscapedCharacters_member2IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo\rbar" @@ -5385,12 +4269,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithEscapedCharacters_anotherStringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithEscapedCharacters_anotherStringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "abc" @@ -5408,12 +4287,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithFalseDoesNotMatch0_falseIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithFalseDoesNotMatch0_falseIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -5431,12 +4305,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithFalseDoesNotMatch0_integerZeroIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithFalseDoesNotMatch0_integerZeroIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -5454,12 +4323,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithFalseDoesNotMatch0_floatZeroIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithFalseDoesNotMatch0_floatZeroIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.0 @@ -5477,12 +4341,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_false_DoesNotMatch_0___false_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_false_DoesNotMatch_0___false_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false] @@ -5500,12 +4359,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_false_DoesNotMatch_0___0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_false_DoesNotMatch_0___0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0] @@ -5523,12 +4377,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_false_DoesNotMatch_0___0_0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_false_DoesNotMatch_0___0_0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0.0] @@ -5546,12 +4395,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithTrueDoesNotMatch1_trueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithTrueDoesNotMatch1_trueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -5569,12 +4413,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithTrueDoesNotMatch1_integerOneIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithTrueDoesNotMatch1_integerOneIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -5592,12 +4431,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWithTrueDoesNotMatch1_floatOneIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWithTrueDoesNotMatch1_floatOneIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.0 @@ -5615,12 +4449,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_true_DoesNotMatch_1___true_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_true_DoesNotMatch_1___true_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true] @@ -5638,12 +4467,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_true_DoesNotMatch_1___1_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_true_DoesNotMatch_1___1_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -5661,12 +4485,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_true_DoesNotMatch_1___1_0_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_true_DoesNotMatch_1___1_0_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1.0] @@ -5684,12 +4503,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith0DoesNotMatchFalse_falseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith0DoesNotMatchFalse_falseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -5707,12 +4521,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith0DoesNotMatchFalse_integerZeroIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith0DoesNotMatchFalse_integerZeroIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -5730,12 +4539,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith0DoesNotMatchFalse_floatZeroIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith0DoesNotMatchFalse_floatZeroIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.0 @@ -5753,12 +4557,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_0_DoesNotMatch_false___false_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_0_DoesNotMatch_false___false_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false] @@ -5776,12 +4575,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_0_DoesNotMatch_false___0_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_0_DoesNotMatch_false___0_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0] @@ -5799,12 +4593,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_0_DoesNotMatch_false___0_0_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_0_DoesNotMatch_false___0_0_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0.0] @@ -5822,12 +4611,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith1DoesNotMatchTrue_trueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith1DoesNotMatchTrue_trueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -5845,12 +4629,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith1DoesNotMatchTrue_integerOneIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith1DoesNotMatchTrue_integerOneIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -5868,12 +4647,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith1DoesNotMatchTrue_floatOneIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith1DoesNotMatchTrue_floatOneIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.0 @@ -5891,12 +4665,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_1_DoesNotMatch_true___true_IsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_1_DoesNotMatch_true___true_IsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true] @@ -5914,12 +4683,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_1_DoesNotMatch_true___1_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_1_DoesNotMatch_true___1_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -5937,12 +4701,7 @@ class SchemaSuiteTest { */ @Test fun enum_enumWith_1_DoesNotMatch_true___1_0_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_enumWith_1_DoesNotMatch_true___1_0_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1.0] @@ -5960,12 +4719,7 @@ class SchemaSuiteTest { */ @Test fun enum_nulCharactersInStrings_matchStringWithNul() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_nulCharactersInStrings_matchStringWithNul" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "hello\u0000there" @@ -5983,12 +4737,7 @@ class SchemaSuiteTest { */ @Test fun enum_nulCharactersInStrings_doNotMatchStringLackingNul() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "enum_nulCharactersInStrings_doNotMatchStringLackingNul" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "hellothere" @@ -6005,12 +4754,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMaximum_exclusiveMaximumValidation_belowTheExclusiveMaximumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMaximum_exclusiveMaximumValidation_belowTheExclusiveMaximumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2.2 @@ -6028,12 +4772,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMaximum_exclusiveMaximumValidation_boundaryPointIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMaximum_exclusiveMaximumValidation_boundaryPointIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3.0 @@ -6051,12 +4790,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMaximum_exclusiveMaximumValidation_aboveTheExclusiveMaximumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMaximum_exclusiveMaximumValidation_aboveTheExclusiveMaximumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3.5 @@ -6074,12 +4808,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMaximum_exclusiveMaximumValidation_ignoresNon_numbers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMaximum_exclusiveMaximumValidation_ignoresNon_numbers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "x" @@ -6096,12 +4825,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMinimum_exclusiveMinimumValidation_aboveTheExclusiveMinimumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMinimum_exclusiveMinimumValidation_aboveTheExclusiveMinimumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.2 @@ -6119,12 +4843,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMinimum_exclusiveMinimumValidation_boundaryPointIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMinimum_exclusiveMinimumValidation_boundaryPointIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -6142,12 +4861,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMinimum_exclusiveMinimumValidation_belowTheExclusiveMinimumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMinimum_exclusiveMinimumValidation_belowTheExclusiveMinimumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.6 @@ -6165,12 +4879,7 @@ class SchemaSuiteTest { */ @Test fun exclusiveMinimum_exclusiveMinimumValidation_ignoresNon_numbers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "exclusiveMinimum_exclusiveMinimumValidation_ignoresNon_numbers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "x" @@ -6187,12 +4896,7 @@ class SchemaSuiteTest { */ @Test fun format_emailFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_emailFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -6210,12 +4914,7 @@ class SchemaSuiteTest { */ @Test fun format_emailFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_emailFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -6233,12 +4932,7 @@ class SchemaSuiteTest { */ @Test fun format_emailFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_emailFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -6256,12 +4950,7 @@ class SchemaSuiteTest { */ @Test fun format_emailFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_emailFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -6279,12 +4968,7 @@ class SchemaSuiteTest { */ @Test fun format_emailFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_emailFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -6302,12 +4986,7 @@ class SchemaSuiteTest { */ @Test fun format_emailFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_emailFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -6325,12 +5004,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_emailFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_emailFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -6348,12 +5022,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_emailFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_emailFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -6371,12 +5040,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_emailFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_emailFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -6394,12 +5058,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_emailFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_emailFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -6417,12 +5076,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_emailFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_emailFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -6440,12 +5094,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_emailFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_emailFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -6463,12 +5112,7 @@ class SchemaSuiteTest { */ @Test fun format_regexFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_regexFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -6486,12 +5130,7 @@ class SchemaSuiteTest { */ @Test fun format_regexFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_regexFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -6509,12 +5148,7 @@ class SchemaSuiteTest { */ @Test fun format_regexFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_regexFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -6532,12 +5166,7 @@ class SchemaSuiteTest { */ @Test fun format_regexFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_regexFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -6555,12 +5184,7 @@ class SchemaSuiteTest { */ @Test fun format_regexFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_regexFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -6578,12 +5202,7 @@ class SchemaSuiteTest { */ @Test fun format_regexFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_regexFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -6601,12 +5220,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv4Format_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv4Format_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -6624,12 +5238,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv4Format_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv4Format_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -6647,12 +5256,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv4Format_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv4Format_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -6670,12 +5274,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv4Format_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv4Format_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -6693,12 +5292,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv4Format_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv4Format_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -6716,12 +5310,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv4Format_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv4Format_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -6739,12 +5328,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv6Format_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv6Format_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -6762,12 +5346,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv6Format_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv6Format_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -6785,12 +5364,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv6Format_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv6Format_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -6808,12 +5382,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv6Format_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv6Format_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -6831,12 +5400,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv6Format_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv6Format_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -6854,12 +5418,7 @@ class SchemaSuiteTest { */ @Test fun format_ipv6Format_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_ipv6Format_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -6877,12 +5436,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_hostnameFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_hostnameFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -6900,12 +5454,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_hostnameFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_hostnameFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -6923,12 +5472,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_hostnameFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_hostnameFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -6946,12 +5490,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_hostnameFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_hostnameFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -6969,12 +5508,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_hostnameFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_hostnameFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -6992,12 +5526,7 @@ class SchemaSuiteTest { */ @Test fun format_idn_hostnameFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_idn_hostnameFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7015,12 +5544,7 @@ class SchemaSuiteTest { */ @Test fun format_hostnameFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_hostnameFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -7038,12 +5562,7 @@ class SchemaSuiteTest { */ @Test fun format_hostnameFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_hostnameFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -7061,12 +5580,7 @@ class SchemaSuiteTest { */ @Test fun format_hostnameFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_hostnameFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -7084,12 +5598,7 @@ class SchemaSuiteTest { */ @Test fun format_hostnameFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_hostnameFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -7107,12 +5616,7 @@ class SchemaSuiteTest { */ @Test fun format_hostnameFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_hostnameFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -7130,12 +5634,7 @@ class SchemaSuiteTest { */ @Test fun format_hostnameFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_hostnameFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7153,12 +5652,7 @@ class SchemaSuiteTest { */ @Test fun format_dateFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_dateFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -7176,12 +5670,7 @@ class SchemaSuiteTest { */ @Test fun format_dateFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_dateFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -7199,12 +5688,7 @@ class SchemaSuiteTest { */ @Test fun format_dateFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_dateFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -7222,12 +5706,7 @@ class SchemaSuiteTest { */ @Test fun format_dateFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_dateFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -7245,12 +5724,7 @@ class SchemaSuiteTest { */ @Test fun format_dateFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_dateFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -7268,12 +5742,7 @@ class SchemaSuiteTest { */ @Test fun format_dateFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_dateFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7291,12 +5760,7 @@ class SchemaSuiteTest { */ @Test fun format_date_timeFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_date_timeFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -7314,12 +5778,7 @@ class SchemaSuiteTest { */ @Test fun format_date_timeFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_date_timeFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -7337,12 +5796,7 @@ class SchemaSuiteTest { */ @Test fun format_date_timeFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_date_timeFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -7360,12 +5814,7 @@ class SchemaSuiteTest { */ @Test fun format_date_timeFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_date_timeFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -7383,12 +5832,7 @@ class SchemaSuiteTest { */ @Test fun format_date_timeFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_date_timeFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -7406,12 +5850,7 @@ class SchemaSuiteTest { */ @Test fun format_date_timeFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_date_timeFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7429,12 +5868,7 @@ class SchemaSuiteTest { */ @Test fun format_timeFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_timeFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -7452,12 +5886,7 @@ class SchemaSuiteTest { */ @Test fun format_timeFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_timeFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -7475,12 +5904,7 @@ class SchemaSuiteTest { */ @Test fun format_timeFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_timeFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -7498,12 +5922,7 @@ class SchemaSuiteTest { */ @Test fun format_timeFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_timeFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -7521,12 +5940,7 @@ class SchemaSuiteTest { */ @Test fun format_timeFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_timeFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -7544,12 +5958,7 @@ class SchemaSuiteTest { */ @Test fun format_timeFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_timeFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7567,12 +5976,7 @@ class SchemaSuiteTest { */ @Test fun format_json_pointerFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_json_pointerFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -7590,12 +5994,7 @@ class SchemaSuiteTest { */ @Test fun format_json_pointerFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_json_pointerFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -7613,12 +6012,7 @@ class SchemaSuiteTest { */ @Test fun format_json_pointerFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_json_pointerFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -7636,12 +6030,7 @@ class SchemaSuiteTest { */ @Test fun format_json_pointerFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_json_pointerFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -7659,12 +6048,7 @@ class SchemaSuiteTest { */ @Test fun format_json_pointerFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_json_pointerFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -7682,12 +6066,7 @@ class SchemaSuiteTest { */ @Test fun format_json_pointerFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_json_pointerFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7705,12 +6084,7 @@ class SchemaSuiteTest { */ @Test fun format_relative_json_pointerFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_relative_json_pointerFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -7728,12 +6102,7 @@ class SchemaSuiteTest { */ @Test fun format_relative_json_pointerFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_relative_json_pointerFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -7751,12 +6120,7 @@ class SchemaSuiteTest { */ @Test fun format_relative_json_pointerFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_relative_json_pointerFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -7774,12 +6138,7 @@ class SchemaSuiteTest { */ @Test fun format_relative_json_pointerFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_relative_json_pointerFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -7797,12 +6156,7 @@ class SchemaSuiteTest { */ @Test fun format_relative_json_pointerFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_relative_json_pointerFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -7820,12 +6174,7 @@ class SchemaSuiteTest { */ @Test fun format_relative_json_pointerFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_relative_json_pointerFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7843,12 +6192,7 @@ class SchemaSuiteTest { */ @Test fun format_iriFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iriFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -7866,12 +6210,7 @@ class SchemaSuiteTest { */ @Test fun format_iriFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iriFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -7889,12 +6228,7 @@ class SchemaSuiteTest { */ @Test fun format_iriFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iriFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -7912,12 +6246,7 @@ class SchemaSuiteTest { */ @Test fun format_iriFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iriFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -7935,12 +6264,7 @@ class SchemaSuiteTest { */ @Test fun format_iriFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iriFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -7958,12 +6282,7 @@ class SchemaSuiteTest { */ @Test fun format_iriFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iriFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -7981,12 +6300,7 @@ class SchemaSuiteTest { */ @Test fun format_iri_referenceFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iri_referenceFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -8004,12 +6318,7 @@ class SchemaSuiteTest { */ @Test fun format_iri_referenceFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iri_referenceFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -8027,12 +6336,7 @@ class SchemaSuiteTest { */ @Test fun format_iri_referenceFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iri_referenceFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -8050,12 +6354,7 @@ class SchemaSuiteTest { */ @Test fun format_iri_referenceFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iri_referenceFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -8073,12 +6372,7 @@ class SchemaSuiteTest { */ @Test fun format_iri_referenceFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iri_referenceFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -8096,12 +6390,7 @@ class SchemaSuiteTest { */ @Test fun format_iri_referenceFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_iri_referenceFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -8119,12 +6408,7 @@ class SchemaSuiteTest { */ @Test fun format_uriFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uriFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -8142,12 +6426,7 @@ class SchemaSuiteTest { */ @Test fun format_uriFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uriFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -8165,12 +6444,7 @@ class SchemaSuiteTest { */ @Test fun format_uriFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uriFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -8188,12 +6462,7 @@ class SchemaSuiteTest { */ @Test fun format_uriFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uriFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -8211,12 +6480,7 @@ class SchemaSuiteTest { */ @Test fun format_uriFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uriFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -8234,12 +6498,7 @@ class SchemaSuiteTest { */ @Test fun format_uriFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uriFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -8257,12 +6516,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_referenceFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_referenceFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -8280,12 +6534,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_referenceFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_referenceFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -8303,12 +6552,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_referenceFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_referenceFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -8326,12 +6570,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_referenceFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_referenceFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -8349,12 +6588,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_referenceFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_referenceFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -8372,12 +6606,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_referenceFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_referenceFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -8395,12 +6624,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_templateFormat_allStringFormatsIgnoreIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_templateFormat_allStringFormatsIgnoreIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -8418,12 +6642,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_templateFormat_allStringFormatsIgnoreFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_templateFormat_allStringFormatsIgnoreFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 13.7 @@ -8441,12 +6660,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_templateFormat_allStringFormatsIgnoreObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_templateFormat_allStringFormatsIgnoreObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -8464,12 +6678,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_templateFormat_allStringFormatsIgnoreArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_templateFormat_allStringFormatsIgnoreArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -8487,12 +6696,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_templateFormat_allStringFormatsIgnoreBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_templateFormat_allStringFormatsIgnoreBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -8510,12 +6714,7 @@ class SchemaSuiteTest { */ @Test fun format_uri_templateFormat_allStringFormatsIgnoreNulls() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "format_uri_templateFormat_allStringFormatsIgnoreNulls" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -8532,12 +6731,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ignoreIfWithoutThenOrElse_validWhenValidAgainstLoneIf() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ignoreIfWithoutThenOrElse_validWhenValidAgainstLoneIf" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -8555,12 +6749,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ignoreIfWithoutThenOrElse_validWhenInvalidAgainstLoneIf() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ignoreIfWithoutThenOrElse_validWhenInvalidAgainstLoneIf" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "hello" @@ -8578,12 +6767,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ignoreThenWithoutIf_validWhenValidAgainstLoneThen() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ignoreThenWithoutIf_validWhenValidAgainstLoneThen" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -8601,12 +6785,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ignoreThenWithoutIf_validWhenInvalidAgainstLoneThen() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ignoreThenWithoutIf_validWhenInvalidAgainstLoneThen" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "hello" @@ -8624,12 +6803,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ignoreElseWithoutIf_validWhenValidAgainstLoneElse() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ignoreElseWithoutIf_validWhenValidAgainstLoneElse" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -8647,12 +6821,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ignoreElseWithoutIf_validWhenInvalidAgainstLoneElse() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ignoreElseWithoutIf_validWhenInvalidAgainstLoneElse" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "hello" @@ -8670,12 +6839,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAndThenWithoutElse_validThroughThen() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAndThenWithoutElse_validThroughThen" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -1 @@ -8693,12 +6857,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAndThenWithoutElse_invalidThroughThen() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAndThenWithoutElse_invalidThroughThen" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -100 @@ -8716,12 +6875,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAndThenWithoutElse_validWhenIfTestFails() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAndThenWithoutElse_validWhenIfTestFails" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -8739,12 +6893,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAndElseWithoutThen_validWhenIfTestPasses() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAndElseWithoutThen_validWhenIfTestPasses" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -1 @@ -8762,12 +6911,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAndElseWithoutThen_validThroughElse() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAndElseWithoutThen_validThroughElse" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 4 @@ -8785,12 +6929,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAndElseWithoutThen_invalidThroughElse() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAndElseWithoutThen_invalidThroughElse" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -8808,12 +6947,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_validateAgainstCorrectBranch_ThenVsElse_validThroughThen() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_validateAgainstCorrectBranch_ThenVsElse_validThroughThen" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -1 @@ -8831,12 +6965,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_validateAgainstCorrectBranch_ThenVsElse_invalidThroughThen() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_validateAgainstCorrectBranch_ThenVsElse_invalidThroughThen" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -100 @@ -8854,12 +6983,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_validateAgainstCorrectBranch_ThenVsElse_validThroughElse() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_validateAgainstCorrectBranch_ThenVsElse_validThroughElse" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 4 @@ -8877,12 +7001,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_validateAgainstCorrectBranch_ThenVsElse_invalidThroughElse() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_validateAgainstCorrectBranch_ThenVsElse_invalidThroughElse" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -8900,12 +7019,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_non_interferenceAcrossCombinedSchemas_valid_ButWouldHaveBeenInvalidThroughThen() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_non_interferenceAcrossCombinedSchemas_valid_ButWouldHaveBeenInvalidThroughThen" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -100 @@ -8923,12 +7037,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_non_interferenceAcrossCombinedSchemas_valid_ButWouldHaveBeenInvalidThroughElse() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_non_interferenceAcrossCombinedSchemas_valid_ButWouldHaveBeenInvalidThroughElse" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -8946,12 +7055,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifWithBooleanSchemaTrue_booleanSchemaTrueInIfAlwaysChoosesTheThenPath_valid_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifWithBooleanSchemaTrue_booleanSchemaTrueInIfAlwaysChoosesTheThenPath_valid_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "then" @@ -8969,12 +7073,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifWithBooleanSchemaTrue_booleanSchemaTrueInIfAlwaysChoosesTheThenPath_invalid_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifWithBooleanSchemaTrue_booleanSchemaTrueInIfAlwaysChoosesTheThenPath_invalid_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "else" @@ -8992,12 +7091,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifWithBooleanSchemaFalse_booleanSchemaFalseInIfAlwaysChoosesTheElsePath_invalid_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifWithBooleanSchemaFalse_booleanSchemaFalseInIfAlwaysChoosesTheElsePath_invalid_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "then" @@ -9015,12 +7109,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifWithBooleanSchemaFalse_booleanSchemaFalseInIfAlwaysChoosesTheElsePath_valid_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifWithBooleanSchemaFalse_booleanSchemaFalseInIfAlwaysChoosesTheElsePath_valid_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "else" @@ -9038,12 +7127,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__yesRedirectsToThenAndPasses() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__yesRedirectsToThenAndPasses" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "yes" @@ -9061,12 +7145,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__otherRedirectsToElseAndPasses() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__otherRedirectsToElseAndPasses" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "other" @@ -9084,12 +7163,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__noRedirectsToThenAndFails() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__noRedirectsToThenAndFails" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "no" @@ -9107,12 +7181,7 @@ class SchemaSuiteTest { */ @Test fun if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__invalidRedirectsToElseAndFails() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "if_then_else_ifAppearsAtTheEndWhenSerialized_keywordProcessingSequence__invalidRedirectsToElseAndFails" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "invalid" @@ -9135,6 +7204,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":1} @@ -9158,6 +7228,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"a string"} @@ -9174,12 +7245,7 @@ class SchemaSuiteTest { */ @Test fun items_aSchemaGivenForItems_validItems() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_aSchemaGivenForItems_validItems" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -9197,12 +7263,7 @@ class SchemaSuiteTest { */ @Test fun items_aSchemaGivenForItems_wrongTypeOfItems() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_aSchemaGivenForItems_wrongTypeOfItems" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"x"] @@ -9220,12 +7281,7 @@ class SchemaSuiteTest { */ @Test fun items_aSchemaGivenForItems_ignoresNon_arrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_aSchemaGivenForItems_ignoresNon_arrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -9243,12 +7299,7 @@ class SchemaSuiteTest { */ @Test fun items_aSchemaGivenForItems_javaScriptPseudo_arrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_aSchemaGivenForItems_javaScriptPseudo_arrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"0":"invalid","length":1} @@ -9266,12 +7317,7 @@ class SchemaSuiteTest { */ @Test fun items_anArrayOfSchemasForItems_correctTypes() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_anArrayOfSchemasForItems_correctTypes" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"foo"] @@ -9289,12 +7335,7 @@ class SchemaSuiteTest { */ @Test fun items_anArrayOfSchemasForItems_wrongTypes() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_anArrayOfSchemasForItems_wrongTypes" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo",1] @@ -9312,12 +7353,7 @@ class SchemaSuiteTest { */ @Test fun items_anArrayOfSchemasForItems_incompleteArrayOfItems() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_anArrayOfSchemasForItems_incompleteArrayOfItems" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -9335,12 +7371,7 @@ class SchemaSuiteTest { */ @Test fun items_anArrayOfSchemasForItems_arrayWithAdditionalItems() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_anArrayOfSchemasForItems_arrayWithAdditionalItems" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"foo",true] @@ -9358,12 +7389,7 @@ class SchemaSuiteTest { */ @Test fun items_anArrayOfSchemasForItems_emptyArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_anArrayOfSchemasForItems_emptyArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -9381,12 +7407,7 @@ class SchemaSuiteTest { */ @Test fun items_anArrayOfSchemasForItems_javaScriptPseudo_arrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_anArrayOfSchemasForItems_javaScriptPseudo_arrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"0":"invalid","1":"valid","length":2} @@ -9404,12 +7425,7 @@ class SchemaSuiteTest { */ @Test fun items_itemsWithBooleanSchema_true__anyArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_itemsWithBooleanSchema_true__anyArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"foo",true] @@ -9427,12 +7443,7 @@ class SchemaSuiteTest { */ @Test fun items_itemsWithBooleanSchema_true__emptyArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_itemsWithBooleanSchema_true__emptyArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -9450,12 +7461,7 @@ class SchemaSuiteTest { */ @Test fun items_itemsWithBooleanSchema_false__anyNon_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_itemsWithBooleanSchema_false__anyNon_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"foo",true] @@ -9473,12 +7479,7 @@ class SchemaSuiteTest { */ @Test fun items_itemsWithBooleanSchema_false__emptyArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_itemsWithBooleanSchema_false__emptyArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -9496,12 +7497,7 @@ class SchemaSuiteTest { */ @Test fun items_itemsWithBooleanSchemas_arrayWithOneItemIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_itemsWithBooleanSchemas_arrayWithOneItemIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -9519,12 +7515,7 @@ class SchemaSuiteTest { */ @Test fun items_itemsWithBooleanSchemas_arrayWithTwoItemsIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_itemsWithBooleanSchemas_arrayWithTwoItemsIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,"foo"] @@ -9542,12 +7533,7 @@ class SchemaSuiteTest { */ @Test fun items_itemsWithBooleanSchemas_emptyArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_itemsWithBooleanSchemas_emptyArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -9571,6 +7557,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}]] @@ -9594,6 +7581,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}]] @@ -9617,6 +7605,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [[{"foo":null},{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}]] @@ -9640,6 +7629,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [{"foo":null},[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}]] @@ -9663,6 +7653,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [[{},{"foo":null}],[{"foo":null},{"foo":null}],[{"foo":null},{"foo":null}]] @@ -9686,6 +7677,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [[{"foo":null}],[{"foo":null}]] @@ -9703,12 +7695,7 @@ class SchemaSuiteTest { */ @Test fun items_nestedItems_validNestedArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_nestedItems_validNestedArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [[[[1]],[[2],[3]]],[[[4],[5],[6]]]] @@ -9726,12 +7713,7 @@ class SchemaSuiteTest { */ @Test fun items_nestedItems_nestedArrayWithInvalidType() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_nestedItems_nestedArrayWithInvalidType" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [[[["1"]],[[2],[3]]],[[[4],[5],[6]]]] @@ -9749,12 +7731,7 @@ class SchemaSuiteTest { */ @Test fun items_nestedItems_notDeepEnough() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_nestedItems_notDeepEnough" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [[[1],[2],[3]],[[4],[5],[6]]] @@ -9772,12 +7749,7 @@ class SchemaSuiteTest { */ @Test fun items_single_formItemsWithNullInstanceElements_allowsNullElements() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_single_formItemsWithNullInstanceElements_allowsNullElements" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [null] @@ -9795,12 +7767,7 @@ class SchemaSuiteTest { */ @Test fun items_array_formItemsWithNullInstanceElements_allowsNullElements() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "items_array_formItemsWithNullInstanceElements_allowsNullElements" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [null] @@ -9817,12 +7784,7 @@ class SchemaSuiteTest { */ @Test fun maxItems_maxItemsValidation_shorterIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxItems_maxItemsValidation_shorterIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -9840,12 +7802,7 @@ class SchemaSuiteTest { */ @Test fun maxItems_maxItemsValidation_exactLengthIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxItems_maxItemsValidation_exactLengthIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2] @@ -9863,12 +7820,7 @@ class SchemaSuiteTest { */ @Test fun maxItems_maxItemsValidation_tooLongIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxItems_maxItemsValidation_tooLongIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -9886,12 +7838,7 @@ class SchemaSuiteTest { */ @Test fun maxItems_maxItemsValidation_ignoresNon_arrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxItems_maxItemsValidation_ignoresNon_arrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foobar" @@ -9909,12 +7856,7 @@ class SchemaSuiteTest { */ @Test fun maxItems_maxItemsValidationWithADecimal_shorterIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxItems_maxItemsValidationWithADecimal_shorterIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -9932,12 +7874,7 @@ class SchemaSuiteTest { */ @Test fun maxItems_maxItemsValidationWithADecimal_tooLongIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxItems_maxItemsValidationWithADecimal_tooLongIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -9954,12 +7891,7 @@ class SchemaSuiteTest { */ @Test fun maxLength_maxLengthValidation_shorterIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxLength_maxLengthValidation_shorterIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "f" @@ -9977,12 +7909,7 @@ class SchemaSuiteTest { */ @Test fun maxLength_maxLengthValidation_exactLengthIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxLength_maxLengthValidation_exactLengthIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "fo" @@ -10000,12 +7927,7 @@ class SchemaSuiteTest { */ @Test fun maxLength_maxLengthValidation_tooLongIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxLength_maxLengthValidation_tooLongIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -10023,12 +7945,7 @@ class SchemaSuiteTest { */ @Test fun maxLength_maxLengthValidation_ignoresNon_strings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxLength_maxLengthValidation_ignoresNon_strings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 100 @@ -10046,12 +7963,7 @@ class SchemaSuiteTest { */ @Test fun maxLength_maxLengthValidation_twoGraphemesIsLongEnough() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxLength_maxLengthValidation_twoGraphemesIsLongEnough" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "💩💩" @@ -10069,12 +7981,7 @@ class SchemaSuiteTest { */ @Test fun maxLength_maxLengthValidationWithADecimal_shorterIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxLength_maxLengthValidationWithADecimal_shorterIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "f" @@ -10092,12 +7999,7 @@ class SchemaSuiteTest { */ @Test fun maxLength_maxLengthValidationWithADecimal_tooLongIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxLength_maxLengthValidationWithADecimal_tooLongIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -10114,12 +8016,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidation_shorterIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidation_shorterIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -10137,12 +8034,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidation_exactLengthIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidation_exactLengthIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -10160,12 +8052,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidation_tooLongIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidation_tooLongIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"baz":3} @@ -10183,12 +8070,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidation_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidation_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -10206,12 +8088,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidation_ignoresStrings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidation_ignoresStrings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foobar" @@ -10229,12 +8106,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidation_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidation_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -10252,12 +8124,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidationWithADecimal_shorterIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidationWithADecimal_shorterIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -10275,12 +8142,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxPropertiesValidationWithADecimal_tooLongIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxPropertiesValidationWithADecimal_tooLongIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"baz":3} @@ -10298,12 +8160,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxProperties_0MeansTheObjectIsEmpty_noPropertiesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxProperties_0MeansTheObjectIsEmpty_noPropertiesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -10321,12 +8178,7 @@ class SchemaSuiteTest { */ @Test fun maxProperties_maxProperties_0MeansTheObjectIsEmpty_onePropertyIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maxProperties_maxProperties_0MeansTheObjectIsEmpty_onePropertyIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -10343,12 +8195,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidation_belowTheMaximumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidation_belowTheMaximumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2.6 @@ -10366,12 +8213,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidation_boundaryPointIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidation_boundaryPointIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3.0 @@ -10389,12 +8231,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidation_aboveTheMaximumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidation_aboveTheMaximumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3.5 @@ -10412,12 +8249,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidation_ignoresNon_numbers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidation_ignoresNon_numbers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "x" @@ -10435,12 +8267,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidationWithUnsignedInteger_belowTheMaximumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidationWithUnsignedInteger_belowTheMaximumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 299.97 @@ -10458,12 +8285,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidationWithUnsignedInteger_boundaryPointIntegerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidationWithUnsignedInteger_boundaryPointIntegerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 300 @@ -10481,12 +8303,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidationWithUnsignedInteger_boundaryPointFloatIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidationWithUnsignedInteger_boundaryPointFloatIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 300.00 @@ -10504,12 +8321,7 @@ class SchemaSuiteTest { */ @Test fun maximum_maximumValidationWithUnsignedInteger_aboveTheMaximumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "maximum_maximumValidationWithUnsignedInteger_aboveTheMaximumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 300.5 @@ -10526,12 +8338,7 @@ class SchemaSuiteTest { */ @Test fun minItems_minItemsValidation_longerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minItems_minItemsValidation_longerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2] @@ -10549,12 +8356,7 @@ class SchemaSuiteTest { */ @Test fun minItems_minItemsValidation_exactLengthIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minItems_minItemsValidation_exactLengthIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1] @@ -10572,12 +8374,7 @@ class SchemaSuiteTest { */ @Test fun minItems_minItemsValidation_tooShortIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minItems_minItemsValidation_tooShortIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -10595,12 +8392,7 @@ class SchemaSuiteTest { */ @Test fun minItems_minItemsValidation_ignoresNon_arrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minItems_minItemsValidation_ignoresNon_arrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "" @@ -10618,12 +8410,7 @@ class SchemaSuiteTest { */ @Test fun minItems_minItemsValidationWithADecimal_longerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minItems_minItemsValidationWithADecimal_longerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2] @@ -10641,12 +8428,7 @@ class SchemaSuiteTest { */ @Test fun minItems_minItemsValidationWithADecimal_tooShortIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minItems_minItemsValidationWithADecimal_tooShortIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -10663,12 +8445,7 @@ class SchemaSuiteTest { */ @Test fun minLength_minLengthValidation_longerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minLength_minLengthValidation_longerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -10686,12 +8463,7 @@ class SchemaSuiteTest { */ @Test fun minLength_minLengthValidation_exactLengthIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minLength_minLengthValidation_exactLengthIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "fo" @@ -10709,12 +8481,7 @@ class SchemaSuiteTest { */ @Test fun minLength_minLengthValidation_tooShortIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minLength_minLengthValidation_tooShortIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "f" @@ -10732,12 +8499,7 @@ class SchemaSuiteTest { */ @Test fun minLength_minLengthValidation_ignoresNon_strings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minLength_minLengthValidation_ignoresNon_strings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -10755,12 +8517,7 @@ class SchemaSuiteTest { */ @Test fun minLength_minLengthValidation_oneGraphemeIsNotLongEnough() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minLength_minLengthValidation_oneGraphemeIsNotLongEnough" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "💩" @@ -10778,12 +8535,7 @@ class SchemaSuiteTest { */ @Test fun minLength_minLengthValidationWithADecimal_longerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minLength_minLengthValidationWithADecimal_longerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -10801,12 +8553,7 @@ class SchemaSuiteTest { */ @Test fun minLength_minLengthValidationWithADecimal_tooShortIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minLength_minLengthValidationWithADecimal_tooShortIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "f" @@ -10823,12 +8570,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidation_longerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidation_longerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -10846,12 +8588,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidation_exactLengthIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidation_exactLengthIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -10869,12 +8606,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidation_tooShortIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidation_tooShortIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -10892,12 +8624,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidation_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidation_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -10915,12 +8642,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidation_ignoresStrings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidation_ignoresStrings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "" @@ -10938,12 +8660,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidation_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidation_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -10961,12 +8678,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidationWithADecimal_longerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidationWithADecimal_longerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -10984,12 +8696,7 @@ class SchemaSuiteTest { */ @Test fun minProperties_minPropertiesValidationWithADecimal_tooShortIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minProperties_minPropertiesValidationWithADecimal_tooShortIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -11006,12 +8713,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidation_aboveTheMinimumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidation_aboveTheMinimumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2.6 @@ -11029,12 +8731,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidation_boundaryPointIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidation_boundaryPointIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -11052,12 +8749,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidation_belowTheMinimumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidation_belowTheMinimumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.6 @@ -11075,12 +8767,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidation_ignoresNon_numbers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidation_ignoresNon_numbers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "x" @@ -11098,12 +8785,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidationWithSignedInteger_negativeAboveTheMinimumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidationWithSignedInteger_negativeAboveTheMinimumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -1 @@ -11121,12 +8803,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidationWithSignedInteger_positiveAboveTheMinimumIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidationWithSignedInteger_positiveAboveTheMinimumIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -11144,12 +8821,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidationWithSignedInteger_boundaryPointIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidationWithSignedInteger_boundaryPointIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -2 @@ -11167,12 +8839,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidationWithSignedInteger_boundaryPointWithFloatIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidationWithSignedInteger_boundaryPointWithFloatIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -2.0 @@ -11190,12 +8857,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidationWithSignedInteger_floatBelowTheMinimumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidationWithSignedInteger_floatBelowTheMinimumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -2.0001 @@ -11213,12 +8875,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidationWithSignedInteger_intBelowTheMinimumIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidationWithSignedInteger_intBelowTheMinimumIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ -3 @@ -11236,12 +8893,7 @@ class SchemaSuiteTest { */ @Test fun minimum_minimumValidationWithSignedInteger_ignoresNon_numbers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "minimum_minimumValidationWithSignedInteger_ignoresNon_numbers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "x" @@ -11258,12 +8910,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_byInt_intByInt() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_byInt_intByInt" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 10 @@ -11281,12 +8928,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_byInt_intByIntFail() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_byInt_intByIntFail" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 7 @@ -11304,12 +8946,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_byInt_ignoresNon_numbers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_byInt_ignoresNon_numbers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -11327,12 +8964,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_byNumber_zeroIsMultipleOfAnything() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_byNumber_zeroIsMultipleOfAnything" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -11350,12 +8982,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_byNumber_4_5IsMultipleOf1_5() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_byNumber_4_5IsMultipleOf1_5" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 4.5 @@ -11373,12 +9000,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_byNumber_35IsNotMultipleOf1_5() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_byNumber_35IsNotMultipleOf1_5" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 35 @@ -11396,12 +9018,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_bySmallNumber_0_0075IsMultipleOf0_0001() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_bySmallNumber_0_0075IsMultipleOf0_0001" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.0075 @@ -11419,12 +9036,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_bySmallNumber_0_00751IsNotMultipleOf0_0001() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_bySmallNumber_0_00751IsNotMultipleOf0_0001" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0.00751 @@ -11442,12 +9054,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_floatDivision_Inf_alwaysInvalid_ButNaiveImplementationsMayRaiseAnOverflowError() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_floatDivision_Inf_alwaysInvalid_ButNaiveImplementationsMayRaiseAnOverflowError" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1e308 @@ -11465,12 +9072,7 @@ class SchemaSuiteTest { */ @Test fun multipleOf_smallMultipleOfLargeInteger_anyIntegerIsAMultipleOf1e_8() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "multipleOf_smallMultipleOfLargeInteger_anyIntegerIsAMultipleOf1e_8" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12391239123 @@ -11487,12 +9089,7 @@ class SchemaSuiteTest { */ @Test fun not_not_allowed() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_not_allowed" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -11510,12 +9107,7 @@ class SchemaSuiteTest { */ @Test fun not_not_disallowed() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_not_disallowed" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -11533,12 +9125,7 @@ class SchemaSuiteTest { */ @Test fun not_notMultipleTypes_valid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_notMultipleTypes_valid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -11556,12 +9143,7 @@ class SchemaSuiteTest { */ @Test fun not_notMultipleTypes_mismatch() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_notMultipleTypes_mismatch" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -11579,12 +9161,7 @@ class SchemaSuiteTest { */ @Test fun not_notMultipleTypes_otherMismatch() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_notMultipleTypes_otherMismatch" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -11602,12 +9179,7 @@ class SchemaSuiteTest { */ @Test fun not_notMoreComplexSchema_match() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_notMoreComplexSchema_match" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -11625,12 +9197,7 @@ class SchemaSuiteTest { */ @Test fun not_notMoreComplexSchema_otherMatch() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_notMoreComplexSchema_otherMatch" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -11648,12 +9215,7 @@ class SchemaSuiteTest { */ @Test fun not_notMoreComplexSchema_mismatch() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_notMoreComplexSchema_mismatch" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -11671,12 +9233,7 @@ class SchemaSuiteTest { */ @Test fun not_forbiddenProperty_propertyPresent() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbiddenProperty_propertyPresent" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -11694,12 +9251,7 @@ class SchemaSuiteTest { */ @Test fun not_forbiddenProperty_propertyAbsent() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbiddenProperty_propertyAbsent" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":1,"baz":2} @@ -11717,12 +9269,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_numberIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_numberIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -11740,12 +9287,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_stringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_stringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -11763,12 +9305,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_booleanTrueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_booleanTrueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -11786,12 +9323,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_booleanFalseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_booleanFalseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -11809,12 +9341,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -11832,12 +9359,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_objectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_objectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -11855,12 +9377,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_emptyObjectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_emptyObjectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -11878,12 +9395,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_arrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_arrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -11901,12 +9413,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithEmptySchema_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithEmptySchema_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -11924,12 +9431,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_numberIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_numberIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -11947,12 +9449,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_stringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_stringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -11970,12 +9467,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_booleanTrueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_booleanTrueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -11993,12 +9485,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_booleanFalseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_booleanFalseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -12016,12 +9503,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -12039,12 +9521,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_objectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_objectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -12062,12 +9539,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_emptyObjectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_emptyObjectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -12085,12 +9557,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_arrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_arrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -12108,12 +9575,7 @@ class SchemaSuiteTest { */ @Test fun not_forbidEverythingWithBooleanSchemaTrue_emptyArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_forbidEverythingWithBooleanSchemaTrue_emptyArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -12131,12 +9593,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_numberIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_numberIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -12154,12 +9611,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_stringIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_stringIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12177,12 +9629,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_booleanTrueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_booleanTrueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -12200,12 +9647,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_booleanFalseIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_booleanFalseIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -12223,12 +9665,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_nullIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_nullIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -12246,12 +9683,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_objectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_objectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -12269,12 +9701,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_emptyObjectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_emptyObjectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -12292,12 +9719,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_arrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_arrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -12315,12 +9737,7 @@ class SchemaSuiteTest { */ @Test fun not_allowEverythingWithBooleanSchemaFalse_emptyArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_allowEverythingWithBooleanSchemaFalse_emptyArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -12338,12 +9755,7 @@ class SchemaSuiteTest { */ @Test fun not_doubleNegation_anyValueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "not_doubleNegation_anyValueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12360,12 +9772,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOf_firstOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOf_firstOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -12383,12 +9790,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOf_secondOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOf_secondOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 2.5 @@ -12406,12 +9808,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOf_bothOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOf_bothOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -12429,12 +9826,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOf_neitherOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOf_neitherOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.5 @@ -12452,12 +9844,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithBaseSchema_mismatchBaseSchema() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithBaseSchema_mismatchBaseSchema" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 3 @@ -12475,12 +9862,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithBaseSchema_oneOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithBaseSchema_oneOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foobar" @@ -12498,12 +9880,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithBaseSchema_bothOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithBaseSchema_bothOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12521,12 +9898,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithBooleanSchemas_AllTrue_anyValueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithBooleanSchemas_AllTrue_anyValueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12544,12 +9916,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithBooleanSchemas_OneTrue_anyValueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithBooleanSchemas_OneTrue_anyValueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12567,12 +9934,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithBooleanSchemas_MoreThanOneTrue_anyValueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithBooleanSchemas_MoreThanOneTrue_anyValueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12590,12 +9952,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithBooleanSchemas_AllFalse_anyValueIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithBooleanSchemas_AllFalse_anyValueIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12613,12 +9970,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfComplexTypes_firstOneOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfComplexTypes_firstOneOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -12636,12 +9988,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfComplexTypes_secondOneOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfComplexTypes_secondOneOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"baz"} @@ -12659,12 +10006,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfComplexTypes_bothOneOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfComplexTypes_bothOneOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"baz","bar":2} @@ -12682,12 +10024,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfComplexTypes_neitherOneOfValid_complex_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfComplexTypes_neitherOneOfValid_complex_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":2,"bar":"quux"} @@ -12705,12 +10042,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithEmptySchema_oneValid_Valid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithEmptySchema_oneValid_Valid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -12728,12 +10060,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithEmptySchema_bothValid_Invalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithEmptySchema_bothValid_Invalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -12751,12 +10078,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithRequired_bothInvalid_Invalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithRequired_bothInvalid_Invalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -12774,12 +10096,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithRequired_firstValid_Valid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithRequired_firstValid_Valid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -12797,12 +10114,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithRequired_secondValid_Valid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithRequired_secondValid_Valid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"baz":3} @@ -12820,12 +10132,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithRequired_bothValid_Invalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithRequired_bothValid_Invalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2,"baz":3} @@ -12843,12 +10150,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithMissingOptionalProperty_firstOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithMissingOptionalProperty_firstOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":8} @@ -12866,12 +10168,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithMissingOptionalProperty_secondOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithMissingOptionalProperty_secondOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"foo"} @@ -12889,12 +10186,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithMissingOptionalProperty_bothOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithMissingOptionalProperty_bothOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"foo","bar":8} @@ -12912,12 +10204,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_oneOfWithMissingOptionalProperty_neitherOneOfValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_oneOfWithMissingOptionalProperty_neitherOneOfValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"baz":"quux"} @@ -12935,12 +10222,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_nestedOneOf_ToCheckValidationSemantics_nullIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_nestedOneOf_ToCheckValidationSemantics_nullIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -12958,12 +10240,7 @@ class SchemaSuiteTest { */ @Test fun oneOf_nestedOneOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "oneOf_nestedOneOf_ToCheckValidationSemantics_anythingNon_nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -12980,12 +10257,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_aMatchingPatternIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_aMatchingPatternIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "aaa" @@ -13003,12 +10275,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_aNon_matchingPatternIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_aNon_matchingPatternIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "abc" @@ -13026,12 +10293,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_ignoresBooleans() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_ignoresBooleans" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -13049,12 +10311,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_ignoresIntegers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_ignoresIntegers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -13072,12 +10329,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_ignoresFloats() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_ignoresFloats" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.0 @@ -13095,12 +10347,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_ignoresObjects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_ignoresObjects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -13118,12 +10365,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -13141,12 +10383,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternValidation_ignoresNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternValidation_ignoresNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -13164,12 +10401,7 @@ class SchemaSuiteTest { */ @Test fun pattern_patternIsNotAnchored_matchesASubstring() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "pattern_patternIsNotAnchored_matchesASubstring" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "xxaayy" @@ -13186,12 +10418,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_aSingleValidMatchIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_aSingleValidMatchIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -13209,12 +10436,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_multipleValidMatchesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_multipleValidMatchesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"foooooo":2} @@ -13232,12 +10454,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_aSingleInvalidMatchIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_aSingleInvalidMatchIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar","fooooo":2} @@ -13255,12 +10472,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_multipleInvalidMatchesIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_multipleInvalidMatchesIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":"bar","foooooo":"baz"} @@ -13278,12 +10490,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo"] @@ -13301,12 +10508,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresStrings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresStrings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -13324,12 +10526,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesValidatesPropertiesMatchingARegex_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -13347,12 +10544,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_multipleSimultaneousPatternPropertiesAreValidated_aSingleValidMatchIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_aSingleValidMatchIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":21} @@ -13370,12 +10562,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_multipleSimultaneousPatternPropertiesAreValidated_aSimultaneousMatchIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_aSimultaneousMatchIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"aaaa":18} @@ -13393,12 +10580,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_multipleSimultaneousPatternPropertiesAreValidated_multipleMatchesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_multipleMatchesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":21,"aaaa":18} @@ -13416,12 +10598,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToOneIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToOneIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":"bar"} @@ -13439,12 +10616,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToTheOtherIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToTheOtherIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"aaaa":31} @@ -13462,12 +10634,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToBothIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_multipleSimultaneousPatternPropertiesAreValidated_anInvalidDueToBothIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"aaa":"foo","aaaa":31} @@ -13485,12 +10652,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_nonRecognizedMembersAreIgnored() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_nonRecognizedMembersAreIgnored" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"answer 1":"42"} @@ -13508,12 +10670,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_recognizedMembersAreAccountedFor() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_recognizedMembersAreAccountedFor" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a31b":null} @@ -13531,12 +10688,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_regexesAreCaseSensitive() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_regexesAreCaseSensitive" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a_x_3":3} @@ -13554,12 +10706,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_regexesAreCaseSensitive_2() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_regexesAreNotAnchoredByDefaultAndAreCaseSensitive_regexesAreCaseSensitive_2" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a_X_3":3} @@ -13577,12 +10724,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesWithBooleanSchemas_objectWithPropertyMatchingSchemaTrueIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesWithBooleanSchemas_objectWithPropertyMatchingSchemaTrueIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -13600,12 +10742,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesWithBooleanSchemas_objectWithPropertyMatchingSchemaFalseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesWithBooleanSchemas_objectWithPropertyMatchingSchemaFalseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -13623,12 +10760,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesWithBooleanSchemas_objectWithBothPropertiesIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesWithBooleanSchemas_objectWithBothPropertiesIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -13646,12 +10778,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesWithBooleanSchemas_objectWithAPropertyMatchingBothTrueAndFalseIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesWithBooleanSchemas_objectWithAPropertyMatchingBothTrueAndFalseIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foobar":1} @@ -13669,12 +10796,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesWithBooleanSchemas_emptyObjectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesWithBooleanSchemas_emptyObjectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -13692,12 +10814,7 @@ class SchemaSuiteTest { */ @Test fun patternProperties_patternPropertiesWithNullValuedInstanceProperties_allowsNullValues() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "patternProperties_patternPropertiesWithNullValuedInstanceProperties_allowsNullValues" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foobar":null} @@ -13714,12 +10831,7 @@ class SchemaSuiteTest { */ @Test fun properties_objectPropertiesValidation_bothPropertiesPresentAndValidIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_objectPropertiesValidation_bothPropertiesPresentAndValidIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":"baz"} @@ -13737,12 +10849,7 @@ class SchemaSuiteTest { */ @Test fun properties_objectPropertiesValidation_onePropertyInvalidIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_objectPropertiesValidation_onePropertyInvalidIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":{}} @@ -13760,12 +10867,7 @@ class SchemaSuiteTest { */ @Test fun properties_objectPropertiesValidation_bothPropertiesInvalidIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_objectPropertiesValidation_bothPropertiesInvalidIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":[],"bar":{}} @@ -13783,12 +10885,7 @@ class SchemaSuiteTest { */ @Test fun properties_objectPropertiesValidation_doesn_tInvalidateOtherProperties() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_objectPropertiesValidation_doesn_tInvalidateOtherProperties" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"quux":[]} @@ -13806,12 +10903,7 @@ class SchemaSuiteTest { */ @Test fun properties_objectPropertiesValidation_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_objectPropertiesValidation_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -13829,12 +10921,7 @@ class SchemaSuiteTest { */ @Test fun properties_objectPropertiesValidation_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_objectPropertiesValidation_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -13852,12 +10939,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_propertyValidatesProperty() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_propertyValidatesProperty" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":[1,2]} @@ -13875,12 +10957,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_propertyInvalidatesProperty() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_propertyInvalidatesProperty" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":[1,2,3,4]} @@ -13898,12 +10975,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyInvalidatesProperty() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyInvalidatesProperty" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":[]} @@ -13921,12 +10993,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyValidatesNonproperty() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyValidatesNonproperty" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"fxo":[1,2]} @@ -13944,12 +11011,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyInvalidatesNonproperty() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_patternPropertyInvalidatesNonproperty" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"fxo":[]} @@ -13967,12 +11029,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyIgnoresProperty() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyIgnoresProperty" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":[]} @@ -13990,12 +11047,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyValidatesOthers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyValidatesOthers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"quux":3} @@ -14013,12 +11065,7 @@ class SchemaSuiteTest { */ @Test fun properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyInvalidatesOthers() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_properties_PatternProperties_AdditionalPropertiesInteraction_additionalPropertyInvalidatesOthers" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"quux":"foo"} @@ -14036,12 +11083,7 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWithBooleanSchema_noPropertyPresentIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWithBooleanSchema_noPropertyPresentIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -14059,12 +11101,7 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWithBooleanSchema_only_true_PropertyPresentIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWithBooleanSchema_only_true_PropertyPresentIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -14082,12 +11119,7 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWithBooleanSchema_only_false_PropertyPresentIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWithBooleanSchema_only_false_PropertyPresentIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":2} @@ -14105,12 +11137,7 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWithBooleanSchema_bothPropertiesPresentIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWithBooleanSchema_bothPropertiesPresentIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1,"bar":2} @@ -14128,12 +11155,7 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWithEscapedCharacters_objectWithAllNumbersIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWithEscapedCharacters_objectWithAllNumbersIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\nbar":1,"foo\"bar":1,"foo\\bar":1,"foo\rbar":1,"foo\tbar":1,"foo\fbar":1} @@ -14151,12 +11173,7 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWithEscapedCharacters_objectWithStringsIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWithEscapedCharacters_objectWithStringsIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\nbar":"1","foo\"bar":"1","foo\\bar":"1","foo\rbar":"1","foo\tbar":"1","foo\fbar":"1"} @@ -14174,12 +11191,7 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWithNullValuedInstanceProperties_allowsNullValues() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWithNullValuedInstanceProperties_allowsNullValues" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":null} @@ -14197,19 +11209,13 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ [] """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} + {"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} """, true, """properties whose names are Javascript object property names -> ignores arrays""") @@ -14221,19 +11227,13 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ 12 """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} + {"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} """, true, """properties whose names are Javascript object property names -> ignores other non-objects""") @@ -14245,19 +11245,13 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_noneOfThePropertiesMentioned() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_noneOfThePropertiesMentioned" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} + {"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} """, true, """properties whose names are Javascript object property names -> none of the properties mentioned""") @@ -14269,19 +11263,13 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames___proto__NotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames___proto__NotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"__proto__":"foo"} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} + {"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} """, false, """properties whose names are Javascript object property names -> __proto__ not valid""") @@ -14293,19 +11281,13 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_toStringNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_toStringNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"toString":{"length":37}} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} + {"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} """, false, """properties whose names are Javascript object property names -> toString not valid""") @@ -14317,19 +11299,13 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_constructorNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_constructorNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"constructor":{"length":37}} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} + {"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} """, false, """properties whose names are Javascript object property names -> constructor not valid""") @@ -14341,19 +11317,13 @@ class SchemaSuiteTest { */ @Test fun properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_allPresentAndValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "properties_propertiesWhoseNamesAreJavascriptObjectPropertyNames_allPresentAndValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"__proto__":12,"toString":{"length":"foo"},"constructor":37} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} + {"properties":{"__proto__":{"type":"number"},"toString":{"properties":{"length":{"type":"string"}}},"constructor":{"type":"number"}}} """, true, """properties whose names are Javascript object property names -> all present and valid""") @@ -14364,12 +11334,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidation_allPropertyNamesValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidation_allPropertyNamesValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"f":{},"foo":{}} @@ -14387,12 +11352,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidation_somePropertyNamesInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidation_somePropertyNamesInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":{},"foobar":{}} @@ -14410,12 +11370,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidation_objectWithoutPropertiesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidation_objectWithoutPropertiesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -14433,12 +11388,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidation_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidation_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3,4] @@ -14456,12 +11406,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidation_ignoresStrings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidation_ignoresStrings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foobar" @@ -14479,12 +11424,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidation_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidation_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -14502,12 +11442,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidationWithPattern_matchingPropertyNamesValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidationWithPattern_matchingPropertyNamesValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"a":{},"aa":{},"aaa":{}} @@ -14525,12 +11460,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidationWithPattern_non_matchingPropertyNameIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidationWithPattern_non_matchingPropertyNameIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"aaA":{}} @@ -14548,12 +11478,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesValidationWithPattern_objectWithoutPropertiesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesValidationWithPattern_objectWithoutPropertiesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -14571,12 +11496,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesWithBooleanSchemaTrue_objectWithAnyPropertiesIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesWithBooleanSchemaTrue_objectWithAnyPropertiesIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -14594,12 +11514,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesWithBooleanSchemaTrue_emptyObjectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesWithBooleanSchemaTrue_emptyObjectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -14617,12 +11532,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesWithBooleanSchemaFalse_objectWithAnyPropertiesIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesWithBooleanSchemaFalse_objectWithAnyPropertiesIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -14640,12 +11550,7 @@ class SchemaSuiteTest { */ @Test fun propertyNames_propertyNamesWithBooleanSchemaFalse_emptyObjectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "propertyNames_propertyNamesWithBooleanSchemaFalse_emptyObjectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -14668,6 +11573,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":false} @@ -14691,6 +11597,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"foo":false}} @@ -14714,6 +11621,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"bar":false} @@ -14737,6 +11645,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"bar":false}} @@ -14760,6 +11669,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"bar":3} @@ -14783,6 +11693,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"bar":true} @@ -14806,6 +11717,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [1,2] @@ -14829,6 +11741,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [1,"foo"] @@ -14852,6 +11765,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"slash":"aoeu"} @@ -14875,6 +11789,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"tilde":"aoeu"} @@ -14898,6 +11813,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"percent":"aoeu"} @@ -14921,6 +11837,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"slash":123} @@ -14944,6 +11861,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"tilde":123} @@ -14967,6 +11885,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"percent":123} @@ -14990,6 +11909,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 5 @@ -15013,6 +11933,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -15036,6 +11957,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":[]} @@ -15059,6 +11981,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":[1,2,3]} @@ -15082,6 +12005,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"string"} @@ -15105,6 +12029,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -15128,6 +12053,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -15151,6 +12077,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"minLength":1} @@ -15174,6 +12101,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"minLength":-1} @@ -15197,6 +12125,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"${'$'}ref":"a"} @@ -15220,6 +12149,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"${'$'}ref":2} @@ -15243,6 +12173,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"${'$'}ref":"a"} @@ -15266,6 +12197,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"${'$'}ref":2} @@ -15289,6 +12221,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "foo" @@ -15312,6 +12245,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "foo" @@ -15335,6 +12269,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"meta":"root","nodes":[{"value":1,"subtree":{"meta":"child","nodes":[{"value":1.1},{"value":1.2}]}},{"value":2,"subtree":{"meta":"child","nodes":[{"value":2.1},{"value":2.2}]}}]} @@ -15358,6 +12293,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"meta":"root","nodes":[{"value":1,"subtree":{"meta":"child","nodes":[{"value":"string is invalid"},{"value":1.2}]}},{"value":2,"subtree":{"meta":"child","nodes":[{"value":2.1},{"value":2.2}]}}]} @@ -15381,6 +12317,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo\"bar":1} @@ -15404,6 +12341,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo\"bar":"1"} @@ -15427,6 +12365,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -15450,6 +12389,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -15473,6 +12413,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -15496,6 +12437,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -15519,6 +12461,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -15542,6 +12485,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -15565,6 +12509,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "this is a string" @@ -15588,6 +12533,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"type":"string"} @@ -15611,6 +12557,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"${'$'}ref":"#/definitions/a_string"} @@ -15634,6 +12581,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"bar":1},"bar":"a"} @@ -15657,6 +12605,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"bar":"a"},"bar":1} @@ -15680,6 +12629,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"bar":"a"},"bar":"a"} @@ -15703,6 +12653,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"bar":1},"bar":"a"} @@ -15726,6 +12677,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"bar":"a"},"bar":1} @@ -15749,6 +12701,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":{"bar":"a"},"bar":"a"} @@ -15772,6 +12725,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -15795,6 +12749,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -15818,6 +12773,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":37} @@ -15841,6 +12797,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":12} @@ -15864,6 +12821,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -15887,6 +12845,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":12} @@ -15910,6 +12869,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -15933,6 +12893,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":12} @@ -15956,6 +12917,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -15979,6 +12941,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":12} @@ -16002,6 +12965,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -16025,6 +12989,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":12} @@ -16048,6 +13013,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -16071,6 +13037,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":12} @@ -16094,6 +13061,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":"bar"} @@ -16117,6 +13085,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"foo":12} @@ -16140,6 +13109,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "foo" @@ -16163,6 +13133,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 12 @@ -16186,6 +13157,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "foo" @@ -16209,6 +13181,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 12 @@ -16232,6 +13205,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "foo" @@ -16255,6 +13229,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 12 @@ -16278,6 +13253,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "foo" @@ -16301,6 +13277,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 12 @@ -16324,6 +13301,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16347,6 +13325,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -16370,6 +13349,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16393,6 +13373,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -16416,6 +13397,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16439,6 +13421,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -16461,6 +13444,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16484,6 +13468,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -16507,6 +13492,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16530,6 +13516,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -16553,6 +13540,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16576,6 +13564,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -16599,6 +13588,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [[1]] @@ -16622,6 +13612,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ [["a"]] @@ -16645,6 +13636,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"list":[1]} @@ -16668,6 +13660,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"list":["a"]} @@ -16691,6 +13684,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"list":[1]} @@ -16714,6 +13708,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"list":["a"]} @@ -16737,6 +13732,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"name":"foo"} @@ -16760,6 +13756,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"name":null} @@ -16783,6 +13780,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"name":{"name":null}} @@ -16806,6 +13804,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"bar":1} @@ -16829,6 +13828,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"bar":"a"} @@ -16852,6 +13852,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16875,6 +13876,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "foo" @@ -16898,6 +13900,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"name":{"foo":1}} @@ -16921,6 +13924,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ {"name":{"foo":"a"}} @@ -16944,6 +13948,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ 1 @@ -16967,6 +13972,7 @@ class SchemaSuiteTest { * [org.kson.jsonsuite.schemaTestSuiteExclusions] */ return + assertKsonEnforcesSchema( """ "a" @@ -16983,12 +13989,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredValidation_presentRequiredPropertyIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredValidation_presentRequiredPropertyIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":1} @@ -17006,12 +14007,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredValidation_non_presentRequiredPropertyIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredValidation_non_presentRequiredPropertyIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"bar":1} @@ -17029,12 +14025,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredValidation_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredValidation_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -17052,12 +14043,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredValidation_ignoresStrings() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredValidation_ignoresStrings" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "" @@ -17075,12 +14061,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredValidation_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredValidation_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 12 @@ -17098,12 +14079,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredDefaultValidation_notRequiredByDefault() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredDefaultValidation_notRequiredByDefault" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -17121,12 +14097,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredWithEmptyArray_propertyNotRequired() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredWithEmptyArray_propertyNotRequired" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -17144,12 +14115,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredWithEscapedCharacters_objectWithAllPropertiesPresentIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredWithEscapedCharacters_objectWithAllPropertiesPresentIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\nbar":1,"foo\"bar":1,"foo\\bar":1,"foo\rbar":1,"foo\tbar":1,"foo\fbar":1} @@ -17167,12 +14133,7 @@ class SchemaSuiteTest { */ @Test fun required_requiredWithEscapedCharacters_objectWithSomePropertiesMissingIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredWithEscapedCharacters_objectWithSomePropertiesMissingIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo\nbar":"1","foo\"bar":"1"} @@ -17190,19 +14151,13 @@ class SchemaSuiteTest { */ @Test fun required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresArrays() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresArrays" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ [] """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"required":["__proto__","toString","constructor"]} + {"required":["__proto__","toString","constructor"]} """, true, """required properties whose names are Javascript object property names -> ignores arrays""") @@ -17214,19 +14169,13 @@ class SchemaSuiteTest { */ @Test fun required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresOtherNon_objects() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_ignoresOtherNon_objects" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ 12 """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"required":["__proto__","toString","constructor"]} + {"required":["__proto__","toString","constructor"]} """, true, """required properties whose names are Javascript object property names -> ignores other non-objects""") @@ -17238,19 +14187,13 @@ class SchemaSuiteTest { */ @Test fun required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_noneOfThePropertiesMentioned() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_noneOfThePropertiesMentioned" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"required":["__proto__","toString","constructor"]} + {"required":["__proto__","toString","constructor"]} """, false, """required properties whose names are Javascript object property names -> none of the properties mentioned""") @@ -17262,19 +14205,13 @@ class SchemaSuiteTest { */ @Test fun required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames___proto__Present() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames___proto__Present" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"__proto__":"foo"} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"required":["__proto__","toString","constructor"]} + {"required":["__proto__","toString","constructor"]} """, false, """required properties whose names are Javascript object property names -> __proto__ present""") @@ -17286,19 +14223,13 @@ class SchemaSuiteTest { */ @Test fun required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_toStringPresent() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_toStringPresent" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"toString":{"length":37}} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"required":["__proto__","toString","constructor"]} + {"required":["__proto__","toString","constructor"]} """, false, """required properties whose names are Javascript object property names -> toString present""") @@ -17310,19 +14241,13 @@ class SchemaSuiteTest { */ @Test fun required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_constructorPresent() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_constructorPresent" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"constructor":{"length":37}} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"required":["__proto__","toString","constructor"]} + {"required":["__proto__","toString","constructor"]} """, false, """required properties whose names are Javascript object property names -> constructor present""") @@ -17334,19 +14259,13 @@ class SchemaSuiteTest { */ @Test fun required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_allPresent() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "required_requiredPropertiesWhoseNamesAreJavascriptObjectPropertyNames_allPresent" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. assertKsonEnforcesSchema( """ {"__proto__":12,"toString":{"length":"foo"},"constructor":37} """, """ - // Ensure JS implementations don't universally consider e.g. __proto__ to always be present in an object. -{"required":["__proto__","toString","constructor"]} + {"required":["__proto__","toString","constructor"]} """, true, """required properties whose names are Javascript object property names -> all present""") @@ -17357,12 +14276,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_anIntegerIsAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_anIntegerIsAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -17380,12 +14294,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_aFloatWithZeroFractionalPartIsAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_aFloatWithZeroFractionalPartIsAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.0 @@ -17403,12 +14312,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_aFloatIsNotAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_aFloatIsNotAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -17426,12 +14330,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_aStringIsNotAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_aStringIsNotAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -17449,12 +14348,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_aStringIsStillNotAnInteger_EvenIfItLooksLikeOne() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_aStringIsStillNotAnInteger_EvenIfItLooksLikeOne" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "1" @@ -17472,12 +14366,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_anObjectIsNotAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_anObjectIsNotAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -17495,12 +14384,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_anArrayIsNotAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_anArrayIsNotAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -17518,12 +14402,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_aBooleanIsNotAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_aBooleanIsNotAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -17541,12 +14420,7 @@ class SchemaSuiteTest { */ @Test fun type_integerTypeMatchesIntegers_nullIsNotAnInteger() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_integerTypeMatchesIntegers_nullIsNotAnInteger" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -17564,12 +14438,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_anIntegerIsANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_anIntegerIsANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -17587,12 +14456,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_aFloatWithZeroFractionalPartIsANumber_andAnInteger_() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_aFloatWithZeroFractionalPartIsANumber_andAnInteger_" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.0 @@ -17610,12 +14474,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_aFloatIsANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_aFloatIsANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -17633,12 +14492,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_aStringIsNotANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_aStringIsNotANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -17656,12 +14510,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_aStringIsStillNotANumber_EvenIfItLooksLikeOne() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_aStringIsStillNotANumber_EvenIfItLooksLikeOne" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "1" @@ -17679,12 +14528,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_anObjectIsNotANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_anObjectIsNotANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -17702,12 +14546,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_anArrayIsNotANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_anArrayIsNotANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -17725,12 +14564,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_aBooleanIsNotANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_aBooleanIsNotANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -17748,12 +14582,7 @@ class SchemaSuiteTest { */ @Test fun type_numberTypeMatchesNumbers_nullIsNotANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_numberTypeMatchesNumbers_nullIsNotANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -17771,12 +14600,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_1IsNotAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_1IsNotAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -17794,12 +14618,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_aFloatIsNotAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_aFloatIsNotAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -17817,12 +14636,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_aStringIsAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_aStringIsAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -17840,12 +14654,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_aStringIsStillAString_EvenIfItLooksLikeANumber() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_aStringIsStillAString_EvenIfItLooksLikeANumber" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "1" @@ -17863,12 +14672,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_anEmptyStringIsStillAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_anEmptyStringIsStillAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "" @@ -17886,12 +14690,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_anObjectIsNotAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_anObjectIsNotAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -17909,12 +14708,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_anArrayIsNotAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_anArrayIsNotAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -17932,12 +14726,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_aBooleanIsNotAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_aBooleanIsNotAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -17955,12 +14744,7 @@ class SchemaSuiteTest { */ @Test fun type_stringTypeMatchesStrings_nullIsNotAString() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_stringTypeMatchesStrings_nullIsNotAString" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -17978,12 +14762,7 @@ class SchemaSuiteTest { */ @Test fun type_objectTypeMatchesObjects_anIntegerIsNotAnObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_objectTypeMatchesObjects_anIntegerIsNotAnObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -18001,12 +14780,7 @@ class SchemaSuiteTest { */ @Test fun type_objectTypeMatchesObjects_aFloatIsNotAnObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_objectTypeMatchesObjects_aFloatIsNotAnObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -18024,12 +14798,7 @@ class SchemaSuiteTest { */ @Test fun type_objectTypeMatchesObjects_aStringIsNotAnObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_objectTypeMatchesObjects_aStringIsNotAnObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -18047,12 +14816,7 @@ class SchemaSuiteTest { */ @Test fun type_objectTypeMatchesObjects_anObjectIsAnObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_objectTypeMatchesObjects_anObjectIsAnObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -18070,12 +14834,7 @@ class SchemaSuiteTest { */ @Test fun type_objectTypeMatchesObjects_anArrayIsNotAnObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_objectTypeMatchesObjects_anArrayIsNotAnObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -18093,12 +14852,7 @@ class SchemaSuiteTest { */ @Test fun type_objectTypeMatchesObjects_aBooleanIsNotAnObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_objectTypeMatchesObjects_aBooleanIsNotAnObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -18116,12 +14870,7 @@ class SchemaSuiteTest { */ @Test fun type_objectTypeMatchesObjects_nullIsNotAnObject() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_objectTypeMatchesObjects_nullIsNotAnObject" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -18139,12 +14888,7 @@ class SchemaSuiteTest { */ @Test fun type_arrayTypeMatchesArrays_anIntegerIsNotAnArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_arrayTypeMatchesArrays_anIntegerIsNotAnArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -18162,12 +14906,7 @@ class SchemaSuiteTest { */ @Test fun type_arrayTypeMatchesArrays_aFloatIsNotAnArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_arrayTypeMatchesArrays_aFloatIsNotAnArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -18185,12 +14924,7 @@ class SchemaSuiteTest { */ @Test fun type_arrayTypeMatchesArrays_aStringIsNotAnArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_arrayTypeMatchesArrays_aStringIsNotAnArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -18208,12 +14942,7 @@ class SchemaSuiteTest { */ @Test fun type_arrayTypeMatchesArrays_anObjectIsNotAnArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_arrayTypeMatchesArrays_anObjectIsNotAnArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -18231,12 +14960,7 @@ class SchemaSuiteTest { */ @Test fun type_arrayTypeMatchesArrays_anArrayIsAnArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_arrayTypeMatchesArrays_anArrayIsAnArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -18254,12 +14978,7 @@ class SchemaSuiteTest { */ @Test fun type_arrayTypeMatchesArrays_aBooleanIsNotAnArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_arrayTypeMatchesArrays_aBooleanIsNotAnArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -18277,12 +14996,7 @@ class SchemaSuiteTest { */ @Test fun type_arrayTypeMatchesArrays_nullIsNotAnArray() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_arrayTypeMatchesArrays_nullIsNotAnArray" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -18300,12 +15014,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_anIntegerIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_anIntegerIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -18323,12 +15032,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_zeroIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_zeroIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -18346,12 +15050,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_aFloatIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_aFloatIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -18369,12 +15068,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_aStringIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_aStringIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -18392,12 +15086,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_anEmptyStringIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_anEmptyStringIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "" @@ -18415,12 +15104,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_anObjectIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_anObjectIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -18438,12 +15122,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_anArrayIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_anArrayIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -18461,12 +15140,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_trueIsABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_trueIsABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -18484,12 +15158,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_falseIsABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_falseIsABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -18507,12 +15176,7 @@ class SchemaSuiteTest { */ @Test fun type_booleanTypeMatchesBooleans_nullIsNotABoolean() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_booleanTypeMatchesBooleans_nullIsNotABoolean" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -18530,12 +15194,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_anIntegerIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_anIntegerIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -18553,12 +15212,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_aFloatIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_aFloatIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -18576,12 +15230,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_zeroIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_zeroIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 0 @@ -18599,12 +15248,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_aStringIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_aStringIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -18622,12 +15266,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_anEmptyStringIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_anEmptyStringIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "" @@ -18645,12 +15284,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_anObjectIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_anObjectIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -18668,12 +15302,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_anArrayIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_anArrayIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -18691,12 +15320,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_trueIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_trueIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -18714,12 +15338,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_falseIsNotNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_falseIsNotNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ false @@ -18737,12 +15356,7 @@ class SchemaSuiteTest { */ @Test fun type_nullTypeMatchesOnlyTheNullObject_nullIsNull() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_nullTypeMatchesOnlyTheNullObject_nullIsNull" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -18760,12 +15374,7 @@ class SchemaSuiteTest { */ @Test fun type_multipleTypesCanBeSpecifiedInAnArray_anIntegerIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_multipleTypesCanBeSpecifiedInAnArray_anIntegerIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1 @@ -18783,12 +15392,7 @@ class SchemaSuiteTest { */ @Test fun type_multipleTypesCanBeSpecifiedInAnArray_aStringIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_multipleTypesCanBeSpecifiedInAnArray_aStringIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -18806,12 +15410,7 @@ class SchemaSuiteTest { */ @Test fun type_multipleTypesCanBeSpecifiedInAnArray_aFloatIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_multipleTypesCanBeSpecifiedInAnArray_aFloatIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 1.1 @@ -18829,12 +15428,7 @@ class SchemaSuiteTest { */ @Test fun type_multipleTypesCanBeSpecifiedInAnArray_anObjectIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_multipleTypesCanBeSpecifiedInAnArray_anObjectIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {} @@ -18852,12 +15446,7 @@ class SchemaSuiteTest { */ @Test fun type_multipleTypesCanBeSpecifiedInAnArray_anArrayIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_multipleTypesCanBeSpecifiedInAnArray_anArrayIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [] @@ -18875,12 +15464,7 @@ class SchemaSuiteTest { */ @Test fun type_multipleTypesCanBeSpecifiedInAnArray_aBooleanIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_multipleTypesCanBeSpecifiedInAnArray_aBooleanIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ true @@ -18898,12 +15482,7 @@ class SchemaSuiteTest { */ @Test fun type_multipleTypesCanBeSpecifiedInAnArray_nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_multipleTypesCanBeSpecifiedInAnArray_nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -18921,12 +15500,7 @@ class SchemaSuiteTest { */ @Test fun type_typeAsArrayWithOneItem_stringIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_typeAsArrayWithOneItem_stringIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -18944,12 +15518,7 @@ class SchemaSuiteTest { */ @Test fun type_typeAsArrayWithOneItem_numberIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_typeAsArrayWithOneItem_numberIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -18967,12 +15536,7 @@ class SchemaSuiteTest { */ @Test fun type_type_ArrayOrObject_arrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_ArrayOrObject_arrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -18990,12 +15554,7 @@ class SchemaSuiteTest { */ @Test fun type_type_ArrayOrObject_objectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_ArrayOrObject_objectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":123} @@ -19013,12 +15572,7 @@ class SchemaSuiteTest { */ @Test fun type_type_ArrayOrObject_numberIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_ArrayOrObject_numberIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -19036,12 +15590,7 @@ class SchemaSuiteTest { */ @Test fun type_type_ArrayOrObject_stringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_ArrayOrObject_stringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -19059,12 +15608,7 @@ class SchemaSuiteTest { */ @Test fun type_type_ArrayOrObject_nullIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_ArrayOrObject_nullIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -19082,12 +15626,7 @@ class SchemaSuiteTest { */ @Test fun type_type_Array_ObjectOrNull_arrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_Array_ObjectOrNull_arrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,3] @@ -19105,12 +15644,7 @@ class SchemaSuiteTest { */ @Test fun type_type_Array_ObjectOrNull_objectIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_Array_ObjectOrNull_objectIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ {"foo":123} @@ -19128,12 +15662,7 @@ class SchemaSuiteTest { */ @Test fun type_type_Array_ObjectOrNull_nullIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_Array_ObjectOrNull_nullIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ null @@ -19151,12 +15680,7 @@ class SchemaSuiteTest { */ @Test fun type_type_Array_ObjectOrNull_numberIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_Array_ObjectOrNull_numberIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ 123 @@ -19174,12 +15698,7 @@ class SchemaSuiteTest { */ @Test fun type_type_Array_ObjectOrNull_stringIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "type_type_Array_ObjectOrNull_stringIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ "foo" @@ -19196,12 +15715,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_uniqueArrayOfIntegersIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_uniqueArrayOfIntegersIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2] @@ -19219,12 +15733,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueArrayOfIntegersIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfIntegersIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,1] @@ -19242,12 +15751,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueArrayOfMoreThanTwoIntegersIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfMoreThanTwoIntegersIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2,1] @@ -19265,12 +15769,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_numbersAreUniqueIfMathematicallyUnequal() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_numbersAreUniqueIfMathematicallyUnequal" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1.0,1.00,1] @@ -19288,12 +15787,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_falseIsNotEqualToZero() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_falseIsNotEqualToZero" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0,false] @@ -19311,12 +15805,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_trueIsNotEqualToOne() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_trueIsNotEqualToOne" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,true] @@ -19334,12 +15823,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_uniqueArrayOfStringsIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_uniqueArrayOfStringsIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo","bar","baz"] @@ -19357,12 +15841,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueArrayOfStringsIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfStringsIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ ["foo","bar","foo"] @@ -19380,12 +15859,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_uniqueArrayOfObjectsIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_uniqueArrayOfObjectsIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":"bar"},{"foo":"baz"}] @@ -19403,12 +15877,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueArrayOfObjectsIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfObjectsIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":"bar"},{"foo":"bar"}] @@ -19426,12 +15895,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_propertyOrderOfArrayOfObjectsIsIgnored() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_propertyOrderOfArrayOfObjectsIsIgnored" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":"bar","bar":"foo"},{"bar":"foo","foo":"bar"}] @@ -19449,12 +15913,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_uniqueArrayOfNestedObjectsIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_uniqueArrayOfNestedObjectsIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":{"bar":{"baz":true}}},{"foo":{"bar":{"baz":false}}}] @@ -19472,12 +15931,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueArrayOfNestedObjectsIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfNestedObjectsIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":{"bar":{"baz":true}}},{"foo":{"bar":{"baz":true}}}] @@ -19495,12 +15949,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_uniqueArrayOfArraysIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_uniqueArrayOfArraysIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [["foo"],["bar"]] @@ -19518,12 +15967,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueArrayOfArraysIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfArraysIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [["foo"],["foo"]] @@ -19541,12 +15985,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueArrayOfMoreThanTwoArraysIsInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueArrayOfMoreThanTwoArraysIsInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [["foo"],["bar"],["foo"]] @@ -19564,12 +16003,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_1AndTrueAreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_1AndTrueAreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,true] @@ -19587,12 +16021,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_0AndFalseAreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_0AndFalseAreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0,false] @@ -19610,12 +16039,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation__1_And_true_AreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation__1_And_true_AreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [[1],[true]] @@ -19633,12 +16057,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation__0_And_false_AreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation__0_And_false_AreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [[0],[false]] @@ -19656,12 +16075,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_nested_1_And_true_AreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_nested_1_And_true_AreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [[[1],"foo"],[[true],"foo"]] @@ -19679,12 +16093,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_nested_0_And_false_AreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_nested_0_And_false_AreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [[[0],"foo"],[[false],"foo"]] @@ -19702,12 +16111,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_uniqueHeterogeneousTypesAreValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_uniqueHeterogeneousTypesAreValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{},[1],true,null,1,"{}"] @@ -19725,12 +16129,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_non_uniqueHeterogeneousTypesAreInvalid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_non_uniqueHeterogeneousTypesAreInvalid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{},[1],true,null,{},1] @@ -19748,12 +16147,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_differentObjectsAreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_differentObjectsAreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"a":1,"b":2},{"a":2,"b":1}] @@ -19771,12 +16165,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation_objectsAreNon_uniqueDespiteKeyOrder() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation_objectsAreNon_uniqueDespiteKeyOrder" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"a":1,"b":2},{"b":2,"a":1}] @@ -19792,14 +16181,9 @@ class SchemaSuiteTest { * Test generated by [org.kson.jsonsuite.JsonTestSuiteGenerator] based on `buildSrc/support/jsonsuite/JSON-Schema-Test-Suite/tests/draft7/uniqueItems.json`: * "uniqueItems validation -> {"a": false} and {"a": 0} are unique" */ - @Test - fun uniqueItems_uniqueItemsValidation___a__False_And__a__0_AreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation___a__False_And__a__0_AreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + @Test + fun uniqueItems_uniqueItemsValidation___a__False_And__a__0_AreUnique() { + assertKsonEnforcesSchema( """ [{"a":false},{"a":0}] @@ -19817,12 +16201,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsValidation___a__True_And__a__1_AreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsValidation___a__True_And__a__1_AreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"a":true},{"a":1}] @@ -19840,12 +16219,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems__false_True_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems__false_True_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true] @@ -19863,12 +16237,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems__true_False_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems__true_False_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false] @@ -19886,12 +16255,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems__false_False_FromItemsArrayIsNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems__false_False_FromItemsArrayIsNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,false] @@ -19909,12 +16273,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems__true_True_FromItemsArrayIsNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems__true_True_FromItemsArrayIsNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,true] @@ -19932,12 +16291,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems_uniqueArrayExtendedFrom_false_True_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems_uniqueArrayExtendedFrom_false_True_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true,"foo","bar"] @@ -19955,12 +16309,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems_uniqueArrayExtendedFrom_true_False_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems_uniqueArrayExtendedFrom_true_False_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false,"foo","bar"] @@ -19978,12 +16327,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems_non_uniqueArrayExtendedFrom_false_True_IsNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems_non_uniqueArrayExtendedFrom_false_True_IsNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true,"foo","foo"] @@ -20001,12 +16345,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItems_non_uniqueArrayExtendedFrom_true_False_IsNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItems_non_uniqueArrayExtendedFrom_true_False_IsNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false,"foo","foo"] @@ -20024,12 +16363,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__false_True_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__false_True_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true] @@ -20047,12 +16381,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__true_False_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__true_False_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false] @@ -20070,12 +16399,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__false_False_FromItemsArrayIsNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__false_False_FromItemsArrayIsNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,false] @@ -20093,12 +16417,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__true_True_FromItemsArrayIsNotValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false__true_True_FromItemsArrayIsNotValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,true] @@ -20116,12 +16435,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false_extraItemsAreInvalidEvenIfUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItemsWithAnArrayOfItemsAndAdditionalItems_false_extraItemsAreInvalidEvenIfUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true,null] @@ -20139,12 +16453,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_uniqueArrayOfIntegersIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfIntegersIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,2] @@ -20162,12 +16471,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfIntegersIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfIntegersIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,1] @@ -20185,12 +16489,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_numbersAreUniqueIfMathematicallyUnequal() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_numbersAreUniqueIfMathematicallyUnequal" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1.0,1.00,1] @@ -20208,12 +16507,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_falseIsNotEqualToZero() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_falseIsNotEqualToZero" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0,false] @@ -20231,12 +16525,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_trueIsNotEqualToOne() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_trueIsNotEqualToOne" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,true] @@ -20254,12 +16543,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_uniqueArrayOfObjectsIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfObjectsIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":"bar"},{"foo":"baz"}] @@ -20277,12 +16561,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfObjectsIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfObjectsIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":"bar"},{"foo":"bar"}] @@ -20300,12 +16579,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_uniqueArrayOfNestedObjectsIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfNestedObjectsIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":{"bar":{"baz":true}}},{"foo":{"bar":{"baz":false}}}] @@ -20323,12 +16597,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfNestedObjectsIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfNestedObjectsIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{"foo":{"bar":{"baz":true}}},{"foo":{"bar":{"baz":true}}}] @@ -20346,12 +16615,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_uniqueArrayOfArraysIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_uniqueArrayOfArraysIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [["foo"],["bar"]] @@ -20369,12 +16633,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfArraysIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_non_uniqueArrayOfArraysIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [["foo"],["foo"]] @@ -20392,12 +16651,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_1AndTrueAreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_1AndTrueAreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [1,true] @@ -20415,12 +16669,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_0AndFalseAreUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_0AndFalseAreUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [0,false] @@ -20438,12 +16687,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_uniqueHeterogeneousTypesAreValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_uniqueHeterogeneousTypesAreValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{},[1],true,null,1] @@ -20461,12 +16705,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseValidation_non_uniqueHeterogeneousTypesAreValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseValidation_non_uniqueHeterogeneousTypesAreValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [{},[1],true,null,{},1] @@ -20484,12 +16723,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems__false_True_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems__false_True_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true] @@ -20507,12 +16741,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems__true_False_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems__true_False_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false] @@ -20530,12 +16759,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems__false_False_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems__false_False_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,false] @@ -20553,12 +16777,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems__true_True_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems__true_True_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,true] @@ -20576,12 +16795,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems_uniqueArrayExtendedFrom_false_True_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems_uniqueArrayExtendedFrom_false_True_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true,"foo","bar"] @@ -20599,12 +16813,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems_uniqueArrayExtendedFrom_true_False_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems_uniqueArrayExtendedFrom_true_False_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false,"foo","bar"] @@ -20622,12 +16831,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems_non_uniqueArrayExtendedFrom_false_True_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems_non_uniqueArrayExtendedFrom_false_True_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true,"foo","foo"] @@ -20645,12 +16849,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItems_non_uniqueArrayExtendedFrom_true_False_IsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItems_non_uniqueArrayExtendedFrom_true_False_IsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false,"foo","foo"] @@ -20668,12 +16867,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__false_True_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__false_True_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true] @@ -20691,12 +16885,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__true_False_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__true_False_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,false] @@ -20714,12 +16903,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__false_False_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__false_False_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,false] @@ -20737,12 +16921,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__true_True_FromItemsArrayIsValid() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false__true_True_FromItemsArrayIsValid" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [true,true] @@ -20760,12 +16939,7 @@ class SchemaSuiteTest { */ @Test fun uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false_extraItemsAreInvalidEvenIfUnique() { - /** - * TODO implement the schema functionality under test here and remove this exclusion from - * "uniqueItems_uniqueItems_falseWithAnArrayOfItemsAndAdditionalItems_false_extraItemsAreInvalidEvenIfUnique" from - * [org.kson.jsonsuite.schemaTestSuiteExclusions] - */ - return + assertKsonEnforcesSchema( """ [false,true,null] @@ -20776,20 +16950,4 @@ class SchemaSuiteTest { false, """uniqueItems=false with an array of items and additionalItems=false -> extra items are invalid even if unique""") } - - private fun assertKsonEnforcesSchema(ksonSource: String, - schemaJson: String, - shouldAcceptAsValid: Boolean, - description: String) { - // accepted as valid if and only if we parsed without error - val acceptedAsValid = !Kson.parseToAst( - ksonSource.trimIndent(), - coreCompileConfig = CoreCompileConfig(schemaJson = schemaJson.trimIndent())) - .hasErrors() - - assertEquals( - shouldAcceptAsValid, - acceptedAsValid, - description) - } } diff --git a/src/commonTest/kotlin/org/kson/schema/JsonSchemaTest.kt b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTest.kt new file mode 100644 index 00000000..3529220c --- /dev/null +++ b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTest.kt @@ -0,0 +1,27 @@ +package org.kson.schema + +import org.kson.CoreCompileConfig +import org.kson.Kson +import kotlin.test.assertEquals + +/** + * Interface to tie together our Json Schema tests and give a home to our custom assertions for these tests + */ +interface JsonSchemaTest { + fun assertKsonEnforcesSchema(ksonSource: String, + schemaJson: String, + shouldAcceptAsValid: Boolean, + message: String? = null) { + val parseResult = Kson.parseToAst( + ksonSource.trimIndent(), + coreCompileConfig = CoreCompileConfig(schemaJson = schemaJson.trimIndent()) + ) + // accepted as valid if and only if we parsed without error + val acceptedAsValid = !parseResult.hasErrors() + + assertEquals( + shouldAcceptAsValid, + acceptedAsValid, + message) + } +} diff --git a/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestArray.kt b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestArray.kt new file mode 100644 index 00000000..5f366df6 --- /dev/null +++ b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestArray.kt @@ -0,0 +1,27 @@ +package org.kson.schema + +import kotlin.test.Test + +class JsonSchemaTestArray : JsonSchemaTest { + @Test + fun testEnforceConstraintsForMultipleTypes() { + + assertKsonEnforcesSchema( + """ + [1, "string", true] + """, + """ + {"contains": { "type": "boolean" }} + """, + true) + + assertKsonEnforcesSchema( + """ + [1, "string"] + """, + """ + {"contains": { "type": "boolean" }} + """, + false) + } +} diff --git a/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestNumber.kt b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestNumber.kt new file mode 100644 index 00000000..5372efd2 --- /dev/null +++ b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestNumber.kt @@ -0,0 +1,18 @@ +package org.kson.schema + +import kotlin.test.Test + +class JsonSchemaTestNumber : JsonSchemaTest { + @Test + fun testNumberSchemaWithMinExclusive() { + + assertKsonEnforcesSchema( + """ + 10 + """, + """ + {"type": "number", "exclusiveMinimum": 20} + """, + false) + } +} diff --git a/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestType.kt b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestType.kt new file mode 100644 index 00000000..c3976d04 --- /dev/null +++ b/src/commonTest/kotlin/org/kson/schema/JsonSchemaTestType.kt @@ -0,0 +1,27 @@ +package org.kson.schema + +import kotlin.test.Test + +class JsonSchemaTestType : JsonSchemaTest { + @Test + fun testEnforceConstraintsForMultipleTypes() { + + assertKsonEnforcesSchema( + """ + "this string is longer than 10 characters" + """, + """ + {"type": ["string", "number"], "exclusiveMinimum": 20, "maxLength": 10 } + """, + false) + + assertKsonEnforcesSchema( + """ + 10 + """, + """ + {"type": ["string", "number"], "exclusiveMinimum": 20, "maxLength": 10 } + """, + false) + } +} diff --git a/src/commonTest/kotlin/org/kson/schema/SchemaParserTest.kt b/src/commonTest/kotlin/org/kson/schema/SchemaParserTest.kt new file mode 100644 index 00000000..4d83b9b8 --- /dev/null +++ b/src/commonTest/kotlin/org/kson/schema/SchemaParserTest.kt @@ -0,0 +1,228 @@ +package org.kson.schema + +import org.kson.parser.messages.MessageType +import kotlin.test.* + +class SchemaParserTest { + + /** + * Assertion helper for testing that [source] is successfully parsed by the schema parser + * (produces non-null jsonSchema) with no error messages + */ + private fun assertValidSchema(source: String): JsonSchema { + val result = SchemaParser.parse(source) + + val jsonSchema = result.jsonSchema + assertNotNull(jsonSchema, "Should produce a non-null schema when parsing succeeds") + assertTrue(result.messages.isEmpty(), "Should have no error messages when parsing succeeds") + + return jsonSchema + } + + /** + * Assertion helper for testing that [source] is partially parsed by the schema parser + * (produces non-null jsonSchema) but has validation errors listed in [expectedMessageTypes] + */ + private fun assertSchemaHasValidationErrors( + source: String, + expectedMessageTypes: List + ) { + val result = SchemaParser.parse(source) + assertEquals( + expectedMessageTypes, + result.messages.map { it.message.type }, + "Should have the expected validation errors." + ) + assertTrue(result.messages.isNotEmpty(), "Should have error messages for validation errors") + } + + /** + * Assertion helper for testing that [source] produces a [JsonObjectSchema] with no errors + */ + private fun assertValidObjectSchema(source: String): JsonObjectSchema { + val schema = assertValidSchema(source) + assertTrue(schema is JsonObjectSchema, "Should produce a JsonObjectSchema") + return schema + } + + @Test + fun testParseBooleanSchema() { + val trueSchema = assertValidSchema("true") + assertTrue(trueSchema is JsonBooleanSchema) + assertTrue(trueSchema.valid) + + val falseSchema = assertValidSchema("false") + assertTrue(falseSchema is JsonBooleanSchema) + assertFalse(falseSchema.valid) + } + + @Test + fun testParseEmptySchema() { + assertSchemaHasValidationErrors("", listOf(MessageType.SCHEMA_EMPTY_SCHEMA)) + } + + @Test + fun testParseInvalidJson() { + val result = SchemaParser.parse("{ invalid json }") + assertNull(result.jsonSchema) + assertTrue(result.messages.isNotEmpty()) + } + + @Test + fun testParseMinimalObjectSchema() { + assertValidObjectSchema("{}") + } + + @Test + fun testParseSchemaWithTitle() { + val schema = assertValidObjectSchema("""{"title": "Test Schema"}""") + assertEquals("Test Schema", schema.title) + } + + @Test + fun testParseSchemaWithDescription() { + val schema = assertValidObjectSchema("""{"description": "A test schema"}""") + assertEquals("A test schema", schema.description) + } + + @Test + fun testParseSchemaWithTypeString() { + assertValidObjectSchema("""{"type": "string"}""") + } + + @Test + fun testParseSchemaWithTypeArray() { + assertValidObjectSchema("""{"type": ["string", "number"]}""") + } + + @Test + fun testParseSchemaWithInvalidTypeArrayEntry() { + assertSchemaHasValidationErrors( + """{"type": ["string", 123]}""", + listOf(MessageType.SCHEMA_TYPE_ARRAY_ENTRY_ERROR) + ) + } + + @Test + fun testParseSchemaWithNumericValidators() { + assertValidObjectSchema(""" + { + "minimum": 0, + "maximum": 100, + "multipleOf": 5, + "exclusiveMinimum": -1, + "exclusiveMaximum": 101 + } + """) + } + + @Test + fun testParseSchemaWithInvalidMinimum() { + assertSchemaHasValidationErrors( + """{"minimum": "not a number"}""", + listOf(MessageType.SCHEMA_NUMBER_REQUIRED) + ) + } + + @Test + fun testParseSchemaWithStringValidators() { + assertValidObjectSchema(""" + { + "minLength": 1, + "maxLength": 10, + "pattern": "^[a-z]+$" + } + """) + } + + @Test + fun testParseSchemaWithArrayValidators() { + assertValidObjectSchema(""" + { + "minItems": 1, + "maxItems": 5, + "uniqueItems": true, + "items": {"type": "string"} + } + """) + } + + @Test + fun testParseSchemaWithObjectValidators() { + assertValidObjectSchema(""" + { + "minProperties": 1, + "maxProperties": 10, + "required": ["name", "age"], + "properties": { + "name": {"type": "string"}, + "age": {"type": "number"} + } + } + """) + } + + @Test + fun testParseSchemaWithInvalidRequiredArray() { + assertSchemaHasValidationErrors( + """{"required": [123, "name"]}""", + listOf(MessageType.SCHEMA_STRING_ARRAY_ENTRY_ERROR) + ) + } + + @Test + fun testParseSchemaWithIfThenElse() { + assertValidObjectSchema(""" + { + "if": {"type": "string"}, + "then": {"minLength": 1}, + "else": {"type": "number"} + } + """) + } + + @Test + fun testParseSchemaWithDependencies() { + assertValidObjectSchema(""" + { + "dependencies": { + "name": ["age"], + "address": {"type": "object"} + } + } + """) + } + + @Test + fun testParseInvalidSchemaType() { + assertSchemaHasValidationErrors( + "123", + listOf(MessageType.SCHEMA_OBJECT_OR_BOOLEAN) + ) + } + + @Test + fun testParseSchemaWithIntegerLengths() { + assertValidObjectSchema(""" + { + "minLength": 1.0, + "maxLength": 10.0, + "minItems": 2.0, + "maxItems": 5.0 + } + """) + } + + @Test + fun testParseSchemaWithInvalidIntegerLengths() { + assertSchemaHasValidationErrors( + """ + { + "minLength": 1.5, + "maxLength": "not a number" + } + """, + listOf(MessageType.SCHEMA_INTEGER_REQUIRED) + ) + } +}