Browse Source

Replace roslynLatestOnlyOptions with roslyn3OrNewerOptions/roslyn4OrNewerOptions.

Existing "latest only" markers on old tests becomes unnecessarily restrictive as new roslyn versions are released.
pull/2832/head
Daniel Grunwald 3 years ago
parent
commit
afeeea7cf2
  1. 20
      ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

20
ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

@ -135,15 +135,7 @@ namespace ICSharpCode.Decompiler.Tests
CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest,
}; };
static readonly CompilerOptions[] roslynLatestOnlyWithNet40Options = static readonly CompilerOptions[] roslyn4OrNewerOptions =
{
CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40,
CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40,
CompilerOptions.UseRoslynLatest,
CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest,
};
static readonly CompilerOptions[] roslynLatestOnlyOptions =
{ {
CompilerOptions.UseRoslynLatest, CompilerOptions.UseRoslynLatest,
CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest,
@ -261,7 +253,7 @@ namespace ICSharpCode.Decompiler.Tests
} }
[Test] [Test]
public async Task SwitchExpressions([ValueSource(nameof(roslynLatestOnlyOptions))] CompilerOptions cscOptions) public async Task SwitchExpressions([ValueSource(nameof(roslyn3OrNewerOptions))] CompilerOptions cscOptions)
{ {
await RunForLibrary(cscOptions: cscOptions); await RunForLibrary(cscOptions: cscOptions);
} }
@ -494,13 +486,13 @@ namespace ICSharpCode.Decompiler.Tests
} }
[Test] [Test]
public async Task NativeInts([ValueSource(nameof(roslynLatestOnlyOptions))] CompilerOptions cscOptions) public async Task NativeInts([ValueSource(nameof(roslyn3OrNewerOptions))] CompilerOptions cscOptions)
{ {
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview); await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview);
} }
[Test] [Test]
public async Task FileScopedNamespaces([ValueSource(nameof(roslynLatestOnlyOptions))] CompilerOptions cscOptions) public async Task FileScopedNamespaces([ValueSource(nameof(roslyn4OrNewerOptions))] CompilerOptions cscOptions)
{ {
await RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings()); await RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings());
} }
@ -512,7 +504,7 @@ namespace ICSharpCode.Decompiler.Tests
} }
[Test] [Test]
public async Task FunctionPointers([ValueSource(nameof(roslynLatestOnlyOptions))] CompilerOptions cscOptions) public async Task FunctionPointers([ValueSource(nameof(roslyn3OrNewerOptions))] CompilerOptions cscOptions)
{ {
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview); await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview);
} }
@ -703,7 +695,7 @@ namespace ICSharpCode.Decompiler.Tests
} }
[Test] [Test]
public async Task StaticAbstractInterfaceMembers([ValueSource(nameof(roslynLatestOnlyOptions))] CompilerOptions cscOptions) public async Task StaticAbstractInterfaceMembers([ValueSource(nameof(roslyn4OrNewerOptions))] CompilerOptions cscOptions)
{ {
await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview); await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview);
} }

Loading…
Cancel
Save