[svn]
r6602: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests:
Content/Class1.n Tests.n
IT
svnadmin at nemerle.org
Sun Sep 3 00:11:25 CEST 2006
Log:
Unit test for class extension.
Author: IT
Date: Sun Sep 3 00:11:22 2006
New Revision: 6602
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Content/Class1.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Content/Class1.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Content/Class1.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Content/Class1.n Sun Sep 3 00:11:22 2006
@@ -128,3 +128,17 @@
class B : A { }
class C : A { }
class D : C { }
\ No newline at end of file
+
+
+module ClassExtension
+{
+ Boo() : void
+ {
+ def str = "".Foo/*ClassExtension:-1*/();
+ }
+
+ public Foo(this s : string) : int
+ {
+ 0
+ }
+}
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Tests.n Sun Sep 3 00:11:22 2006
@@ -235,6 +235,7 @@
def decl = _project.GetActiveDecl(file, line, col);
CheckType (decl, "Tests.XStruct");
}
+
[Test]
public FindByLocation_using() : void
{
@@ -243,5 +244,24 @@
def decl = _project.GetActiveDecl(file, line, col);
CheckUsing(decl, "System.Console");
}
+
+ [Test]
+ public QuickTip_ClassExtension() : void
+ {
+ def file = FilePath1;
+ def (line, col) = ReadLocation(file, "ClassExtension");
+
+ def Test()
+ {
+ def result = _project.GetQuickTipInfo(file, line, col, GetTextFromFile(file, _, _, _, _));
+
+ Assert.IsNotNull(result, "result is null");
+ WriteLine(result.Text);
+ Assert.AreEqual (result.Text.Split('\n')[0], "public static method ClassExtension.Foo(s : string) : int");
+ }
+
+ Test();
+ Test();
+ }
}
}
More information about the svn
mailing list