[svn] r6908: vs-plugin/trunk: ConsoleTest/Program.cs Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/...

VladD2 svnadmin at nemerle.org
Thu Nov 16 04:43:58 CET 2006


Log:
1. Change tests. 
2. Add hack.

Author: VladD2
Date: Thu Nov 16 04:43:54 2006
New Revision: 6908

Modified:
   vs-plugin/trunk/ConsoleTest/Program.cs
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.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	Thu Nov 16 04:43:54 2006
@@ -14,6 +14,8 @@
 
 			test.QuickTip_Imperative();
 			test.QuickTip_StackOverflow();
+			test.QuickTip_ArgPattern();
+			test.QuickTip_CtorArg();
 			test.Check_partial_region();
 			test.Check_region_location();
 			test.QuickTip_TupleProp();

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Checker.n	Thu Nov 16 04:43:54 2006
@@ -266,6 +266,8 @@
           break;
 #endif
 
+        //method.ResetBody(); //HACK!!!
+        
         def pExpr = method.BodyParsed;
 
         when (pExpr != null)

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	Thu Nov 16 04:43:54 2006
@@ -137,7 +137,10 @@
         def ast = method.Ast;
 
         if (method.BodyLocation.Contains(line, col))
+        {
+          method.ResetBody(); //HACK!!!
           ExprFinder().Find(method.BodyParsed, method.BodyTyped, line, col);
+        }
         else if (ast.header.Location.Contains(line, col))
         {
           if (ast.header.ret_type.Location.Contains(line, col))
@@ -146,7 +149,7 @@
           {
             def parms = ast.header.parms;
 
-            match (parms.Find((p) => p.ty.Location.Contains(line, col)))
+            match (parms.Find(p => p.ty.Location.Contains(line, col)))
             {
             | Some(p) => checkType(p.ty, method.fun_header.parms.Nth(parms.IndexOf(p)).ty)
             | _       => (Location.Default, null, null)

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.n	Thu Nov 16 04:43:54 2006
@@ -227,6 +227,7 @@
 
       foreach (method when !isIgnore(method) in GetAllMetodsDefinedInFile(fileIndex))
       {
+        method.ResetBody(); //HACK!!!
         method.EnsureCompiled();
         foreach (cm in method.BodyMessages)
           yield cm;

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	Thu Nov 16 04:43:54 2006
@@ -429,15 +429,6 @@
     }
 
     [Test]
-    public QuickTip_StackOverflow() : void
-    {
-      def file        = FilePath1;
-      def (line, col) = ReadLocation(file, "StackOverflow");
-
-      _ = _project.GetQuickTipInfo(file, line, col);
-    }
-
-    [Test]
     public QuickTip_TupleMethod() : void
     {
       def file        = FilePath2;
@@ -464,7 +455,7 @@
     }
 
     [Test]
-    public QuickTip_CtorArg_FIXME() : void
+    public QuickTip_CtorArg() : void
     {
       def file        = FilePath2;
       def (line, col) = ReadLocation(file, "CtorArg");
@@ -480,7 +471,7 @@
     }
 
     [Test]
-    public QuickTip_ArgPattern_FIXME() : void
+    public QuickTip_ArgPattern() : void
     {
       def file        = FilePath2;
       def (line, col) = ReadLocation(file, "ArgPattern");
@@ -492,7 +483,16 @@
       //
       Assert.IsNotNull(result, "result is null");
       WriteLine(result.Text);
-      Assert.AreEqual (result.Text.Split('\n')[0], "internal sealed variant TestVariant2.CValue");
+      Assert.AreEqual (result.Text.Split('\n')[0], "internal sealed variant option TestVariant2.CValue");
+    }
+
+    //[Test]
+    public QuickTip_StackOverflow() : void
+    {
+      def file        = FilePath1;
+      def (line, col) = ReadLocation(file, "StackOverflow");
+
+      _ = _project.GetQuickTipInfo(file, line, col);
     }
 
     [Test]



More information about the svn mailing list