[svn]
r7776: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests:
Heavy.Tests/Runner.n Refact...
phantom
svnadmin at nemerle.org
Tue Aug 28 14:30:58 CEST 2007
Log:
Minor changes, breaking test uploaded.
Author: phantom
Date: Tue Aug 28 14:30:40 2007
New Revision: 7776
Added:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/Document.n
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Heavy.Tests/Runner.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring.Playground.sln
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.Journals.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/TestProjectTwo.nproj
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 Tue Aug 28 14:30:40 2007
@@ -29,10 +29,10 @@
public static RunTheTest() : void
{
- def suite = FindDefinitionTestProjectTwo();
- //def suite = FindUsagesTestProjectTwo();
+ //def suite = FindDefinitionTestProjectTwo();
+ def suite = FindUsagesTestProjectTwo();
suite.SetUp();
- suite.Test043();
+ suite.Test080();
}
public static Explode(this s : string, delimiter : string) : list[string]
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring.Playground.sln
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring.Playground.sln (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring.Playground.sln Tue Aug 28 14:30:40 2007
@@ -9,8 +9,6 @@
EndProject
Project("{EDCC3B85-0BAD-11DB-BC1A-00112FDE8B61}") = "TestProjectTwo", "Refactoring\TestProjectTwo\TestProjectTwo.nproj", "{F4F49957-5B36-48D3-99CA-2A9BFC6D797C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTest", "..\..\..\ConsoleTest\ConsoleTest.csproj", "{D5EB7C03-398D-4C41-91C9-4ED474CC1312}"
-EndProject
Global
GlobalSection(TextTemplating) = postSolution
TextTemplating = 1
@@ -36,10 +34,6 @@
{F4F49957-5B36-48D3-99CA-2A9BFC6D797C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4F49957-5B36-48D3-99CA-2A9BFC6D797C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4F49957-5B36-48D3-99CA-2A9BFC6D797C}.Release|Any CPU.Build.0 = Release|Any CPU
- {D5EB7C03-398D-4C41-91C9-4ED474CC1312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D5EB7C03-398D-4C41-91C9-4ED474CC1312}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D5EB7C03-398D-4C41-91C9-4ED474CC1312}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D5EB7C03-398D-4C41-91C9-4ED474CC1312}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.Journals.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.Journals.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.Journals.n Tue Aug 28 14:30:40 2007
@@ -179,10 +179,10 @@
}
[Accessor]
- quarantine: string = SpringerPath + @"Quarantine\";
+ quarantine: string = @"Quarantine\";
[Accessor]
- suspiciousFolder: string = SpringerPath + @"Quarantine\Suspicious\";
+ suspiciousFolder: string = @"Quarantine\Suspicious\";
public CheckPdfIntegrityAndMakeDownloadList(): void
{
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectOne/DownloadList.n Tue Aug 28 14:30:40 2007
@@ -368,7 +368,7 @@
}
[Accessor]
- indexPath: string = SpringerPath + "Indices";
+ indexPath: string = "Indices";
public GatherIndex(): void
{
Added: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/Document.n
==============================================================================
--- (empty file)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/Document.n Tue Aug 28 14:30:40 2007
@@ -0,0 +1,79 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Xml;
+
+using Nemerle;
+using Nemerle.Collections;
+using Nemerle.Utility;
+using Nemerle.Assertions;
+
+namespace SimpleItemCatalog
+{
+ /// <summary>
+ /// Description of Document.
+ /// </summary>
+ public class Document
+ {
+ _dictionary : Dictionary[string, List[string]] = Dictionary(); // definition {80} _dictionary
+
+ public GetGroups() : array[string]
+ {
+ _dictionary.Keys.ToArray(); // usage {80}
+ }
+
+ public GetItemsByGroup(group : string) : array[string]
+ {
+ _dictionary[group].ToArray(); // usage {80}
+ }
+
+ public AddGroup(group : string, items : array[string]) : void
+ requires !_dictionary.ContainsKey(group) && items != null && items.Length > 0
+ {
+ _dictionary[group] = List(items);
+ }
+
+ public Load(filename : string) : void
+ {
+ def doc = XmlDocument();
+ doc.Load(filename);
+
+ def getItemList(groupNode : XmlNode)
+ {
+ def result = List();
+ foreach(itemNode is XmlNode in groupNode.SelectNodes("Item"))
+ {
+ result.Add(itemNode.InnerText);
+ }
+ result
+ }
+
+
+ def groups = doc.SelectNodes("/Storage/Group");
+ foreach(group is XmlNode in groups)
+ {
+ _dictionary.Add(group.Attributes["Name"].Value, getItemList(group)); // usage {80}
+ }
+ }
+
+ public Save(filename : string) : void
+ {
+ using(def writer = XmlTextWriter(filename, Encoding.UTF8))
+ {
+ writer.WriteStartDocument();
+ writer.WriteStartElement("Storage");
+
+ foreach(key in _dictionary.Keys) // usage {80}
+ {
+ writer.WriteAttributeString("Name", key);
+ writer.WriteStartElement("Group");
+ _dictionary[key].Iter(item => writer.WriteElementString("Item", item));
+ writer.WriteEndElement();
+ }
+
+ writer.WriteEndElement();
+ writer.WriteEndDocument();
+ }
+ }
+ }
+}
\ No newline at end of file
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/TestProjectTwo.nproj
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/TestProjectTwo.nproj (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/Tests/Refactoring/TestProjectTwo/TestProjectTwo.nproj Tue Aug 28 14:30:40 2007
@@ -40,6 +40,9 @@
<Reference Include="$(Nemerle)\Nemerle.Compiler.dll" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="Document.n">
+ <SubType>Code</SubType>
+ </Compile>
<Compile Include="Properties\AssemblyInfo.n" />
<Compile Include="Christianity.n" />
<Compile Include="SmallTestsOne.n">
More information about the svn
mailing list