Skip to content

Commit

Permalink
Fix errors in SA1516 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Mar 29, 2015
1 parent 6453d07 commit 766c2ff
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ namespace TestHelper
/// </summary>
public abstract partial class DiagnosticVerifier
{
private static readonly MetadataReference CorlibReference = MetadataReference.CreateFromAssembly(typeof(object).Assembly);
private static readonly MetadataReference SystemReference = MetadataReference.CreateFromAssembly(typeof(System.Diagnostics.Debug).Assembly);
private static readonly MetadataReference CorlibReference = MetadataReference.CreateFromAssembly(typeof(object).Assembly).WithAliases(ImmutableArray.Create("global", "corlib"));
private static readonly MetadataReference SystemReference = MetadataReference.CreateFromAssembly(typeof(System.Diagnostics.Debug).Assembly).WithAliases(ImmutableArray.Create("global", "system"));
private static readonly MetadataReference SystemCoreReference = MetadataReference.CreateFromAssembly(typeof(Enumerable).Assembly);
private static readonly MetadataReference CSharpSymbolsReference = MetadataReference.CreateFromAssembly(typeof(CSharpCompilation).Assembly);
private static readonly MetadataReference CodeAnalysisReference = MetadataReference.CreateFromAssembly(typeof(Compilation).Assembly);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class SA1516UnitTests : CodeFixVerifier
{
private const string DiagnosticId = SA1516ElementsMustBeSeparatedByBlankLine.DiagnosticId;

private const string CorrectCode = @"extern alias Foo1;
private const string CorrectCode = @"extern alias corlib;
using System;
using System.Linq;
Expand Down Expand Up @@ -47,7 +47,7 @@ public string TestProperty4
}
}
public string Foo, Bar;
public string FooValue, BarValue;
public enum TestEnum
{
Expand All @@ -64,7 +64,7 @@ public enum Foobar
namespace Foot
{
extern alias Foo2;
extern alias system;
using System;
Expand Down Expand Up @@ -96,7 +96,7 @@ public async Task TestCorrectSpacing()
[Fact]
public async Task TestWrongSpacing()
{
var testCode = @"extern alias Foo1;
var testCode = @"extern alias corlib;
using System;
using System.Linq;
using a = System.Collections.Generic;
Expand Down Expand Up @@ -124,7 +124,7 @@ public string TestProperty4
Test1 = value;
}
}
public string Foo, Bar;
public string FooValue, BarValue;
public enum TestEnum
{
Value1,
Expand All @@ -138,7 +138,7 @@ public enum Foobar
}
namespace Foot
{
extern alias Foo2;
extern alias system;
using System;
// Foo
class Foo { }
Expand Down Expand Up @@ -203,7 +203,7 @@ namespace Foo
public class Bar
{
public string TestProperty1 { get; set; }
public string Foo()
public void Foo()
{
}
Expand Down Expand Up @@ -235,7 +235,7 @@ public class Bar
{
public string TestProperty1 { get; set; }
public string Foo()
public void Foo()
{
}
Expand Down Expand Up @@ -306,7 +306,7 @@ public async Task TestIndexerAndEvents()
public class Foo
{
public string this[int i]
public string this[string i]
{
get
{
Expand Down Expand Up @@ -342,7 +342,7 @@ public event EventHandler MyEvent
public class Foo
{
public string this[int i]
public string this[string i]
{
get
{
Expand Down

0 comments on commit 766c2ff

Please sign in to comment.