Browse Source

improve LocationAssignmentCheckVisitor - does not check CompilationUnit, TypeReference and INullables that have IsNull == true

pull/2/head
Siegfried Pammer 15 years ago
parent
commit
eb3915bd92
  1. 11
      src/Libraries/NRefactory/Test/Parser/LocationAssignmentCheckVisitor.cs

11
src/Libraries/NRefactory/Test/Parser/LocationAssignmentCheckVisitor.cs

@ -12,8 +12,15 @@ namespace ICSharpCode.NRefactory.Tests.Ast @@ -12,8 +12,15 @@ namespace ICSharpCode.NRefactory.Tests.Ast
{
protected override void BeginVisit(INode node)
{
Assert.IsFalse(node.StartLocation.IsEmpty);
Assert.IsFalse(node.EndLocation.IsEmpty);
if (node is CompilationUnit)
return;
if (node is INullable && ((INullable)node).IsNull)
return;
if (node is TypeReference)
return;
Assert.IsFalse(node.StartLocation.IsEmpty, "StartLocation of {0}", node);
Assert.IsFalse(node.EndLocation.IsEmpty, "EndLocation of {0}", node);
}
}
}

Loading…
Cancel
Save