Author: gedmurphy
Date: Fri Nov 27 15:25:31 2009
New Revision: 44292
URL:
http://svn.reactos.org/svn/reactos?rev=44292&view=rev
Log:
Convert MsgTrans to a VS2010 project and add a regression test library using the built in
MS test framework.
I've been using this to play with the new IntelliTrace (Historical Debugging) feature,
which is unquestionably the best tool MS has ever produced. I take my hat off to VS2010
... stunning! (
http://blogs.msdn.com/habibh/default.aspx)
Added:
trunk/tools/Message Translator/Local.testsettings
trunk/tools/Message Translator/Msg Translator.vsmdi
trunk/tools/Message Translator/MsgTrans.Library.Tests/ (with props)
trunk/tools/Message Translator/MsgTrans.Library.Tests/MsgTrans.Library.Tests.csproj
trunk/tools/Message Translator/MsgTrans.Library.Tests/MsgTrans.Library.cs
trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/ (with props)
trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/AssemblyInfo.cs
trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/Settings.Designer.cs
trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/Settings.settings
trunk/tools/Message Translator/MsgTrans.Library.Tests/app.config
trunk/tools/Message Translator/TraceAndTestImpact.testsettings
Modified:
trunk/tools/Message Translator/GUI/GUI.csproj
trunk/tools/Message Translator/GUI/Properties/Resources.Designer.cs
trunk/tools/Message Translator/GUI/Properties/Settings.Designer.cs
trunk/tools/Message Translator/Msg Translator.sln
trunk/tools/Message Translator/MsgTrans.Library/MsgTrans.Library.csproj
Modified: trunk/tools/Message Translator/GUI/GUI.csproj
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/GUI/GUI…
==============================================================================
--- trunk/tools/Message Translator/GUI/GUI.csproj [iso-8859-1] (original)
+++ trunk/tools/Message Translator/GUI/GUI.csproj [iso-8859-1] Fri Nov 27 15:25:31 2009
@@ -1,4 +1,5 @@
-<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == ''
">AnyCPU</Platform>
@@ -11,10 +12,26 @@
<AssemblyName>MsgTranslator</AssemblyName>
<FileUpgradeFlags>
</FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
+ <OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<ApplicationIcon>icon.ico</ApplicationIcon>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -24,6 +41,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -32,6 +50,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
@@ -100,6 +119,23 @@
<Name>MsgTrans.Library</Name>
</ProjectReference>
</ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and
uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Modified: trunk/tools/Message Translator/GUI/Properties/Resources.Designer.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/GUI/Pro…
==============================================================================
--- trunk/tools/Message Translator/GUI/Properties/Resources.Designer.cs [iso-8859-1]
(original)
+++ trunk/tools/Message Translator/GUI/Properties/Resources.Designer.cs [iso-8859-1] Fri
Nov 27 15:25:31 2009
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.1434
+// Runtime Version:4.0.21006.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -19,7 +19,7 @@
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder",
"2.0.0.0")]
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder",
"4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
Modified: trunk/tools/Message Translator/GUI/Properties/Settings.Designer.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/GUI/Pro…
==============================================================================
--- trunk/tools/Message Translator/GUI/Properties/Settings.Designer.cs [iso-8859-1]
(original)
+++ trunk/tools/Message Translator/GUI/Properties/Settings.Designer.cs [iso-8859-1] Fri
Nov 27 15:25:31 2009
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.1434
+// Runtime Version:4.0.21006.1
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -12,7 +12,7 @@
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator",
"9.0.0.0")]
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator",
"10.0.0.0")]
internal sealed partial class Settings :
global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance =
((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new
Settings())));
Added: trunk/tools/Message Translator/Local.testsettings
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/Local.t…
==============================================================================
--- trunk/tools/Message Translator/Local.testsettings (added)
+++ trunk/tools/Message Translator/Local.testsettings [iso-8859-1] Fri Nov 27 15:25:31
2009
@@ -1,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestSettings name="Local"
id="5c57a75a-e7a5-43fe-9db9-239f927aec27"
xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"&g…
+ <Description>These are default test settings for a local test
run.</Description>
+ <Deployment enabled="false" />
+ <Execution>
+ <TestTypeSpecific />
+ <AgentRule name="Execution Agents">
+ </AgentRule>
+ </Execution>
+</TestSettings>
Modified: trunk/tools/Message Translator/Msg Translator.sln
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/Msg%20T…
==============================================================================
--- trunk/tools/Message Translator/Msg Translator.sln [iso-8859-1] (original)
+++ trunk/tools/Message Translator/Msg Translator.sln [iso-8859-1] Fri Nov 27 15:25:31
2009
@@ -1,11 +1,23 @@

-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GUI",
"GUI\GUI.csproj", "{07FF2C30-8A6C-4894-9E8D-EAF56CCA73BE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") =
"MsgTrans.Library", "MsgTrans.Library\MsgTrans.Library.csproj",
"{1114F34D-F388-4F38-AE27-C0EE1B10B777}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") =
"MsgTrans.Library.Tests",
"MsgTrans.Library.Tests\MsgTrans.Library.Tests.csproj",
"{EC95AD2F-53FE-4DA5-B108-39059D053C2B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items",
"Solution Items", "{A73E22F9-5A22-467E-BFAD-6BAC3AA07C90}"
+ ProjectSection(SolutionItems) = preProject
+ Local.testsettings = Local.testsettings
+ Msg Translator.vsmdi = Msg Translator.vsmdi
+ TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
+ EndProjectSection
+EndProject
Global
+ GlobalSection(TestCaseManagementSettings) = postSolution
+ CategoryFile = Msg Translator.vsmdi
+ EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
@@ -19,6 +31,10 @@
{1114F34D-F388-4F38-AE27-C0EE1B10B777}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1114F34D-F388-4F38-AE27-C0EE1B10B777}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1114F34D-F388-4F38-AE27-C0EE1B10B777}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EC95AD2F-53FE-4DA5-B108-39059D053C2B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EC95AD2F-53FE-4DA5-B108-39059D053C2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EC95AD2F-53FE-4DA5-B108-39059D053C2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EC95AD2F-53FE-4DA5-B108-39059D053C2B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Added: trunk/tools/Message Translator/Msg Translator.vsmdi
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/Msg%20T…
==============================================================================
--- trunk/tools/Message Translator/Msg Translator.vsmdi (added)
+++ trunk/tools/Message Translator/Msg Translator.vsmdi [iso-8859-1] Fri Nov 27 15:25:31
2009
@@ -1,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestLists
xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"&g…
+ <TestList name="My Tests"
id="60219de4-2a84-4d5b-9b48-b2b0b8bb91a8"
parentListId="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
+ <TestLinks>
+ <TestLink id="6a1f5fc1-46d3-e752-18fd-4e80263ef4bf"
name="TestWindowsMsg"
storage="msgtrans.library.tests\bin\debug\msgtrans.library.tests.dll"
type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,
PublicKeyToken=b03f5f7f11d50a3a" />
+ <TestLink id="dd321a60-068b-fc1c-28cc-3f93983808bb"
name="TestHResultMsg"
storage="msgtrans.library.tests\bin\debug\msgtrans.library.tests.dll"
type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,
PublicKeyToken=b03f5f7f11d50a3a" />
+ <TestLink id="8a210d86-ffdd-f773-631c-add0d10a6af8"
name="TestBugCheckMsg"
storage="msgtrans.library.tests\bin\debug\msgtrans.library.tests.dll"
type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,
PublicKeyToken=b03f5f7f11d50a3a" />
+ <TestLink id="b947fc08-04e4-4cc0-fa4c-8e46b6238238"
name="TestGetErrorMsg"
storage="msgtrans.library.tests\bin\debug\msgtrans.library.tests.dll"
type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,
PublicKeyToken=b03f5f7f11d50a3a" />
+ <TestLink id="9a56d670-d9ba-4b34-ba14-158d31372838"
name="TestNtStatusMsg"
storage="msgtrans.library.tests\bin\debug\msgtrans.library.tests.dll"
type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,
PublicKeyToken=b03f5f7f11d50a3a" />
+ <TestLink id="02dcd60e-2fbb-134f-8be8-492053b1bca4"
name="TestBugUrlMsg"
storage="msgtrans.library.tests\bin\debug\msgtrans.library.tests.dll"
type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel,
PublicKeyToken=b03f5f7f11d50a3a" />
+ </TestLinks>
+ </TestList>
+ <TestList name="Lists of Tests"
id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
+ <RunConfiguration id="09a9b354-bc78-4540-949e-366f06e1ad6a"
name="Trace and Test Impact" storage="traceandtestimpact.testsettings"
type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration,
Microsoft.VisualStudio.QualityTools.Common, PublicKeyToken=b03f5f7f11d50a3a" />
+ </TestList>
+</TestLists>
Propchange: trunk/tools/Message Translator/MsgTrans.Library.Tests/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Fri Nov 27 15:25:31 2009
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/tools/Message Translator/MsgTrans.Library.Tests/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/tools/Message Translator/MsgTrans.Library.Tests/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/tools/Message
Translator/MsgTrans.Library.Tests/MsgTrans.Library.Tests.csproj
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/MsgTran…
==============================================================================
--- trunk/tools/Message Translator/MsgTrans.Library.Tests/MsgTrans.Library.Tests.csproj
(added)
+++ trunk/tools/Message Translator/MsgTrans.Library.Tests/MsgTrans.Library.Tests.csproj
[iso-8859-1] Fri Nov 27 15:25:31 2009
@@ -1,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == ''
">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{EC95AD2F-53FE-4DA5-B108-39059D053C2B}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>MsgTrans.Library.Tests</RootNamespace>
+ <AssemblyName>MsgTrans.Library.Tests</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework,
Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a,
processorArchitecture=MSIL" />
+ <Reference Include="System" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="MsgTrans.Library.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Properties\Settings.Designer.cs">
+ <AutoGen>True</AutoGen>
+ <DesignTimeSharedInput>True</DesignTimeSharedInput>
+ <DependentUpon>Settings.settings</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference
Include="..\MsgTrans.Library\MsgTrans.Library.csproj">
+ <Project>{1114F34D-F388-4F38-AE27-C0EE1B10B777}</Project>
+ <Name>MsgTrans.Library</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="app.config" />
+ <None Include="Properties\Settings.settings">
+ <Generator>SettingsSingleFileGenerator</Generator>
+ <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+ </None>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and
uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
Added: trunk/tools/Message Translator/MsgTrans.Library.Tests/MsgTrans.Library.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/MsgTran…
==============================================================================
--- trunk/tools/Message Translator/MsgTrans.Library.Tests/MsgTrans.Library.cs (added)
+++ trunk/tools/Message Translator/MsgTrans.Library.Tests/MsgTrans.Library.cs [iso-8859-1]
Fri Nov 27 15:25:31 2009
@@ -1,0 +1,165 @@
+using System;
+using System.Text;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using MsgTrans.Library;
+
+namespace MsgTrans.Library.Tests
+{
+ [TestClass]
+ public class MsgTrans
+ {
+ private MessageTranslator msgTran;
+
+
+ public MsgTrans()
+ {
+ msgTran = new MessageTranslator(new MessageOutput(),
+ Properties.Settings.Default.NtStatusXml,
+ Properties.Settings.Default.WinerrorXml,
+ Properties.Settings.Default.HresultXml,
+ Properties.Settings.Default.BugcheckXml,
+ Properties.Settings.Default.WmXml,
+ Properties.Settings.Default.BugUrl);
+ Assert.IsNotNull(msgTran);
+ }
+
+ [TestMethod]
+ public void TestGetErrorMsg()
+ {
+ int ErrNum = 18;
+ string message = "error " + ErrNum.ToString();
+ Assert.IsTrue(msgTran.ParseCommandMessage(null, message));
+
+ Command cmd = msgTran.Messages[0];
+ Assert.IsTrue(cmd.MsgType == MessageType.WinError);
+
+ Assert.AreEqual(cmd.MsgType.ToString(), "WinError");
+ Assert.AreEqual(cmd.Number, ErrNum);
+ Assert.AreEqual(cmd.Hex, ErrNum.ToString("X"));
+ Assert.AreEqual(cmd.Code, "ERROR_NO_MORE_FILES");
+ string ErrMessage = new
System.ComponentModel.Win32Exception(ErrNum).Message;
+ Assert.AreEqual(cmd.Message, ErrMessage);
+ }
+
+ [TestMethod]
+ public void TestNtStatusMsg()
+ {
+ string ErrNum = "C0000005";
+ string message = "error " + ErrNum;
+ Assert.IsTrue(msgTran.ParseCommandMessage(null, message));
+
+ Command cmd = null;
+ foreach (Command c in msgTran.Messages)
+ {
+ if (c.MsgType == MessageType.NTSTATUS)
+ cmd = c;
+ }
+ Assert.IsNotNull(cmd);
+ Assert.IsTrue(cmd.MsgType == MessageType.NTSTATUS);
+ Assert.AreEqual(cmd.MsgType.ToString(), "NTSTATUS");
+ long num = long.Parse(ErrNum, System.Globalization.NumberStyles.HexNumber);
+ Assert.AreEqual(cmd.Number, num);
+ Assert.AreEqual(cmd.Hex, ErrNum);
+ Assert.AreEqual(cmd.Code, "STATUS_ACCESS_VIOLATION");
+ }
+
+ [TestMethod]
+ public void TestHResultMsg()
+ {
+ string ErrNum = "80000003";
+ string message = "error " + ErrNum;
+ Assert.IsTrue(msgTran.ParseCommandMessage(null, message));
+
+ Command cmd = null;
+ foreach (Command c in msgTran.Messages)
+ {
+ if (c.MsgType == MessageType.HRESULT)
+ cmd = c;
+ }
+ Assert.IsNotNull(cmd);
+ Assert.IsTrue(cmd.MsgType == MessageType.HRESULT);
+ Assert.AreEqual(cmd.MsgType.ToString(), "HRESULT");
+ long num = long.Parse(ErrNum, System.Globalization.NumberStyles.HexNumber);
+ Assert.AreEqual(cmd.Number, num);
+ Assert.AreEqual(cmd.Hex, ErrNum);
+ Assert.AreEqual(cmd.Code, "E_INVALIDARG");
+ }
+
+ [TestMethod]
+ public void TestBugCheckMsg()
+ {
+ string ErrNum = "A";
+ string message = "error " + ErrNum;
+ Assert.IsTrue(msgTran.ParseCommandMessage(null, message));
+
+ Command cmd = null;
+ foreach (Command c in msgTran.Messages)
+ {
+ if (c.MsgType == MessageType.BugCheck)
+ cmd = c;
+ }
+ Assert.IsNotNull(cmd);
+ Assert.IsTrue(cmd.MsgType == MessageType.BugCheck);
+ Assert.AreEqual(cmd.MsgType.ToString(), "BugCheck");
+ long num = long.Parse(ErrNum, System.Globalization.NumberStyles.HexNumber);
+ Assert.AreEqual(cmd.Number, num);
+ Assert.AreEqual(cmd.Hex, ErrNum);
+ Assert.AreEqual(cmd.Code, "IRQL_NOT_LESS_OR_EQUAL");
+ }
+
+ [TestMethod]
+ public void TestWindowsMsg()
+ {
+ int WmNum = 16;
+ string message = "wm " + WmNum.ToString();
+ Assert.IsTrue(msgTran.ParseCommandMessage(null, message));
+
+ Command cmd = null;
+ foreach (Command c in msgTran.Messages)
+ {
+ if (c.MsgType == MessageType.WinMsg)
+ cmd = c;
+ }
+ Assert.IsNotNull(cmd);
+ Assert.IsTrue(cmd.MsgType == MessageType.WinMsg);
+
+ Assert.AreEqual(cmd.MsgType.ToString(), "WinMsg");
+ Assert.AreEqual(cmd.Number, WmNum);
+ Assert.AreEqual(cmd.Hex, WmNum.ToString("X"));
+ Assert.AreEqual(cmd.Code, "WM_CLOSE");
+ }
+
+ [TestMethod]
+ public void TestBugUrlMsg()
+ {
+ int BugNum = 256;
+ string message = "bug " + BugNum.ToString();
+ Assert.IsTrue(msgTran.ParseCommandMessage(null, message));
+
+ Command cmd = null;
+ foreach (Command c in msgTran.Messages)
+ {
+ if (c.MsgType == MessageType.BugUrl)
+ cmd = c;
+ }
+ Assert.IsNotNull(cmd);
+ Assert.IsTrue(cmd.MsgType == MessageType.BugUrl);
+ Assert.AreEqual(cmd.Number, BugNum);
+ Assert.AreEqual(cmd.Hex, BugNum.ToString("X"));
+ string url = String.Format(Properties.Settings.Default.BugUrl,
BugNum.ToString());
+ Assert.AreEqual(cmd.Code, url);
+
+ }
+ }
+
+ public class MessageOutput : IMsgOutput
+ {
+ public void MsgOut(MessageContext context,
+ string message)
+ {
+ Console.WriteLine(message);
+ }
+ }
+}
Propchange: trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Fri Nov 27 15:25:31 2009
@@ -1,0 +1,2 @@
+([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))?
+(\d+)
Propchange: trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/
------------------------------------------------------------------------------
bugtraq:message = See issue #%BUGID% for more details.
Propchange: trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/
------------------------------------------------------------------------------
bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Added: trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/AssemblyInfo.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/MsgTran…
==============================================================================
--- trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/AssemblyInfo.cs
(added)
+++ trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/AssemblyInfo.cs
[iso-8859-1] Fri Nov 27 15:25:31 2009
@@ -1,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MsgTrans.Library.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MsgTrans.Library.Tests")]
+[assembly: AssemblyCopyright("Copyright © 2009")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM componenets. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("622ff099-e375-44ca-97eb-4003f560f7a5")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Added: trunk/tools/Message
Translator/MsgTrans.Library.Tests/Properties/Settings.Designer.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/MsgTran…
==============================================================================
--- trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/Settings.Designer.cs
(added)
+++ trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/Settings.Designer.cs
[iso-8859-1] Fri Nov 27 15:25:31 2009
@@ -1,0 +1,98 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.21006.1
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace MsgTrans.Library.Tests.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator",
"10.0.0.0")]
+ internal sealed partial class Settings :
global::System.Configuration.ApplicationSettingsBase {
+
+ private static Settings defaultInstance =
((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new
Settings())));
+
+ public static Settings Default {
+ get {
+ return defaultInstance;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+
[global::System.Configuration.DefaultSettingValueAttribute("..\\..\\..\\GUI\\Resources\\ntstatus.xml")]
+ public string NtStatusXml {
+ get {
+ return ((string)(this["NtStatusXml"]));
+ }
+ set {
+ this["NtStatusXml"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+
[global::System.Configuration.DefaultSettingValueAttribute("..\\..\\..\\GUI\\Resources\\winerror.xml")]
+ public string WinerrorXml {
+ get {
+ return ((string)(this["WinerrorXml"]));
+ }
+ set {
+ this["WinerrorXml"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+
[global::System.Configuration.DefaultSettingValueAttribute("..\\..\\..\\GUI\\Resources\\hresult.xml")]
+ public string HresultXml {
+ get {
+ return ((string)(this["HresultXml"]));
+ }
+ set {
+ this["HresultXml"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+
[global::System.Configuration.DefaultSettingValueAttribute("..\\..\\..\\GUI\\Resources\\bugcheck.xml")]
+ public string BugcheckXml {
+ get {
+ return ((string)(this["BugcheckXml"]));
+ }
+ set {
+ this["BugcheckXml"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+
[global::System.Configuration.DefaultSettingValueAttribute("..\\..\\..\\GUI\\Resources\\wm.xml")]
+ public string WmXml {
+ get {
+ return ((string)(this["WmXml"]));
+ }
+ set {
+ this["WmXml"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+
[
global::System.Configuration.DefaultSettingValueAttribute("http://www.…]
+ public string BugUrl {
+ get {
+ return ((string)(this["BugUrl"]));
+ }
+ set {
+ this["BugUrl"] = value;
+ }
+ }
+ }
+}
Added: trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/Settings.settings
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/MsgTran…
==============================================================================
--- trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/Settings.settings
(added)
+++ trunk/tools/Message Translator/MsgTrans.Library.Tests/Properties/Settings.settings
[iso-8859-1] Fri Nov 27 15:25:31 2009
@@ -1,0 +1,24 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile
xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings"
CurrentProfile="(Default)"
GeneratedClassNamespace="MsgTrans.Library.Tests.Properties"
GeneratedClassName="Settings">
+ <Profiles />
+ <Settings>
+ <Setting Name="NtStatusXml" Type="System.String"
Scope="User">
+ <Value
Profile="(Default)">..\..\..\GUI\Resources\ntstatus.xml</Value>
+ </Setting>
+ <Setting Name="WinerrorXml" Type="System.String"
Scope="User">
+ <Value
Profile="(Default)">..\..\..\GUI\Resources\winerror.xml</Value>
+ </Setting>
+ <Setting Name="HresultXml" Type="System.String"
Scope="User">
+ <Value
Profile="(Default)">..\..\..\GUI\Resources\hresult.xml</Value>
+ </Setting>
+ <Setting Name="BugcheckXml" Type="System.String"
Scope="User">
+ <Value
Profile="(Default)">..\..\..\GUI\Resources\bugcheck.xml</Value>
+ </Setting>
+ <Setting Name="WmXml" Type="System.String"
Scope="User">
+ <Value
Profile="(Default)">..\..\..\GUI\Resources\wm.xml</Value>
+ </Setting>
+ <Setting Name="BugUrl" Type="System.String"
Scope="User">
+ <Value
Profile="(Default)">http://www.reactos.org/bugzilla/show_bug.c…
+ </Setting>
+ </Settings>
+</SettingsFile>
Added: trunk/tools/Message Translator/MsgTrans.Library.Tests/app.config
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/MsgTran…
==============================================================================
--- trunk/tools/Message Translator/MsgTrans.Library.Tests/app.config (added)
+++ trunk/tools/Message Translator/MsgTrans.Library.Tests/app.config [iso-8859-1] Fri Nov
27 15:25:31 2009
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <sectionGroup name="userSettings"
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+ <section name="MsgTrans.Library.Tests.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false"
/>
+ </sectionGroup>
+ </configSections>
+ <userSettings>
+ <MsgTrans.Library.Tests.Properties.Settings>
+ <setting name="NtStatusXml" serializeAs="String">
+ <value>..\..\..\GUI\Resources\ntstatus.xml</value>
+ </setting>
+ <setting name="WinerrorXml" serializeAs="String">
+ <value>..\..\..\GUI\Resources\winerror.xml</value>
+ </setting>
+ <setting name="HresultXml" serializeAs="String">
+ <value>..\..\..\GUI\Resources\hresult.xml</value>
+ </setting>
+ <setting name="BugcheckXml" serializeAs="String">
+ <value>..\..\..\GUI\Resources\bugcheck.xml</value>
+ </setting>
+ <setting name="WmXml" serializeAs="String">
+ <value>..\..\..\GUI\Resources\wm.xml</value>
+ </setting>
+ <setting name="BugUrl" serializeAs="String">
+
<value>http://www.reactos.org/bugzilla/show_bug.cgi?id={0}</value>
+ </setting>
+ </MsgTrans.Library.Tests.Properties.Settings>
+ </userSettings>
+</configuration>
Modified: trunk/tools/Message Translator/MsgTrans.Library/MsgTrans.Library.csproj
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/MsgTran…
==============================================================================
--- trunk/tools/Message Translator/MsgTrans.Library/MsgTrans.Library.csproj [iso-8859-1]
(original)
+++ trunk/tools/Message Translator/MsgTrans.Library/MsgTrans.Library.csproj [iso-8859-1]
Fri Nov 27 15:25:31 2009
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="3.5">
+<Project DefaultTargets="Build"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == ''
">AnyCPU</Platform>
@@ -14,9 +14,25 @@
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
+ <OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
+ <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -26,6 +42,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -34,6 +51,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and
uncomment it.
@@ -65,4 +83,21 @@
<Reference Include="System.Data" />
<Reference Include="System.XML" />
</ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5 SP1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
</Project>
Added: trunk/tools/Message Translator/TraceAndTestImpact.testsettings
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/Message%20Translator/TraceAn…
==============================================================================
--- trunk/tools/Message Translator/TraceAndTestImpact.testsettings (added)
+++ trunk/tools/Message Translator/TraceAndTestImpact.testsettings [iso-8859-1] Fri Nov 27
15:25:31 2009
@@ -1,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<TestSettings name="Trace and Test Impact"
id="09a9b354-bc78-4540-949e-366f06e1ad6a"
xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"&g…
+ <Description>These are test settings for Trace and Test
Impact.</Description>
+ <Execution>
+ <TestTypeSpecific />
+ <AgentRule name="Execution Agents">
+ <DataCollectors>
+ <DataCollector uri="datacollector://microsoft/SystemInfo/1.0"
assemblyQualifiedName="Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo.SystemInfoDataCollector,
Microsoft.VisualStudio.TestTools.DataCollection.SystemInfo, Version=10.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" friendlyName="System
Information">
+ <Configuration useAgentDefault="true" />
+ </DataCollector>
+ <DataCollector uri="datacollector://microsoft/ActionLog/1.0"
assemblyQualifiedName="Microsoft.VisualStudio.TestTools.ManualTest.ActionLog.ActionLogPlugin,
Microsoft.VisualStudio.TestTools.ManualTest.ActionLog, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Action Recording and Action
Log">
+ <Configuration useAgentDefault="true" />
+ </DataCollector>
+ <DataCollector uri="datacollector://microsoft/HttpProxy/1.0"
assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.HttpProxyCollector,
Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
friendlyName="ASP.NET Client Proxy for
IntelliTrace and Test Impact">
+ <Configuration useAgentDefault="true" />
+ </DataCollector>
+ <DataCollector uri="datacollector://microsoft/TestImpact/1.0"
assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TestImpactDataCollector,
Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" friendlyName="Test Impact">
+ <Configuration useAgentDefault="true" />
+ </DataCollector>
+ <DataCollector uri="datacollector://microsoft/TraceDebugger/1.0"
assemblyQualifiedName="Microsoft.VisualStudio.TraceCollector.TraceDebuggerDataCollector,
Microsoft.VisualStudio.TraceCollector, Version=10.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" friendlyName="IntelliTrace">
+ <Configuration useAgentDefault="true" />
+ </DataCollector>
+ </DataCollectors>
+ </AgentRule>
+ </Execution>
+</TestSettings>