Skip to content

Commit fc51fff

Browse files
committed
Annotate tests.
1 parent e9e2c4b commit fc51fff

2 files changed

Lines changed: 5 additions & 10 deletions

File tree

PropertyChangedAnalyzers.Test/INPC015PropertyIsRecursive/Valid.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public static void NotifyingProperty()
1616
namespace N
1717
{
1818
using System.ComponentModel;
19-
using System.Runtime.CompilerServices;
2019
2120
public class C : INotifyPropertyChanged
2221
{
@@ -59,9 +58,6 @@ public static void GetSetBackingFieldExpressionBodies()
5958
var code = @"
6059
namespace N
6160
{
62-
using System.ComponentModel;
63-
using System.Runtime.CompilerServices;
64-
6561
public class C
6662
{
6763
private int p;
@@ -110,7 +106,7 @@ public class C1
110106
111107
public class C2 : C1
112108
{
113-
public int P
109+
public override int P
114110
{
115111
get => base.P;
116112
set => base.P = value;
@@ -132,7 +128,7 @@ namespace N
132128
133129
public class C : IReadOnlyList<int>
134130
{
135-
private readonly List<int> ints;
131+
private readonly List<int> ints = new();
136132
137133
public int Count => ints.Count;
138134

PropertyChangedAnalyzers.Test/INPC016NotifyAfterUpdate/Diagnostics.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace PropertyChangedAnalyzers.Test.INPC016NotifyAfterUpdate
1+
namespace PropertyChangedAnalyzers.Test.INPC016NotifyAfterUpdate
22
{
33
using Gu.Roslyn.Asserts;
44
using NUnit.Framework;
@@ -92,7 +92,6 @@ public static void OnPropertyChangedPropertyChangedEventArgsBeforeAssign()
9292
namespace N
9393
{
9494
using System.ComponentModel;
95-
using System.Runtime.CompilerServices;
9695
9796
public class C : INotifyPropertyChanged
9897
{
@@ -173,11 +172,11 @@ namespace N.Client
173172
{
174173
public class C : N.Core.ViewModelBase
175174
{
176-
private string p2;
175+
private string? p2;
177176
178177
public string P1 => $""Hello {this.P2}"";
179178
180-
public string P2
179+
public string? P2
181180
{
182181
get { return this.p2; }
183182
set

0 commit comments

Comments
 (0)