@@ -613,69 +613,4 @@ public void ValidateFormat_With_Block_Too_Long_Throws_InvalidPolylineException()
613613 }
614614
615615 #endregion
616-
617- #region ValidateCharRange Tests
618-
619- /// <summary>
620- /// Tests that ValidateCharRange succeeds for valid polyline strings.
621- /// </summary>
622- [ TestMethod ]
623- [ DataRow ( "_p~iF~ps|U_ulLnnqC_mqNvxq`@" ) ]
624- [ DataRow ( "?" ) ] // min valid char (ASCII 63)
625- [ DataRow ( "~" ) ] // max valid char (ASCII 126)
626- [ DataRow ( "" ) ] // empty is valid
627- [ DataRow ( "????????????????????????????????" ) ] // long string to trigger SIMD path
628- public void ValidateCharRange_With_Valid_Polyline_Does_Not_Throw ( string polyline ) {
629- // Act & Assert
630- PolylineEncoding . ValidateCharRange ( polyline ) ;
631- }
632-
633- /// <summary>
634- /// Tests that ValidateCharRange throws <see cref="InvalidPolylineException"/> for polylines containing invalid characters.
635- /// </summary>
636- [ TestMethod ]
637- [ DataRow ( ">" ) ] // ASCII 62 (below min of 63)
638- [ DataRow ( "\u007F " ) ] // ASCII 127 (above max of 126)
639- [ DataRow ( "_p~iF!ps|U" ) ] // '!' in middle (ASCII 33)
640- [ DataRow ( "_p~iF~ps|U!" ) ] // '!' at end
641- [ DataRow ( "????????!???????????????????????" ) ] // invalid in SIMD section
642- [ DataRow ( "????????????????\u007F " ) ] // invalid in scalar remainder
643- public void ValidateCharRange_With_Invalid_Character_Throws_InvalidPolylineException ( string polyline ) {
644- // Act & Assert
645- Assert . ThrowsExactly < InvalidPolylineException > ( ( ) => PolylineEncoding . ValidateCharRange ( polyline ) ) ;
646- }
647-
648- #endregion
649-
650- #region ValidateBlockLength Tests
651-
652- /// <summary>
653- /// Tests that ValidateBlockLength succeeds for valid block structures.
654- /// </summary>
655- [ TestMethod ]
656- [ DataRow ( "?" ) ] // single terminator
657- [ DataRow ( "_p~iF~ps|U" ) ] // multiple blocks
658- [ DataRow ( "______?" ) ] // 6 continuation chars + terminator (maximum block length)
659- [ DataRow ( "??" ) ] // consecutive terminators
660- [ DataRow ( "?__?_____?" ) ] // mixed block lengths
661- public void ValidateBlockLength_With_Valid_Polyline_Does_Not_Throw ( string polyline ) {
662- // Act & Assert
663- PolylineEncoding . ValidateBlockLength ( polyline ) ;
664- }
665-
666- /// <summary>
667- /// Tests that ValidateBlockLength throws <see cref="InvalidPolylineException"/> for invalid block structures.
668- /// </summary>
669- [ TestMethod ]
670- [ DataRow ( "________?" ) ] // 8-char block (exceeds max of 7)
671- [ DataRow ( "________" ) ] // all continuation chars, no terminator
672- [ DataRow ( "" ) ] // empty polyline has no terminator
673- [ DataRow ( "?________?" ) ] // valid block then too-long block
674- [ DataRow ( "________?_?" ) ] // first block too long
675- public void ValidateBlockLength_With_Invalid_Polyline_Throws_InvalidPolylineException ( string polyline ) {
676- // Act & Assert
677- Assert . ThrowsExactly < InvalidPolylineException > ( ( ) => PolylineEncoding . ValidateBlockLength ( polyline ) ) ;
678- }
679-
680- #endregion
681616}
0 commit comments