@@ -105,7 +105,7 @@ private void simpleGoodSequences(Utf8ValidationFunction utf8ValidationDelegate)
105
105
Assert . True ( ValidateUtf8 ( input , utf8ValidationDelegate ) ,
106
106
$ "Failure in Scalar function: SimdUnicode.UTF8.GetPointerToFirstInvalidByte.Sequence: { seq } ") ;
107
107
108
- // Assert.True(ValidateCount(input, utf8ValidationDelegate));
108
+ Assert . True ( ValidateCount ( input , utf8ValidationDelegate ) ) ;
109
109
}
110
110
}
111
111
}
@@ -182,7 +182,7 @@ private void BadSequences(Utf8ValidationFunction utf8ValidationDelegate)
182
182
fixed ( byte * pInput = input )
183
183
{
184
184
ValidateUtf8 ( input , utf8ValidationDelegate ) ;
185
- // Assert.True(ValidateCount(input, utf8ValidationDelegate));
185
+ Assert . True ( ValidateCount ( input , utf8ValidationDelegate ) ) ;
186
186
}
187
187
}
188
188
}
@@ -231,7 +231,7 @@ private void NoError(Utf8ValidationFunction utf8ValidationDelegate)
231
231
{
232
232
Assert . True ( isValidUtf8 , $ "Failure NoErrorTest. Sequence: { utf8HexString } ") ;
233
233
Assert . True ( InvalidateUtf8 ( utf8 , utf8 . Length , utf8ValidationDelegate ) ) ;
234
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
234
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
235
235
}
236
236
catch ( Xunit . Sdk . XunitException )
237
237
{
@@ -290,7 +290,7 @@ private void RunTestForByteLength(int byteLength, Utf8ValidationFunction utf8Val
290
290
try
291
291
{
292
292
Assert . True ( isValidUtf8 , $ "Failure NoErrorTest. ") ;
293
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
293
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
294
294
}
295
295
catch ( Xunit . Sdk . XunitException )
296
296
{
@@ -356,7 +356,7 @@ private void NoErrorIncompleteThenASCII(Utf8ValidationFunction utf8ValidationDel
356
356
{
357
357
Assert . False ( isValidUtf8 ) ;
358
358
Assert . True ( InvalidateUtf8 ( truncatedUtf8 , truncatedUtf8 . Length , utf8ValidationDelegate ) ) ;
359
- // Assert.True(ValidateCount(truncatedUtf8, utf8ValidationDelegate));
359
+ Assert . True ( ValidateCount ( truncatedUtf8 , utf8ValidationDelegate ) ) ;
360
360
}
361
361
catch ( Xunit . Sdk . XunitException )
362
362
{
@@ -417,7 +417,7 @@ private void NoErrorIncompleteAt256Vector(Utf8ValidationFunction utf8ValidationD
417
417
{
418
418
Assert . True ( isValidUtf8 , $ "Failure NoErrorTest. Sequence: { utf8HexString } ") ;
419
419
Assert . True ( InvalidateUtf8 ( utf8 , utf8 . Length , utf8ValidationDelegate ) ) ;
420
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
420
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
421
421
}
422
422
catch ( Xunit . Sdk . XunitException )
423
423
{
@@ -475,7 +475,7 @@ private void BadHeaderBits(Utf8ValidationFunction utf8ValidationDelegate)
475
475
{
476
476
Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
477
477
Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
478
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
478
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
479
479
}
480
480
catch ( Xunit . Sdk . XunitException )
481
481
{
@@ -538,7 +538,7 @@ private void TooShortError(Utf8ValidationFunction utf8ValidationDelegate)
538
538
{
539
539
Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
540
540
Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
541
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
541
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
542
542
}
543
543
catch ( Xunit . Sdk . XunitException )
544
544
{
@@ -601,7 +601,7 @@ private void TooLongError(Utf8ValidationFunction utf8ValidationDelegate)
601
601
{
602
602
Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
603
603
Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
604
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
604
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
605
605
}
606
606
catch ( Xunit . Sdk . XunitException )
607
607
{
@@ -677,7 +677,7 @@ private void OverlongError(Utf8ValidationFunction utf8ValidationDelegate)
677
677
678
678
Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
679
679
Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
680
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
680
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
681
681
682
682
utf8 [ i ] = old ;
683
683
utf8 [ i + 1 ] = secondOld ;
@@ -749,7 +749,7 @@ private void TooShortErrorAtEnd(Utf8ValidationFunction utf8ValidationDelegate)
749
749
byte * dotnetResult = DotnetRuntime . Utf8Utility . GetPointerToFirstInvalidByte ( pInput , i + offset , out SimdUnicodeUtf16Adjustment , out SimdUnicodeScalarCountAdjustment ) ;
750
750
Assert . True ( dotnetResult == pInput + i + offset ) ;
751
751
752
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
752
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
753
753
}
754
754
755
755
}
@@ -803,7 +803,7 @@ private void Invalid0xf50xff(Utf8ValidationFunction utf8ValidationDelegate)
803
803
utf8 [ position ] = invalidByte ;
804
804
Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ; // Expect the validation to fail due to the invalid byte
805
805
Assert . True ( InvalidateUtf8 ( utf8 , position , utf8ValidationDelegate ) ) ;
806
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
806
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
807
807
}
808
808
}
809
809
}
@@ -923,7 +923,7 @@ private void TooLargeError(Utf8ValidationFunction utf8ValidationDelegate)
923
923
924
924
Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
925
925
Assert . True ( InvalidateUtf8 ( utf8 , i + 1 , utf8ValidationDelegate ) ) ;
926
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
926
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
927
927
utf8 [ i ] = old ;
928
928
}
929
929
}
@@ -975,7 +975,7 @@ private void AsciiPlusContinuationAtEndError(Utf8ValidationFunction utf8Validati
975
975
976
976
Assert . False ( ValidateUtf8 ( filler , utf8ValidationDelegate ) ) ;
977
977
Assert . True ( InvalidateUtf8 ( filler , filler . Length - 1 , utf8ValidationDelegate ) ) ;
978
- // Assert.True(ValidateCount(filler, utf8ValidationDelegate));
978
+ Assert . True ( ValidateCount ( filler , utf8ValidationDelegate ) ) ;
979
979
}
980
980
981
981
@@ -1035,7 +1035,7 @@ private void SurrogateErrorTest(Utf8ValidationFunction utf8ValidationDelegate)
1035
1035
1036
1036
Assert . False ( ValidateUtf8 ( utf8 , utf8ValidationDelegate ) ) ;
1037
1037
Assert . True ( InvalidateUtf8 ( utf8 , i , utf8ValidationDelegate ) ) ;
1038
- // Assert.True(ValidateCount(utf8, utf8ValidationDelegate));
1038
+ Assert . True ( ValidateCount ( utf8 , utf8ValidationDelegate ) ) ;
1039
1039
}
1040
1040
1041
1041
utf8 [ i ] = old ;
@@ -1111,7 +1111,7 @@ private void BruteForceTest(Utf8ValidationFunction utf8ValidationDelegate)
1111
1111
try
1112
1112
{
1113
1113
Assert . Equal ( isValidPrimary , isValidFuschia ) ;
1114
- // Assert.True(ValidateCount(modifiedUtf8, utf8ValidationDelegate));
1114
+ Assert . True ( ValidateCount ( modifiedUtf8 , utf8ValidationDelegate ) ) ;
1115
1115
}
1116
1116
catch ( Xunit . Sdk . XunitException )
1117
1117
{
@@ -1290,7 +1290,7 @@ private static (int offset, int length) GetOffsetAndLength(int totalLength, Rang
1290
1290
// Define a delegate that matches the signature of the methods you want to test
1291
1291
public unsafe delegate byte * Utf8ValidationFunction ( byte * pInputBuffer , int inputLength , out int utf16CodeUnitCountAdjustment , out int scalarCountAdjustment ) ;
1292
1292
1293
- public bool ValidateCount ( byte [ ] utf8 , Utf8ValidationFunction utf8ValidationDelegate , Range range = default )
1293
+ public bool ValidateCount ( byte [ ] utf8 , Utf8ValidationFunction utf8ValidationDelegate , Range range = default )
1294
1294
{
1295
1295
int dotnetUtf16Adjustment , dotnetScalarCountAdjustment ;
1296
1296
int simdUnicodeUtf16Adjustment , simdUnicodeScalarCountAdjustment ;
0 commit comments