[svn] r6555: vs-plugin/trunk: ConsoleTest ConsoleTest/Program.cs
Nemerle.Compiler.Utils/Nemerle.Completion...
VladD2
svnadmin at nemerle.org
Sat Aug 19 03:37:42 CEST 2006
Log:
Sync with compiler. Add test.
Author: VladD2
Date: Sat Aug 19 03:37:30 2006
New Revision: 6555
Removed:
vs-plugin/trunk/RSDN.Nemerle.Utils.sln
Modified:
vs-plugin/trunk/ConsoleTest/ (props changed)
vs-plugin/trunk/ConsoleTest/Program.cs
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
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/ConsoleTest/Program.cs
==============================================================================
--- vs-plugin/trunk/ConsoleTest/Program.cs (original)
+++ vs-plugin/trunk/ConsoleTest/Program.cs Sat Aug 19 03:37:30 2006
@@ -12,7 +12,8 @@
Test1 test = new Test1();
test.Init();
- test.Complete_Complete_aliased_type();
+ test.Complete_type_escalation();
+ test.Complete_qualidend();
test.Complete_GlabalNs_in_NestedNs();
test.FindByLocation_Ns1_Ns2_Ns3_ClassInNestenNs();
test.FindByLocation_Method_Class2_Method();
@@ -23,6 +24,7 @@
test.FindByLocation_Method_Main_2();
test.FindByLocation_Type_XStruct();
test.FindByLocation_using();
+ test.Complete_Complete_aliased_type();
}
}
}
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n Sat Aug 19 03:37:30 2006
@@ -20,9 +20,8 @@
def add(name, value)
{
- def overloads = overloadsMap.GetValueOrDefault(name, () => SCG.List());
+ def overloads = overloadsMap.GetValue(name, () => SCG.List());
overloads.Add(value);
- overloadsMap[name] = overloads;
}
foreach (elem in result.Elems)
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n Sat Aug 19 03:37:30 2006
@@ -27,7 +27,7 @@
{
| method is MethodBuilder =>
// Adjust the body location...
- def loc = method.Body.Location;
+ def loc = method.BodyLocation;
// IT: ÷ňî ĺńëč čńďîëüçóĺňń˙ âŕđčŕíň ńčíňŕęńčńŕ áĺç ńęîáîę?
//
def colStart = loc.Column + 1; // exclude open brace
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 Sat Aug 19 03:37:30 2006
@@ -1,5 +1,6 @@
using /*using*/System.Console;
//using System;
+using SYZ = System.Collections.Generic;
namespace Ns1
{
@@ -13,6 +14,13 @@
{
Sy/*Complete glabal ns:-0*/;
sb/*Complete aliased type:-0*/;
+ //System.Consol;
+ System.Runtime.Co/*Complete qualidend:-0*/
+ }
+
+ public Method2() : void
+ {
+ def x : T/*Complete type escalation:-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 Sat Aug 19 03:37:30 2006
@@ -14,6 +14,26 @@
public partial class Test1
{
[Test]
+ public Complete_type_escalation() : void
+ {
+ def file = FilePath1;
+ def (line, col) = ReadLocation(file, "Complete type escalation");
+ def result = _project.CompleteWord(file, line, col, GetTextFromFile(file, _, _, _, _));
+ Assert.IsNotNull(result, "result is null");
+ Assert.AreEqual(2, result.Length, "Expected 1 elements.");
+ }
+
+ [Test]
+ public Complete_qualidend() : void
+ {
+ def file = FilePath1;
+ def (line, col) = ReadLocation(file, "Complete qualidend");
+ def result = _project.CompleteWord(file, line, col, GetTextFromFile(file, _, _, _, _));
+ Assert.IsNotNull(result, "result is null");
+ Assert.AreEqual(2, result.Length, "Expected 1 elements.");
+ }
+
+ [Test]
public CompleteIn_NestedUsing() : void
{
def file = FilePath2;
More information about the svn
mailing list