Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@277 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
3 changed files with 39 additions and 1 deletions
@ -0,0 +1,34 @@ |
|||||||
|
// <file>
|
||||||
|
// <copyright see="prj:///doc/copyright.txt">2002-2005 AlphaSierraPapa</copyright>
|
||||||
|
// <license see="prj:///doc/license.txt">GNU General Public License</license>
|
||||||
|
// <owner name="none" email=""/>
|
||||||
|
// <version>$Revision: 230 $</version>
|
||||||
|
// </file>
|
||||||
|
|
||||||
|
using System; |
||||||
|
using System.Drawing; |
||||||
|
using System.IO; |
||||||
|
using NUnit.Framework; |
||||||
|
using ICSharpCode.NRefactory.Parser; |
||||||
|
using ICSharpCode.NRefactory.Parser.CSharp; |
||||||
|
using ICSharpCode.NRefactory.PrettyPrinter; |
||||||
|
|
||||||
|
namespace ICSharpCode.NRefactory.Tests.Lexer.CSharp |
||||||
|
{ |
||||||
|
[TestFixture] |
||||||
|
public class LexerPositionTests |
||||||
|
{ |
||||||
|
ILexer GenerateLexer(string s) |
||||||
|
{ |
||||||
|
return ParserFactory.CreateLexer(SupportedLanguages.CSharp, new StringReader(s)); |
||||||
|
} |
||||||
|
|
||||||
|
[Test] |
||||||
|
public void Test1() |
||||||
|
{ |
||||||
|
ILexer l = GenerateLexer("public"); |
||||||
|
Token t = l.NextToken(); |
||||||
|
Assert.AreEqual(t.Location, new Point(1, 1)); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue