@@ -105,7 +105,7 @@ private void simpleGoodSequences(Utf8ValidationFunction utf8ValidationDelegate)
105105 Assert . True ( ValidateUtf8 ( input , utf8ValidationDelegate ) ,
106106 $ "Failure in Scalar function: SimdUnicode.UTF8.GetPointerToFirstInvalidByte.Sequence: { seq } ") ;
107107
108- // Assert.True(ValidateCount(input, utf8ValidationDelegate));
108+ Assert . True ( ValidateCount ( input , utf8ValidationDelegate ) ) ;
109109 }
110110 }
111111 }
@@ -182,7 +182,7 @@ private void BadSequences(Utf8ValidationFunction utf8ValidationDelegate)
182182 fixed ( byte * pInput = input )
183183 {
184184 ValidateUtf8 ( input , utf8ValidationDelegate ) ;
185- // Assert.True(ValidateCount(input, utf8ValidationDelegate));
185+ Assert . True ( ValidateCount ( input , utf8ValidationDelegate ) ) ;
186186 }
187187 }
188188 }
@@ -231,7 +231,7 @@ private void NoError(Utf8ValidationFunction utf8ValidationDelegate)
231231 {
232232 Assert . True ( isValidUtf8 , $ "Failure NoErrorTest. Sequence: { utf8HexString } ") ;
233233 Assert . True ( InvalidateUtf8 ( utf8 , utf8 . Length , utf8ValidationDelegate ) ) ;
234- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
234+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
235235 }
236236 catch ( Xunit . Sdk . XunitException )
237237 {
@@ -290,7 +290,7 @@ private void RunTestForByteLength(int byteLength, Utf8ValidationFunction utf8Val
290290 try
291291 {
292292 Assert . True ( isValidUtf8 , $ "Failure NoErrorTest. ") ;
293- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
293+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
294294 }
295295 catch ( Xunit . Sdk . XunitException )
296296 {
@@ -356,7 +356,7 @@ private void NoErrorIncompleteThenASCII(Utf8ValidationFunction utf8ValidationDel
356356 {
357357 Assert . False ( isValidUtf8 ) ;
358358 Assert . True ( InvalidateUtf8 ( truncatedUtf8 , truncatedUtf8 . Length , utf8ValidationDelegate ) ) ;
359- // Assert.True(ValidateCount(truncatedUtf8, utf8ValidationDelegate));
359+ Assert . True ( ValidateCount ( truncatedUtf8 , utf8ValidationDelegate ) ) ;
360360 }
361361 catch ( Xunit . Sdk . XunitException )
362362 {
@@ -417,7 +417,7 @@ private void NoErrorIncompleteAt256Vector(Utf8ValidationFunction utf8ValidationD
417417 {
418418 Assert . True ( isValidUtf8 , $ "Failure NoErrorTest. Sequence: { utf8HexString } ") ;
419419 Assert . True ( InvalidateUtf8 ( utf8 , utf8 . Length , utf8ValidationDelegate ) ) ;
420- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
420+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
421421 }
422422 catch ( Xunit . Sdk . XunitException )
423423 {
@@ -475,7 +475,7 @@ private void BadHeaderBits(Utf8ValidationFunction utf8ValidationDelegate)
475475 {
476476 Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
477477 Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
478- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
478+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
479479 }
480480 catch ( Xunit . Sdk . XunitException )
481481 {
@@ -538,7 +538,7 @@ private void TooShortError(Utf8ValidationFunction utf8ValidationDelegate)
538538 {
539539 Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
540540 Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
541- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
541+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
542542 }
543543 catch ( Xunit . Sdk . XunitException )
544544 {
@@ -601,7 +601,7 @@ private void TooLongError(Utf8ValidationFunction utf8ValidationDelegate)
601601 {
602602 Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
603603 Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
604- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
604+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
605605 }
606606 catch ( Xunit . Sdk . XunitException )
607607 {
@@ -677,7 +677,7 @@ private void OverlongError(Utf8ValidationFunction utf8ValidationDelegate)
677677
678678 Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
679679 Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
680- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
680+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
681681
682682 utf8 [ i ] = old ;
683683 utf8 [ i + 1 ] = secondOld ;
@@ -749,7 +749,7 @@ private void TooShortErrorAtEnd(Utf8ValidationFunction utf8ValidationDelegate)
749749 byte * dotnetResult = DotnetRuntime . Utf8Utility . GetPointerToFirstInvalidByte ( pInput , i + offset , out SimdUnicodeUtf16Adjustment , out SimdUnicodeScalarCountAdjustment ) ;
750750 Assert . True ( dotnetResult == pInput + i + offset ) ;
751751
752- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
752+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
753753 }
754754
755755 }
@@ -803,7 +803,7 @@ private void Invalid0xf50xff(Utf8ValidationFunction utf8ValidationDelegate)
803803 utf8 [ position ] = invalidByte ;
804804 Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ; // Expect the validation to fail due to the invalid byte
805805 Assert . True ( InvalidateUtf8 ( utf8 , position , utf8ValidationDelegate ) ) ;
806- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
806+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
807807 }
808808 }
809809 }
@@ -923,7 +923,7 @@ private void TooLargeError(Utf8ValidationFunction utf8ValidationDelegate)
923923
924924 Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
925925 Assert . True ( InvalidateUtf8 ( utf8 , i + 1 , utf8ValidationDelegate ) ) ;
926- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
926+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
927927 utf8 [ i ] = old ;
928928 }
929929 }
@@ -975,7 +975,7 @@ private void AsciiPlusContinuationAtEndError(Utf8ValidationFunction utf8Validati
975975
976976 Assert . False ( ValidateUtf8 ( filler , utf8ValidationDelegate ) ) ;
977977 Assert . True ( InvalidateUtf8 ( filler , filler . Length - 1 , utf8ValidationDelegate ) ) ;
978- // Assert.True(ValidateCount(filler, utf8ValidationDelegate));
978+ Assert . True ( ValidateCount ( filler , utf8ValidationDelegate ) ) ;
979979 }
980980
981981
@@ -1035,7 +1035,7 @@ private void SurrogateErrorTest(Utf8ValidationFunction utf8ValidationDelegate)
10351035
10361036 Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
10371037 Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
1038- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
1038+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
10391039 }
10401040
10411041 utf8 [ i ] = old ;
@@ -1111,7 +1111,7 @@ private void BruteForceTest(Utf8ValidationFunction utf8ValidationDelegate)
11111111 try
11121112 {
11131113 Assert . Equal ( isValidPrimary , isValidFuschia ) ;
1114- // Assert.True(ValidateCount(modifiedUtf8, utf8ValidationDelegate));
1114+ Assert . True ( ValidateCount ( modifiedUtf8 , utf8ValidationDelegate ) ) ;
11151115 }
11161116 catch ( Xunit . Sdk . XunitException )
11171117 {
@@ -1290,7 +1290,7 @@ private static (int offset, int length) GetOffsetAndLength(int totalLength, Rang
12901290 // Define a delegate that matches the signature of the methods you want to test
12911291 public unsafe delegate byte * Utf8ValidationFunction ( byte * pInputBuffer , int inputLength , out int utf16CodeUnitCountAdjustment , out int scalarCountAdjustment ) ;
12921292
1293- public bool ValidateCount ( byte [ ] utf8 , Utf8ValidationFunction utf8ValidationDelegate , Range range = default )
1293+ public bool ValidateCount ( byte [ ] utf8 , Utf8ValidationFunction utf8ValidationDelegate , Range range = default )
12941294 {
12951295 int dotnetUtf16Adjustment , dotnetScalarCountAdjustment ;
12961296 int simdUnicodeUtf16Adjustment , simdUnicodeScalarCountAdjustment ;
0 commit comments