@@ -5,11 +5,13 @@ namespace AspNetCoreAnalyzers.Tests.Helpers
55 using Microsoft . CodeAnalysis . CSharp ;
66 using NUnit . Framework ;
77
8- public class StringLiteralSpanTests
8+ public class SpanTests
99 {
10- [ TestCase ( "\" abc\" " , "abc" , true ) ]
11- [ TestCase ( "\" abc\" " , "ab" , false ) ]
12- [ TestCase ( "\" abc\" " , "bc" , false ) ]
10+ [ TestCase ( "\" abc\" " , "abc" , true ) ]
11+ [ TestCase ( "\" abc\" " , "ab" , false ) ]
12+ [ TestCase ( "\" abc\" " , "bc" , false ) ]
13+ [ TestCase ( "\" abc\" " , "a" , false ) ]
14+ [ TestCase ( "\" abc\" " , "abcd" , false ) ]
1315 public void Equals ( string text , string value , bool expected )
1416 {
1517 var syntaxTree = CSharpSyntaxTree . ParseText ( @"
@@ -28,10 +30,11 @@ class C
2830 Assert . AreEqual ( expected , span . Equals ( value , StringComparison . Ordinal ) ) ;
2931 }
3032
31- [ TestCase ( "\" abc\" " , "abc" , true ) ]
32- [ TestCase ( "\" abc\" " , "ab" , true ) ]
33- [ TestCase ( "\" abc\" " , "a" , true ) ]
34- [ TestCase ( "\" abc\" " , "bc" , false ) ]
33+ [ TestCase ( "\" abc\" " , "abc" , true ) ]
34+ [ TestCase ( "\" abc\" " , "ab" , true ) ]
35+ [ TestCase ( "\" abc\" " , "a" , true ) ]
36+ [ TestCase ( "\" abc\" " , "bc" , false ) ]
37+ [ TestCase ( "\" abc\" " , "abcd" , false ) ]
3538 public void StartsWith ( string text , string value , bool expected )
3639 {
3740 var syntaxTree = CSharpSyntaxTree . ParseText ( @"
@@ -50,10 +53,12 @@ class C
5053 Assert . AreEqual ( expected , span . StartsWith ( value , StringComparison . Ordinal ) ) ;
5154 }
5255
53- [ TestCase ( "\" abc\" " , "abc" , true ) ]
54- [ TestCase ( "\" abc\" " , "bc" , true ) ]
55- [ TestCase ( "\" abc\" " , "c" , true ) ]
56- [ TestCase ( "\" abc\" " , "ab" , false ) ]
56+ [ TestCase ( "\" abc\" " , "abc" , true ) ]
57+ [ TestCase ( "\" abc\" " , "bc" , true ) ]
58+ [ TestCase ( "\" abc\" " , "c" , true ) ]
59+ [ TestCase ( "\" abc\" " , "ab" , false ) ]
60+ [ TestCase ( "\" abc\" " , "bc" , false ) ]
61+ [ TestCase ( "\" abc\" " , "dabc" , false ) ]
5762 public void EndsWith ( string text , string value , bool expected )
5863 {
5964 var syntaxTree = CSharpSyntaxTree . ParseText ( @"
0 commit comments