[svn] r7438: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests: Heavy.Tests/Runner.n Refact...

phantom svnadmin at nemerle.org
Fri Feb 16 06:23:11 CET 2007


Log:
Tests addendum.

Author: phantom
Date: Fri Feb 16 06:23:08 2007
New Revision: 7438

Modified:
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Heavy.Tests/Runner.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/ConsoleMenuRotator.n
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/SmallTestsOne.n

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Heavy.Tests/Runner.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Heavy.Tests/Runner.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Heavy.Tests/Runner.n	Fri Feb 16 06:23:08 2007
@@ -31,7 +31,7 @@
     {
       def suite = FindDefinitionTestProjectTwo();
       suite.SetUp();
-      suite.Test036();
+      suite.Test038();
     }
 
     public static Explode(this s : string, delimiter : string) : list[string]
@@ -298,7 +298,6 @@
         // TODO: find multiple declarations (partial classes)
         mutable shouldFindRing = MakeUsage(line, declaration, name, starter) ::
           ScanSources(checkPhrase, testCase).Map((line, _, location, _) => MakeUsage(line, location, name, checkPhrase));
-        Write($"\n Should find $(shouldFindRing.Length) $findings... ");
         def foundMultiple =
           shouldFindRing.Map(goto =>
           {
@@ -325,9 +324,10 @@
             Assert.IsTrue(coincide, warning);
           ring
         });
-        Write($"found $(found.Length) $findings, checking for correspondance... ");
         unless (alsoUsages)
           shouldFindRing = shouldFindRing.Filter(usage => usage.UsageType == UsageType.Definition);
+        Write($"\n Should find $(shouldFindRing.Length) $findings... ");
+        Write($"found $(found.Length) $findings, checking for correspondance... ");
         def success = FoundUsagesAreRight(testCase, shouldFindRing, found); // put breakpoint here to see what usages are actually found
         def message = if (success) "ok" else "incorrect!.. saving changes...";
         WriteLine(message);

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/ConsoleMenuRotator.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/ConsoleMenuRotator.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/ConsoleMenuRotator.n	Fri Feb 16 06:23:08 2007
@@ -47,14 +47,14 @@
 				Write($"Your choice [automatic launch '$Auto' in $AutoInterval s]: ");
 				def pressed = { // definition {1} pressed
 					mutable acquired = false; // definition {2} acquired
-					mutable elapsed = 0;  // definition {3} elapsed //possibly not found definition {3}
+					mutable elapsed = 0;  // definition {3} elapsed
 					def check = 100;  // definition {4} check
 					do {
 						Thread.Sleep(check);  // usage {4}
-						elapsed += check; // usage {3} // usage {4} //possibly not found usage {3}
+						elapsed += check; // usage {3} // usage {4}
 						when (KeyAvailable)
 							acquired = true;  // usage {2}
-					} while (!acquired && elapsed < AutoInterval * 1000); // usage {2} // usage {3} //possibly not found usage {3}
+					} while (!acquired && elapsed < AutoInterval * 1000); // usage {2} // usage {3}
 					if (acquired) // usage {2}
 						ReadKey()
 					else

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/SmallTestsOne.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/SmallTestsOne.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/SmallTestsOne.n	Fri Feb 16 06:23:08 2007
@@ -37,5 +37,21 @@
 				foo += 100; // usage {36}
 			} while (foo < 1000); // usage {36}
     }
+
+    public InsideMatch(): void
+    {
+      unless (false)
+      {
+        def choice = 1; // definition {37} choice
+        match (choice) // usage {37}
+        {
+          | 1 =>
+            def was = 13 + choice; // definition {38} was // usage {37}
+            def bar = 1 - was; // definition {39} // usage {38}
+            _ = bar; // usage {39}
+          | _ => ()
+        }
+      }
+    }
   }
 }
\ No newline at end of file



More information about the svn mailing list