@@ -157,14 +157,14 @@ func TestMinLength(t *testing.T) {
157157 require .NoError (t , err )
158158
159159 t .Run (fmt .Sprintf ("%s less than minimum length of %d (%s)" , testTable .propertyPointerString , testTable .minLength , testTable .complianceLevel ), func (t * testing.T ) {
160- assert .True (t , schema .PropertyLessThanMinLength (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
160+ assert .True (t , schema .PropertyLessThanMinLength (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
161161 })
162162
163163 // Test schema validation results with minimum value length.
164164 propertyPointer .Set (packageIndex , strings .Repeat ("a" , testTable .minLength ))
165165
166166 t .Run (fmt .Sprintf ("%s at minimum length of %d (%s)" , testTable .propertyPointerString , testTable .minLength , testTable .complianceLevel ), func (t * testing.T ) {
167- assert .False (t , schema .PropertyLessThanMinLength (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
167+ assert .False (t , schema .PropertyLessThanMinLength (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
168168 })
169169 }
170170}
@@ -316,7 +316,7 @@ func TestRequired(t *testing.T) {
316316
317317 validationResult := packageindex .Validate (packageIndex )
318318 t .Run (fmt .Sprintf ("%s (%s)" , testTable .propertyPointerString , testTable .complianceLevel ), func (t * testing.T ) {
319- testTable .assertion (t , schema .RequiredPropertyMissing (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , validationResult [testTable .complianceLevel ]))
319+ testTable .assertion (t , schema .RequiredPropertyMissing (testTable .propertyPointerString , validationResult [testTable .complianceLevel ]))
320320 })
321321 }
322322}
@@ -348,7 +348,7 @@ func TestEnum(t *testing.T) {
348348 require .NoError (t , err )
349349
350350 t .Run (fmt .Sprintf ("%s: %s (%s)" , testTable .propertyPointerString , testTable .propertyValue , testTable .complianceLevel ), func (t * testing.T ) {
351- testTable .assertion (t , schema .PropertyEnumMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
351+ testTable .assertion (t , schema .PropertyEnumMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
352352 })
353353 }
354354}
@@ -512,7 +512,7 @@ func TestPattern(t *testing.T) {
512512 require .NoError (t , err )
513513
514514 t .Run (fmt .Sprintf ("%s: %s (%s)" , testTable .propertyPointerString , testTable .propertyValue , testTable .complianceLevel ), func (t * testing.T ) {
515- testTable .assertion (t , schema .PropertyPatternMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
515+ testTable .assertion (t , schema .PropertyPatternMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
516516 })
517517 }
518518}
@@ -567,7 +567,7 @@ func TestType(t *testing.T) {
567567 _ , err = propertyPointer .Set (packageIndex , testTable .propertyValue )
568568
569569 t .Run (fmt .Sprintf ("%s: %v (%s)" , testTable .propertyPointerString , testTable .propertyValue , complianceLevel ), func (t * testing.T ) {
570- testTable .assertion (t , schema .PropertyTypeMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[complianceLevel ]))
570+ testTable .assertion (t , schema .PropertyTypeMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[complianceLevel ]))
571571 })
572572 }
573573 }
@@ -632,7 +632,7 @@ func TestFormat(t *testing.T) {
632632 require .NoError (t , err )
633633
634634 t .Run (fmt .Sprintf ("%s: %s (%s)" , testTable .propertyPointerString , testTable .propertyValue , testTable .complianceLevel ), func (t * testing.T ) {
635- testTable .assertion (t , schema .PropertyFormatMismatch (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
635+ testTable .assertion (t , schema .PropertyFormatMismatch (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
636636 })
637637 }
638638}
@@ -693,7 +693,7 @@ func TestAdditionalProperties(t *testing.T) {
693693 require .NoError (t , err )
694694
695695 t .Run (fmt .Sprintf ("Additional property in the %s object (%s)" , testTable .propertyPointerString , testTable .complianceLevel ), func (t * testing.T ) {
696- testTable .assertion (t , schema .ProhibitedAdditionalProperties (strings . TrimPrefix ( testTable .propertyPointerString , "/" ) , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
696+ testTable .assertion (t , schema .ProhibitedAdditionalProperties (testTable .propertyPointerString , packageindex .Validate (packageIndex )[testTable .complianceLevel ]))
697697 })
698698 }
699699}
0 commit comments