diff --git a/src/Libraries/NRefactory/Test/NRefactoryTests.csproj b/src/Libraries/NRefactory/Test/NRefactoryTests.csproj
index 783a5cef96..b14311a383 100644
--- a/src/Libraries/NRefactory/Test/NRefactoryTests.csproj
+++ b/src/Libraries/NRefactory/Test/NRefactoryTests.csproj
@@ -100,6 +100,7 @@
+
diff --git a/src/Libraries/NRefactory/Test/Parser/LocationAssignmentCheckVisitor.cs b/src/Libraries/NRefactory/Test/Parser/LocationAssignmentCheckVisitor.cs
new file mode 100644
index 0000000000..d75d158d15
--- /dev/null
+++ b/src/Libraries/NRefactory/Test/Parser/LocationAssignmentCheckVisitor.cs
@@ -0,0 +1,19 @@
+// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
+// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
+
+using System;
+using ICSharpCode.NRefactory.Ast;
+using ICSharpCode.NRefactory.Visitors;
+using NUnit.Framework;
+
+namespace ICSharpCode.NRefactory.Tests.Ast
+{
+ public class LocationAssignmentCheckVisitor : NodeTrackingAstVisitor
+ {
+ protected override void BeginVisit(INode node)
+ {
+ Assert.IsFalse(node.StartLocation.IsEmpty);
+ Assert.IsFalse(node.EndLocation.IsEmpty);
+ }
+ }
+}
diff --git a/src/Libraries/NRefactory/Test/Parser/ParseUtilCSharp.cs b/src/Libraries/NRefactory/Test/Parser/ParseUtilCSharp.cs
index 9f7a86c1aa..3d43e33e75 100644
--- a/src/Libraries/NRefactory/Test/Parser/ParseUtilCSharp.cs
+++ b/src/Libraries/NRefactory/Test/Parser/ParseUtilCSharp.cs
@@ -40,6 +40,7 @@ namespace ICSharpCode.NRefactory.Tests.Ast
Type type = typeof(T);
Assert.IsTrue(type.IsAssignableFrom(parser.CompilationUnit.Children[0].GetType()), String.Format("Parsed expression was {0} instead of {1} ({2})", parser.CompilationUnit.Children[0].GetType(), type, parser.CompilationUnit.Children[0]));
parser.CompilationUnit.AcceptVisitor(new CheckParentVisitor(), null);
+ parser.CompilationUnit.AcceptVisitor(new LocationAssignmentCheckVisitor(), null);
return (T)parser.CompilationUnit.Children[0];
}
diff --git a/src/Libraries/NRefactory/Test/Parser/ParseUtilVBNet.cs b/src/Libraries/NRefactory/Test/Parser/ParseUtilVBNet.cs
index 51ec1c0b8a..d6e4fa04c6 100644
--- a/src/Libraries/NRefactory/Test/Parser/ParseUtilVBNet.cs
+++ b/src/Libraries/NRefactory/Test/Parser/ParseUtilVBNet.cs
@@ -35,6 +35,7 @@ namespace ICSharpCode.NRefactory.Tests.Ast
Assert.IsTrue(type.IsAssignableFrom(parser.CompilationUnit.Children[0].GetType()), String.Format("Parsed expression was {0} instead of {1} ({2})", parser.CompilationUnit.Children[0].GetType(), type, parser.CompilationUnit.Children[0]));
parser.CompilationUnit.AcceptVisitor(new CheckParentVisitor(), null);
+ parser.CompilationUnit.AcceptVisitor(new LocationAssignmentCheckVisitor(), null);
return (T)parser.CompilationUnit.Children[0];
}