Browse Source

improved error msg.

newNRvisualizers
Mike Krüger 15 years ago
parent
commit
f6de4e3c5d
  1. 9
      ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs

9
ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseSelfTests.cs

@ -87,10 +87,13 @@ namespace ICSharpCode.NRefactory.CSharp.Parser @@ -87,10 +87,13 @@ namespace ICSharpCode.NRefactory.CSharp.Parser
Console.WriteLine ("----");
}
void CheckPositionConsistency(AstNode node)
void CheckPositionConsistency (AstNode node)
{
string comment = "(" + node.GetType().Name + " at " + node.StartLocation + " in " + currentFileName + ")";
Assert.IsTrue(node.StartLocation <= node.EndLocation, "StartLocation must be before EndLocation " + comment);
string comment = "(" + node.GetType ().Name + " at " + node.StartLocation + " in " + currentFileName + ")";
var pred = node.StartLocation <= node.EndLocation;
if (!pred)
PrintNode (node);
Assert.IsTrue(pred, "StartLocation must be before EndLocation " + comment);
var prevNodeEnd = node.StartLocation;
var prevNode = node;
for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) {

Loading…
Cancel
Save