@@ -8,6 +8,7 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules
88 using Microsoft . CodeAnalysis . CSharp ;
99 using Microsoft . CodeAnalysis . Testing ;
1010 using StyleCop . Analyzers . Test . CSharp7 . SpacingRules ;
11+ using StyleCop . Analyzers . Test . Verifiers ;
1112 using Xunit ;
1213
1314 using static StyleCop . Analyzers . SpacingRules . SA1008OpeningParenthesisMustBeSpacedCorrectly ;
@@ -18,25 +19,6 @@ namespace StyleCop.Analyzers.Test.CSharp8.SpacingRules
1819
1920 public class SA1008CSharp8UnitTests : SA1008CSharp7UnitTests
2021 {
21- private const string RangePrologue = @"namespace System
22- {
23- public struct Range
24- {
25- public Range(Index a, Index b)
26- {
27- }
28- public Index Start { get; }
29- public Index End { get; }
30- }
31-
32- public struct Index
33- {
34- public static implicit operator Index(int value) => throw null;
35- public int GetOffset(int length) => throw null;
36- }
37- }
38- " ;
39-
4022 /// <summary>
4123 /// Verifies that spacing after a range expression double dots isn't required.
4224 /// </summary>
@@ -48,7 +30,7 @@ public struct Index
4830 [ Fact ]
4931 public async Task TestBeforeRangeExpressionAsync ( )
5032 {
51- var testCode = RangePrologue + @"
33+ var testCode = SpecialTypeDefinitions . IndexAndRange + @"
5234namespace TestNamespace
5335{
5436 using System;
@@ -64,7 +46,7 @@ public string TestMethod()
6446}
6547" ;
6648
67- var fixedCode = RangePrologue + @"
49+ var fixedCode = SpecialTypeDefinitions . IndexAndRange + @"
6850namespace TestNamespace
6951{
7052 using System;
0 commit comments