diff --git a/GoogleTestAdapter/Common.Dynamic.GTA/Common.Dynamic.GTA.csproj b/GoogleTestAdapter/Common.Dynamic.GTA/Common.Dynamic.GTA.csproj index 204ad62c5..c6bb845f2 100644 --- a/GoogleTestAdapter/Common.Dynamic.GTA/Common.Dynamic.GTA.csproj +++ b/GoogleTestAdapter/Common.Dynamic.GTA/Common.Dynamic.GTA.csproj @@ -2,7 +2,7 @@ - + Debug AnyCPU @@ -40,7 +40,11 @@ - + + Resources.resx + True + True + @@ -51,8 +55,15 @@ Common + + + PublicResXFileCodeGenerator + Resources.Designer.cs + Designer + + - + if exist "$(SolutionDir)Keys\Key_Release.snk" ( echo Using Release key for signing assembly diff --git a/GoogleTestAdapter/Common.Dynamic.GTA/Resources.Designer.cs b/GoogleTestAdapter/Common.Dynamic.GTA/Resources.Designer.cs new file mode 100644 index 000000000..40459c2fd --- /dev/null +++ b/GoogleTestAdapter/Common.Dynamic.GTA/Resources.Designer.cs @@ -0,0 +1,136 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GoogleTestAdapter.Common { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GoogleTestAdapter.Common.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Solution test settings file could not be parsed, check file: {0} + ///Exception: {1}. + /// + public static string CantParseSettings { + get { + return ResourceManager.GetString("CantParseSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Google Test Adapter. + /// + public static string ExtensionName { + get { + return ResourceManager.GetString("ExtensionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RunSettingsDocument does not contain a RunSettings node! Canceling settings merging.... + /// + public static string RunSettingsMissingNode { + get { + return ResourceManager.GetString("RunSettingsMissingNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Solution test settings file found at '{0}', but does not contain {1} node. + /// + public static string SolutionFoundButMissingNode { + get { + return ResourceManager.GetString("SolutionFoundButMissingNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to . + /// + public static string String1 { + get { + return ResourceManager.GetString("String1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Google Test Adapter: Test discovery starting.... + /// + public static string TestDiscoveryStarting { + get { + return ResourceManager.GetString("TestDiscoveryStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Google Test Adapter: Test execution starting.... + /// + public static string TestExecutionStarting { + get { + return ResourceManager.GetString("TestExecutionStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Check out Google Test Adapter's trouble shooting section at https://github.com/csoltenborn/GoogleTestAdapter#trouble_shooting. + /// + public static string TroubleShootingLink { + get { + return ResourceManager.GetString("TroubleShootingLink", resourceCulture); + } + } + } +} diff --git a/GoogleTestAdapter/Common.Dynamic.GTA/Resources.resx b/GoogleTestAdapter/Common.Dynamic.GTA/Resources.resx new file mode 100644 index 000000000..772ef0b16 --- /dev/null +++ b/GoogleTestAdapter/Common.Dynamic.GTA/Resources.resx @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Solution test settings file could not be parsed, check file: {0} +Exception: {1} + + + Google Test Adapter + + + RunSettingsDocument does not contain a RunSettings node! Canceling settings merging... + + + Solution test settings file found at '{0}', but does not contain {1} node + {0} represents the path to a solution test settings file. {1} represents the non-localized name of an XML node. + + + + {0} represents the path to a solution test settings file. {1} represents a textual summary of an exception, likely non-localized. + + + Google Test Adapter: Test discovery starting... + + + Google Test Adapter: Test execution starting... + + + {0}Check out Google Test Adapter's trouble shooting section at https://github.com/csoltenborn/GoogleTestAdapter#trouble_shooting + {0} is empty or a name of a thread followed by space (e.g. "[T0] ") + + \ No newline at end of file diff --git a/GoogleTestAdapter/Common.Dynamic.GTA/Strings.cs b/GoogleTestAdapter/Common.Dynamic.GTA/Strings.cs deleted file mode 100644 index 596147fd5..000000000 --- a/GoogleTestAdapter/Common.Dynamic.GTA/Strings.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -namespace GoogleTestAdapter.Common -{ - public class Strings : IStrings - { - public string ExtensionName => "Google Test Adapter"; - public string TroubleShootingLink => "Check out Google Test Adapter's trouble shooting section at https://github.com/csoltenborn/GoogleTestAdapter#trouble_shooting"; - public string TestDiscoveryStarting => "Google Test Adapter: Test discovery starting..."; - public string TestExecutionStarting => "Google Test Adapter: Test execution starting..."; - } -} diff --git a/GoogleTestAdapter/Common.Dynamic.TAfGT/Common.Dynamic.TAfGT.csproj b/GoogleTestAdapter/Common.Dynamic.TAfGT/Common.Dynamic.TAfGT.csproj index f203e790d..c9ee97eef 100644 --- a/GoogleTestAdapter/Common.Dynamic.TAfGT/Common.Dynamic.TAfGT.csproj +++ b/GoogleTestAdapter/Common.Dynamic.TAfGT/Common.Dynamic.TAfGT.csproj @@ -2,7 +2,7 @@ - + Debug AnyCPU @@ -39,10 +39,17 @@ 4 + + $(MSBuildThisFileDirectory)..\..\loc\lcl\{Lang}\GoogleTestAdapter.Common.Dynamic.dll.lcl + - Microsoft + Microsoft400 StrongName + + + false + @@ -50,7 +57,11 @@ - + + True + True + Resources.resx + @@ -61,8 +72,15 @@ Common + + + PublicResXFileCodeGenerator + Resources.Designer.cs + Designer + + - + if exist "$(SolutionDir)Keys\Key_Release.snk" ( echo Using Release key for signing assembly @@ -72,4 +90,12 @@ copy "$(SolutionDir)Keys\Key_Debug.snk" "$(ProjectDir)Key.snk" ) + + + + Microsoft400 + StrongName + + + \ No newline at end of file diff --git a/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.Designer.cs b/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.Designer.cs new file mode 100644 index 000000000..ff0a33157 --- /dev/null +++ b/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.Designer.cs @@ -0,0 +1,136 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GoogleTestAdapter.Common { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GoogleTestAdapter.Common.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Solution test settings file could not be parsed, check file: {0} + ///Exception: {1}. + /// + public static string CantParseSettings { + get { + return ResourceManager.GetString("CantParseSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Enables Visual Studio's testing tools with unit tests written for Google Test.. + /// + public static string ExtensionDescription { + get { + return ResourceManager.GetString("ExtensionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test Adapter for Google Test. + /// + public static string ExtensionName { + get { + return ResourceManager.GetString("ExtensionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RunSettingsDocument does not contain a RunSettings node! Canceling settings merging.... + /// + public static string RunSettingsMissingNode { + get { + return ResourceManager.GetString("RunSettingsMissingNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Solution test settings file found at '{0}', but does not contain {1} node. + /// + public static string SolutionFoundButMissingNode { + get { + return ResourceManager.GetString("SolutionFoundButMissingNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test Adapter for Google Test: Test discovery starting.... + /// + public static string TestDiscoveryStarting { + get { + return ResourceManager.GetString("TestDiscoveryStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test Adapter for Google Test: Test execution starting.... + /// + public static string TestExecutionStarting { + get { + return ResourceManager.GetString("TestExecutionStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Check out Test Adapter for Google Test's trouble shooting section at https://go.microsoft.com/fwlink/?linkid=848168. + /// + public static string TroubleShootingLink { + get { + return ResourceManager.GetString("TroubleShootingLink", resourceCulture); + } + } + } +} diff --git a/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.resx b/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.resx new file mode 100644 index 000000000..279c91399 --- /dev/null +++ b/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.resx @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Solution test settings file could not be parsed, check file: {0} +Exception: {1} + {0} represents the path to a solution test settings file. {1} represents a textual summary of an exception, likely non-localized. + + + Enables Visual Studio's testing tools with unit tests written for Google Test. + + + Test Adapter for Google Test + + + RunSettingsDocument does not contain a RunSettings node! Canceling settings merging... + + + Solution test settings file found at '{0}', but does not contain {1} node + {0} represents the path to a solution test settings file. {1} represents the non-localized name of an XML node. + + + Test Adapter for Google Test: Test discovery starting... + + + Test Adapter for Google Test: Test execution starting... + + + {0}Check out Test Adapter for Google Test's trouble shooting section at https://go.microsoft.com/fwlink/?linkid=848168 + {0} is empty or a name of a thread followed by space (e.g. "[T0] ") + + \ No newline at end of file diff --git a/GoogleTestAdapter/Common.Dynamic.TAfGT/Strings.cs b/GoogleTestAdapter/Common.Dynamic.TAfGT/Strings.cs deleted file mode 100644 index 339711d38..000000000 --- a/GoogleTestAdapter/Common.Dynamic.TAfGT/Strings.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -namespace GoogleTestAdapter.Common -{ - public class Strings : IStrings - { - public string ExtensionName => "Test Adapter for Google Test"; - public string TroubleShootingLink => "Check out Test Adapter for Google Test's trouble shooting section at https://go.microsoft.com/fwlink/?linkid=848168"; - public string TestDiscoveryStarting => "Test Adapter for Google Test: Test discovery starting..."; - public string TestExecutionStarting => "Test Adapter for Google Test: Test execution starting..."; - } -} diff --git a/GoogleTestAdapter/Common/Common.csproj b/GoogleTestAdapter/Common/Common.csproj index 447b471b2..c1836b820 100644 --- a/GoogleTestAdapter/Common/Common.csproj +++ b/GoogleTestAdapter/Common/Common.csproj @@ -2,7 +2,7 @@ - + Debug AnyCPU @@ -40,7 +40,7 @@ - Microsoft + Microsoft400 StrongName @@ -54,17 +54,16 @@ - - + - + if exist "$(SolutionDir)Keys\Key_Release.snk" ( echo Using Release key for signing assembly diff --git a/GoogleTestAdapter/Common/CommonResources.cs b/GoogleTestAdapter/Common/CommonResources.cs new file mode 100644 index 000000000..913b44045 --- /dev/null +++ b/GoogleTestAdapter/Common/CommonResources.cs @@ -0,0 +1,102 @@ +namespace GoogleTestAdapter.Common +{ + using System.IO; + using System.Reflection; + + /// + /// Based on the auto-generated resources file from Common.Dynamic + /// + public class CommonResources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal CommonResources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + // Get the path to GoogleTestAdapter.Common.Dynamic.dll where the resources are defined + var path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "GoogleTestAdapter.Common.Dynamic.dll"); + var asm = Assembly.LoadFrom(path); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GoogleTestAdapter.Common.Resources", asm); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Test Adapter for Google Test. + /// + public static string ExtensionName + { + get + { + return ResourceManager.GetString("ExtensionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test Adapter for Google Test: Test discovery starting.... + /// + public static string TestDiscoveryStarting + { + get + { + return ResourceManager.GetString("TestDiscoveryStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test Adapter for Google Test: Test execution starting.... + /// + public static string TestExecutionStarting + { + get + { + return ResourceManager.GetString("TestExecutionStarting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Check out Test Adapter for Google Test's trouble shooting section at https://go.microsoft.com/fwlink/?linkid=848168. + /// + public static string TroubleShootingLink + { + get + { + return ResourceManager.GetString("TroubleShootingLink", resourceCulture); + } + } + } +} diff --git a/GoogleTestAdapter/Common/IStrings.cs b/GoogleTestAdapter/Common/IStrings.cs deleted file mode 100644 index af5965d23..000000000 --- a/GoogleTestAdapter/Common/IStrings.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -namespace GoogleTestAdapter.Common -{ - public interface IStrings - { - string ExtensionName { get; } - string TroubleShootingLink { get; } - string TestDiscoveryStarting { get; } - string TestExecutionStarting { get; } - } -} diff --git a/GoogleTestAdapter/Common/Strings.cs b/GoogleTestAdapter/Common/Strings.cs deleted file mode 100644 index e7df1cc2e..000000000 --- a/GoogleTestAdapter/Common/Strings.cs +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. - -using System; -using System.IO; -using System.Reflection; - -namespace GoogleTestAdapter.Common -{ - public class Strings - { - private static IStrings _strings; - - static Strings() - { - var path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "GoogleTestAdapter.Common.Dynamic.dll"); - var asm = Assembly.LoadFile(path); - var type = asm.GetType("GoogleTestAdapter.Common.Strings"); - _strings = (IStrings)Activator.CreateInstance(type); - } - - public static IStrings Instance => _strings; - } -} diff --git a/GoogleTestAdapter/Core.Tests/Core.Tests.csproj b/GoogleTestAdapter/Core.Tests/Core.Tests.csproj index c46d1d6d2..3c3ad7990 100644 --- a/GoogleTestAdapter/Core.Tests/Core.Tests.csproj +++ b/GoogleTestAdapter/Core.Tests/Core.Tests.csproj @@ -88,6 +88,7 @@ + diff --git a/GoogleTestAdapter/Core.Tests/GoogleTestDiscovererTests.cs b/GoogleTestAdapter/Core.Tests/GoogleTestDiscovererTests.cs index c5911754f..4f8debd4b 100644 --- a/GoogleTestAdapter/Core.Tests/GoogleTestDiscovererTests.cs +++ b/GoogleTestAdapter/Core.Tests/GoogleTestDiscovererTests.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 9/2017. + +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -23,27 +25,6 @@ namespace GoogleTestAdapter public class GoogleTestDiscovererTests : TestsBase { - [TestMethod] - [TestCategory(Unit)] - public void IsGoogleTestExecutable_MatchingExamples_AreMatched() - { - AssertIsGoogleTestExecutable("MyGoogleTests.exe", true); - AssertIsGoogleTestExecutable("MyGoogleTests.exe", true); - AssertIsGoogleTestExecutable("MyGoogleTest.exe", true); - AssertIsGoogleTestExecutable("mygoogletests.exe", true); - AssertIsGoogleTestExecutable("mygoogletest.exe", true); - } - - [TestMethod] - [TestCategory(Unit)] - public void IsGoogleTestExecutable_NotMatchingExamples_AreNotMatched() - { - AssertIsGoogleTestExecutable("MyGoogleTes.exe", false); - AssertIsGoogleTestExecutable("TotallyWrong.exe", false); - AssertIsGoogleTestExecutable("TestStuff.exe", false); - AssertIsGoogleTestExecutable("TestLibrary.exe", false); - } - [TestMethod] [TestCategory(Unit)] public void IsGoogleTestExecutable_WithRegexFromOptions_MatchesCorrectly() @@ -57,7 +38,7 @@ public void IsGoogleTestExecutable_WithRegexFromOptions_MatchesCorrectly() [TestCategory(Unit)] public void IsGoogleTestExecutable_WithUnparsableRegexFromOptions_ProducesErrorMessage() { - bool result = new GoogleTestDiscoverer(TestEnvironment.Logger, TestEnvironment.Options).IsGoogleTestExecutable("my.exe", "d[ddd["); + bool result = GoogleTestDiscoverer.IsGoogleTestExecutable("my.exe", "d[ddd[", TestEnvironment.Logger); result.Should().BeFalse(); MockLogger.Verify(l => l.LogError(It.Is(s => s.Contains("'d[ddd['"))), Times.Exactly(1)); @@ -70,8 +51,8 @@ public void IsGoogleTestExecutable_WithIndicatorFile_IsRecognizedAsTestExecutabl string testExecutable = SetupIndicatorFileTest(true); try { - bool result = new GoogleTestDiscoverer(TestEnvironment.Logger, TestEnvironment.Options) - .IsGoogleTestExecutable(testExecutable); + bool result = GoogleTestDiscoverer + .IsGoogleTestExecutable(testExecutable, "", TestEnvironment.Logger); result.Should().BeTrue(); } @@ -84,15 +65,15 @@ public void IsGoogleTestExecutable_WithIndicatorFile_IsRecognizedAsTestExecutabl [TestMethod] [TestCategory(Unit)] - public void IsGoogleTestExecutable_WithoutIndicatorFile_IsNotRecognizedAsTestExecutable() + public void IsGoogleTestExecutable_WithoutIndicatorFile_IsRecognizedAsTestExecutable() { string testExecutable = SetupIndicatorFileTest(false); try { - bool result = new GoogleTestDiscoverer(TestEnvironment.Logger, TestEnvironment.Options) - .IsGoogleTestExecutable(testExecutable); + bool result = GoogleTestDiscoverer + .IsGoogleTestExecutable(testExecutable, "", TestEnvironment.Logger); - result.Should().BeFalse(); + result.Should().BeTrue(); } finally { @@ -101,6 +82,26 @@ public void IsGoogleTestExecutable_WithoutIndicatorFile_IsNotRecognizedAsTestExe } } + [TestMethod] + [TestCategory(Unit)] + public void IsGoogleTestExecutable_DependingOnGtestDll_IsRecognizedAsTestExecutable() + { + bool result = GoogleTestDiscoverer + .IsGoogleTestExecutable(TestResources.FakeGtestDllExe, "", TestEnvironment.Logger); + + result.Should().BeTrue(); + } + + [TestMethod] + [TestCategory(Unit)] + public void IsGoogleTestExecutable_DependingOnGtestDllX64_IsRecognizedAsTestExecutable() + { + bool result = GoogleTestDiscoverer + .IsGoogleTestExecutable(TestResources.FakeGtestDllExeX64, "", TestEnvironment.Logger); + + result.Should().BeTrue(); + } + [TestMethod] [TestCategory(Integration)] public void GetTestsFromExecutable_SampleTestsDebug_FindsTestsWithLocation() @@ -163,7 +164,7 @@ public void GetTestsFromExecutable_WithoutPathExtension_ProducesWarning() IList testCases = discoverer.GetTestsFromExecutable(targetExe); testCases.Count.Should().Be(0); - MockLogger.Verify(l => l.LogError(It.Is(s => s.StartsWith("Could not list test cases of executable")))); + MockLogger.Verify(l => l.LogError(It.Is(s => s.StartsWith("Could not list test cases for executable")))); } finally { @@ -318,7 +319,7 @@ public void GetTestsFromExecutable_LoadTests_AreFoundInReasonableTime() private void AssertIsGoogleTestExecutable(string executable, bool isGoogleTestExecutable, string regex = "") { - new GoogleTestDiscoverer(TestEnvironment.Logger, TestEnvironment.Options).IsGoogleTestExecutable(executable, regex) + GoogleTestDiscoverer.IsGoogleTestExecutable(executable, regex, TestEnvironment.Logger) .Should() .Be(isGoogleTestExecutable); } diff --git a/GoogleTestAdapter/Core.Tests/Helpers/ByteUtilsTests.cs b/GoogleTestAdapter/Core.Tests/Helpers/ByteUtilsTests.cs new file mode 100644 index 000000000..d3eb56049 --- /dev/null +++ b/GoogleTestAdapter/Core.Tests/Helpers/ByteUtilsTests.cs @@ -0,0 +1,75 @@ +using System.Text; +using FluentAssertions; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using static GoogleTestAdapter.Tests.Common.TestMetadata.TestCategories; + +namespace GoogleTestAdapter.Helpers +{ + [TestClass] + public class ByteUtilsTests + { + [TestMethod] + [TestCategory(Unit)] + public void IndexOf_FooEmptyPattern_ReturnsFound() + { + var bytes = Encoding.ASCII.GetBytes("foo"); + var pattern = Encoding.ASCII.GetBytes(""); + bytes.IndexOf(pattern).Should().Be(0); + } + + [TestMethod] + [TestCategory(Unit)] + public void IndexOf_EmptyBytesFoo_ReturnsNotFound() + { + var bytes = Encoding.ASCII.GetBytes(""); + var pattern = Encoding.ASCII.GetBytes("foo"); + bytes.IndexOf(pattern).Should().Be(-1); + } + + [TestMethod] + [TestCategory(Unit)] + public void IndexOf_EmptyBytesEmptyPattern_ReturnsFound() + { + var bytes = Encoding.ASCII.GetBytes(""); + var pattern = Encoding.ASCII.GetBytes(""); + bytes.IndexOf(pattern).Should().Be(0); + } + + [TestMethod] + [TestCategory(Unit)] + public void IndexOf_FooBar_ReturnsNotFound() + { + var bytes = Encoding.ASCII.GetBytes("foofoofoo"); + var pattern = Encoding.ASCII.GetBytes("bar"); + bytes.IndexOf(pattern).Should().Be(-1); + } + + [TestMethod] + [TestCategory(Unit)] + public void IndexOf_FooAtBeginning_ReturnsFound() + { + var bytes = Encoding.ASCII.GetBytes("fooxxx"); + var pattern = Encoding.ASCII.GetBytes("foo"); + bytes.IndexOf(pattern).Should().Be(0); + } + + [TestMethod] + [TestCategory(Unit)] + public void IndexOf_FooAtEnd_ReturnsFound() + { + var bytes = Encoding.ASCII.GetBytes("xxxfoo"); + var pattern = Encoding.ASCII.GetBytes("foo"); + bytes.IndexOf(pattern).Should().Be(3); + } + + [TestMethod] + [TestCategory(Unit)] + public void IndexOf_FooInMiddle_ReturnsFound() + { + var bytes = Encoding.ASCII.GetBytes("xxxfooxxx"); + var pattern = Encoding.ASCII.GetBytes("foo"); + bytes.IndexOf(pattern).Should().Be(3); + } + + } +} \ No newline at end of file diff --git a/GoogleTestAdapter/Core.Tests/Helpers/ProcessExecutorTests.cs b/GoogleTestAdapter/Core.Tests/Helpers/ProcessExecutorTests.cs index 5fa700238..ad3b6cd85 100644 --- a/GoogleTestAdapter/Core.Tests/Helpers/ProcessExecutorTests.cs +++ b/GoogleTestAdapter/Core.Tests/Helpers/ProcessExecutorTests.cs @@ -24,6 +24,7 @@ public void ExecuteProcessBlocking_PingLocalHost() Path.Combine(Environment.SystemDirectory, "ping.exe"), "localhost", "", + null, null, s => output.Add(s)); @@ -44,6 +45,7 @@ public void ExecuteProcessBlocking_SampleTests() TestResources.Tests_DebugX86, null, null, + null, "", s => output.Add(s)); diff --git a/GoogleTestAdapter/Core.Tests/Helpers/TestProcessLauncherTests.cs b/GoogleTestAdapter/Core.Tests/Helpers/TestProcessLauncherTests.cs index 45d7eb832..03edb91d0 100644 --- a/GoogleTestAdapter/Core.Tests/Helpers/TestProcessLauncherTests.cs +++ b/GoogleTestAdapter/Core.Tests/Helpers/TestProcessLauncherTests.cs @@ -31,7 +31,7 @@ public void GetOutputOfCommand_WhenDebugging_InvokesDebuggedProcessLauncherCorre int processId = -4711; var mockLauncher = new Mock(); mockLauncher.Setup(l => - l.LaunchProcessWithDebuggerAttached(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + l.LaunchProcessWithDebuggerAttached(It.IsAny(), It.IsAny(), null, It.IsAny(), It.IsAny())) .Returns(processId); new TestProcessLauncher(TestEnvironment.Logger, TestEnvironment.Options, true) @@ -42,6 +42,7 @@ public void GetOutputOfCommand_WhenDebugging_InvokesDebuggedProcessLauncherCorre mockLauncher.Verify(l => l.LaunchProcessWithDebuggerAttached( It.Is(s => s == "theCommand"), It.Is(s => s == "theDir"), + null, It.Is(s => s == "theParams"), It.Is(s => s == "") ), Times.Exactly(1)); diff --git a/GoogleTestAdapter/Core.Tests/Helpers/UtilsTests.cs b/GoogleTestAdapter/Core.Tests/Helpers/UtilsTests.cs index a37e97bfa..17b1a856f 100644 --- a/GoogleTestAdapter/Core.Tests/Helpers/UtilsTests.cs +++ b/GoogleTestAdapter/Core.Tests/Helpers/UtilsTests.cs @@ -1,6 +1,7 @@ using System; using System.Diagnostics; using System.IO; +using System.Text; using System.Threading; using FluentAssertions; using GoogleTestAdapter.Tests.Common; @@ -12,7 +13,6 @@ namespace GoogleTestAdapter.Helpers [TestClass] public class UtilsTests { - [TestMethod] [TestCategory(Unit)] public void DeleteDirectory_CanNotBeDeleted_ReturnsFalseAndMessage() @@ -45,6 +45,48 @@ public void GetTempDirectory__DirectoryDoesExistAndCanBeDeleted() Utils.DeleteDirectory(dir, out errorMessage).Should().BeTrue(); } + [TestMethod] + [TestCategory(Unit)] + public void BinaryFileContainsStrings_TestX86Release_ShouldContainGoogleTestIndicator() + { + Utils.BinaryFileContainsStrings(TestResources.Tests_ReleaseX86, Encoding.ASCII, GoogleTestConstants.GoogleTestExecutableMarkers).Should().BeTrue(); + } + + [TestMethod] + [TestCategory(Unit)] + public void BinaryFileContainsStrings_TestX64Release_ShouldContainGoogleTestIndicator() + { + Utils.BinaryFileContainsStrings(TestResources.Tests_ReleaseX64, Encoding.ASCII, GoogleTestConstants.GoogleTestExecutableMarkers).Should().BeTrue(); + } + + [TestMethod] + [TestCategory(Unit)] + public void BinaryFileContainsStrings_TestX86Debug_ShouldContainGoogleTestIndicator() + { + Utils.BinaryFileContainsStrings(TestResources.Tests_DebugX86, Encoding.ASCII, GoogleTestConstants.GoogleTestExecutableMarkers).Should().BeTrue(); + } + + [TestMethod] + [TestCategory(Unit)] + public void BinaryFileContainsStrings_TestX64Debug_ShouldContainGoogleTestIndicator() + { + Utils.BinaryFileContainsStrings(TestResources.Tests_DebugX64, Encoding.ASCII, GoogleTestConstants.GoogleTestExecutableMarkers).Should().BeTrue(); + } + + [TestMethod] + [TestCategory(Unit)] + public void BinaryFileContainsStrings_TenSecondsWaiter_ShouldNotContainGoogleTestIndicator() + { + Utils.BinaryFileContainsStrings(TestResources.TenSecondsWaiter, Encoding.ASCII, GoogleTestConstants.GoogleTestExecutableMarkers).Should().BeFalse(); + } + + [TestMethod] + [TestCategory(Unit)] + public void BinaryFileContainsStrings_EmptyFile_ShouldNotContainGoogleTestIndicator() + { + Utils.BinaryFileContainsStrings(TestResources.TenSecondsWaiter, Encoding.ASCII, GoogleTestConstants.GoogleTestExecutableMarkers).Should().BeFalse(); + } + [TestMethod] [TestCategory(Unit)] public void TimestampMessage_MessageIsNullOrEmpty_ResultIsTheSame() diff --git a/GoogleTestAdapter/Core.Tests/packages.config b/GoogleTestAdapter/Core.Tests/packages.config index f39d7135b..105f0dbc4 100644 --- a/GoogleTestAdapter/Core.Tests/packages.config +++ b/GoogleTestAdapter/Core.Tests/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/GoogleTestAdapter/Core/Core.csproj b/GoogleTestAdapter/Core/Core.csproj index 9669590d8..6b62aa9ca 100644 --- a/GoogleTestAdapter/Core/Core.csproj +++ b/GoogleTestAdapter/Core/Core.csproj @@ -2,7 +2,7 @@ - + Debug AnyCPU @@ -41,10 +41,17 @@ true + + $(MSBuildThisFileDirectory)..\..\loc\lcl\{Lang}\GoogleTestAdapter.Core.dll.lcl + - Microsoft + Microsoft400 StrongName + + + false + @@ -63,15 +70,23 @@ + + + True + True + Resources.resx + + + @@ -108,6 +123,11 @@ Designer GtaTestDurations.xsd + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + @@ -125,7 +145,7 @@ - + if exist "$(SolutionDir)Keys\Key_Release.snk" ( echo Using Release key for signing assembly @@ -142,4 +162,12 @@ --> + + + + Microsoft400 + StrongName + + + \ No newline at end of file diff --git a/GoogleTestAdapter/Core/Framework/IDebuggedProcessLauncher.cs b/GoogleTestAdapter/Core/Framework/IDebuggedProcessLauncher.cs index 320868129..b772d7b8b 100644 --- a/GoogleTestAdapter/Core/Framework/IDebuggedProcessLauncher.cs +++ b/GoogleTestAdapter/Core/Framework/IDebuggedProcessLauncher.cs @@ -1,9 +1,11 @@ -namespace GoogleTestAdapter.Framework +using System.Collections.Generic; + +namespace GoogleTestAdapter.Framework { public interface IDebuggedProcessLauncher { - int LaunchProcessWithDebuggerAttached(string command, string workingDirectory, string param, string pathExtension); + int LaunchProcessWithDebuggerAttached(string command, string workingDirectory, IDictionary additionalEnvVars, string param, string pathExtension); } } \ No newline at end of file diff --git a/GoogleTestAdapter/Core/Framework/IProcessExecutor.cs b/GoogleTestAdapter/Core/Framework/IProcessExecutor.cs index 47aab9076..05660e8c5 100644 --- a/GoogleTestAdapter/Core/Framework/IProcessExecutor.cs +++ b/GoogleTestAdapter/Core/Framework/IProcessExecutor.cs @@ -1,6 +1,7 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 5/2018. using System; +using System.Collections.Generic; using System.IO; namespace GoogleTestAdapter.Framework @@ -8,7 +9,7 @@ namespace GoogleTestAdapter.Framework public interface IProcessExecutor { - int ExecuteCommandBlocking(string command, string parameters, string workingDir, string pathExtension, Action reportOutputLine); + int ExecuteCommandBlocking(string command, string parameters, string workingDir, IDictionary envVars, string pathExtension, Action reportOutputLine); void Cancel(); } @@ -23,7 +24,7 @@ public static int ExecuteBatchFileBlocking(this IProcessExecutor executor, strin } string command = Path.Combine(Environment.SystemDirectory, "cmd.exe"); - return executor.ExecuteCommandBlocking(command, $"/C \"{batchFile}\" {parameters}", workingDir, pathExtension, + return executor.ExecuteCommandBlocking(command, $"/C \"{batchFile}\" {parameters}", workingDir, null, pathExtension, reportOutputLine); } } diff --git a/GoogleTestAdapter/Core/GoogleTestConstants.cs b/GoogleTestAdapter/Core/GoogleTestConstants.cs index 6aa8cb19c..9b5b42ff1 100644 --- a/GoogleTestAdapter/Core/GoogleTestConstants.cs +++ b/GoogleTestAdapter/Core/GoogleTestConstants.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 4/2020. using System; @@ -7,6 +7,7 @@ namespace GoogleTestAdapter public static class GoogleTestConstants { + public const string TestPropertySettingsName = "TestPropertySettingsForGoogleAdapter"; public const string SettingsName = "GoogleTestAdapterSettings"; public const string SettingsExtension = ".gta.runsettings"; public const string DurationsExtension = ".gta.testdurations"; @@ -23,13 +24,26 @@ public static class GoogleTestConstants public const int ShuffleTestsSeedMinValue = 0; public static readonly int ShuffleTestsSeedMaxValue = int.Parse(ShuffleTestsSeedMaxValueAsString); - public const string ListTestsOption = " --gtest_list_tests"; + public const string ListTestsOption = "--gtest_list_tests"; public const string FilterOption = " --gtest_filter="; public const string TestBodySignature = "::TestBody"; public const string ParameterizedTestMarker = " # GetParam() = "; public const string TypedTestMarker = ". # TypeParam = "; + public const string GoogleTestDllMarker = "gtest.dll"; + public const string GoogleTestDllMarkerDebug = "gtestd.dll"; + public const string GoogleTestMainDllMarker = "gtest_main.dll"; + public const string GoogleTestMainDllMarkerDebug = "gtest_maind.dll"; + + public static readonly string[] GoogleTestExecutableMarkers = + { + "This program contains tests written using Google Test. You can use the", + "For more information, please read the Google Test documentation at", + "Run only the tests whose name matches one of the positive patterns but", + ListTestsOption + }; + public static string GetResultXmlFileOption(string resultXmlFile) { return "--gtest_output=\"xml:" + resultXmlFile + "\""; diff --git a/GoogleTestAdapter/Core/GoogleTestDiscoverer.cs b/GoogleTestAdapter/Core/GoogleTestDiscoverer.cs index 589800837..3f9f24355 100644 --- a/GoogleTestAdapter/Core/GoogleTestDiscoverer.cs +++ b/GoogleTestAdapter/Core/GoogleTestDiscoverer.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 7/2017. +// This file has been modified by Microsoft on 4/2020. using GoogleTestAdapter.Common; using GoogleTestAdapter.DiaResolver; @@ -12,6 +12,7 @@ using System.IO; using System.Linq; using System.Security.Policy; +using System.Text; using System.Text.RegularExpressions; namespace GoogleTestAdapter @@ -20,8 +21,6 @@ public class GoogleTestDiscoverer { public const string GoogleTestIndicator = ".is_google_test"; - private static readonly Regex CompiledTestFinderRegex = new Regex(SettingsWrapper.TestFinderRegex, RegexOptions.Compiled); - private readonly ILogger _logger; private readonly SettingsWrapper _settings; private readonly IDiaResolverFactory _diaResolverFactory; @@ -35,25 +34,25 @@ public GoogleTestDiscoverer(ILogger logger, SettingsWrapper settings, IDiaResolv public void DiscoverTests(IEnumerable executables, ITestFrameworkReporter reporter) { - IList googleTestExecutables = GetAllGoogleTestExecutables(executables); if (_settings.UseNewTestExecutionFramework) { - var discoveryActions = googleTestExecutables + var discoveryActions = executables .Select(e => (Action)(() => DiscoverTests(e, reporter, _settings.Clone(), _logger, _diaResolverFactory))) .ToArray(); Utils.SpawnAndWait(discoveryActions); } else { - foreach (string executable in googleTestExecutables) + foreach (string executable in executables) { _settings.ExecuteWithSettingsForExecutable(executable, () => { - if (!VerifyExecutableTrust(executable, _logger)) - return; - - IList testCases = GetTestsFromExecutable(executable); - reporter.ReportTestsFound(testCases); + if (VerifyExecutableTrust(executable, _logger) && + IsGoogleTestExecutable(executable, _settings.TestDiscoveryRegex, _logger)) + { + IList testCases = GetTestsFromExecutable(executable); + reporter.ReportTestsFound(testCases); + } }, _logger); } } @@ -63,19 +62,20 @@ private static void DiscoverTests(string executable, ITestFrameworkReporter repo { settings.ExecuteWithSettingsForExecutable(executable, () => { - if (!VerifyExecutableTrust(executable, logger)) + if (!VerifyExecutableTrust(executable, logger) + || !IsGoogleTestExecutable(executable, settings.TestDiscoveryRegex, logger)) return; int nrOfTestCases = 0; Action reportTestCases = tc => { reporter.ReportTestsFound(tc.Yield()); - logger.DebugInfo("Added testcase " + tc.DisplayName); + logger.DebugInfo(String.Format(Resources.AddedTestCase, tc.DisplayName)); nrOfTestCases++; }; var factory = new TestCaseFactory(executable, logger, settings, diaResolverFactory); factory.CreateTestCases(reportTestCases); - logger.LogInfo("Found " + nrOfTestCases + " tests in executable " + executable); + logger.LogInfo(String.Format(Resources.NumberOfTestsMessage, nrOfTestCases, executable)); }, logger); } @@ -86,58 +86,47 @@ public IList GetTestsFromExecutable(string executable) foreach (TestCase testCase in testCases) { - _logger.DebugInfo("Added testcase " + testCase.DisplayName); + _logger.DebugInfo(String.Format(Resources.AddedTestCase, testCase.DisplayName)); } - _logger.LogInfo("Found " + testCases.Count + " tests in executable " + executable); + _logger.LogInfo(String.Format(Resources.NumberOfTestsMessage, testCases.Count, executable)); return testCases; } - public bool IsGoogleTestExecutable(string executable, string customRegex = "") + public static bool IsGoogleTestExecutable(string executable, string customRegex, ILogger logger) { string googleTestIndicatorFile = $"{executable}{GoogleTestIndicator}"; if (File.Exists(googleTestIndicatorFile)) { - _logger.DebugInfo($"Google Test indicator file found for executable {executable}"); + logger.DebugInfo(String.Format(Resources.FileFound, executable)); return true; } - _logger.DebugInfo($"No Google Test indicator file found for executable {executable}"); - bool matches; - string regexSource, regex; if (string.IsNullOrWhiteSpace(customRegex)) { - regexSource = "default"; - regex = SettingsWrapper.TestFinderRegex; - matches = CompiledTestFinderRegex.IsMatch(executable); + List gtestImports = new List() { GoogleTestConstants.GoogleTestDllMarker, GoogleTestConstants.GoogleTestDllMarkerDebug, + GoogleTestConstants.GoogleTestMainDllMarker, GoogleTestConstants.GoogleTestMainDllMarkerDebug }; + + if (PeParser.FindImport(executable, gtestImports, StringComparison.OrdinalIgnoreCase, logger) + || Utils.BinaryFileContainsStrings(executable, Encoding.ASCII, GoogleTestConstants.GoogleTestExecutableMarkers)) + { + return true; + } } else { - regexSource = "custom"; - regex = customRegex; - matches = SafeMatches(executable, customRegex); - } - _logger.DebugInfo( - $"'{executable}' {(matches ? "matches" : "does not match")} {regexSource} regex '{regex}'"); - - return matches; - } - - private IList GetAllGoogleTestExecutables(IEnumerable allExecutables) - { - IList testExecutables = new List(); - foreach (string executable in allExecutables) - { - _settings.ExecuteWithSettingsForExecutable(executable, () => + if (SafeMatches(executable, customRegex, logger)) { - if (IsGoogleTestExecutable(executable, _settings.TestDiscoveryRegex)) - testExecutables.Add(Path.GetFullPath(executable)); - }, _logger); + logger.DebugInfo(String.Format(Resources.MatchesCustom, executable, customRegex)); + return true; + } } - return testExecutables; + + logger.DebugInfo(String.Format(Resources.FileNotFound, executable)); + return false; } - private bool SafeMatches(string executable, string regex) + private static bool SafeMatches(string executable, string regex, ILogger logger) { bool matches = false; try @@ -146,21 +135,21 @@ private bool SafeMatches(string executable, string regex) } catch (ArgumentException e) { - _logger.LogError($"Regex '{regex}' can not be parsed: {e.Message}"); + logger.LogError(String.Format(Resources.RegexParseError, regex, e.Message)); } catch (RegexMatchTimeoutException e) { - _logger.LogError($"Regex '{regex}' timed out: {e.Message}"); + logger.LogError(String.Format(Resources.RegexTimedOut, regex, e.Message)); } return matches; } private static bool VerifyExecutableTrust(string executable, ILogger logger) { - var zone = Zone.CreateFromUrl(executable); + var zone = Zone.CreateFromUrl(Path.GetFullPath(executable)); if (zone.SecurityZone != System.Security.SecurityZone.MyComputer) { - logger.LogError("Executable " + executable + " came from another computer and was blocked to help protect this computer."); + logger.LogError(String.Format(Resources.ExecutableError, executable)); return false; } return true; diff --git a/GoogleTestAdapter/Core/GoogleTestExecutor.cs b/GoogleTestAdapter/Core/GoogleTestExecutor.cs index 54146b140..2480f7b73 100644 --- a/GoogleTestAdapter/Core/GoogleTestExecutor.cs +++ b/GoogleTestAdapter/Core/GoogleTestExecutor.cs @@ -1,4 +1,7 @@ -using System.Linq; +// This file has been modified by Microsoft on 8/2017. + +using System; +using System.Linq; using System.Collections.Generic; using GoogleTestAdapter.Common; using GoogleTestAdapter.Model; @@ -31,7 +34,7 @@ public GoogleTestExecutor(ILogger logger, SettingsWrapper settings) public void RunTests(IEnumerable testCasesToRun, ITestFrameworkReporter reporter, IDebuggedProcessLauncher launcher, bool isBeingDebugged, string solutionDirectory, IProcessExecutor executor) { TestCase[] testCasesToRunAsArray = testCasesToRun as TestCase[] ?? testCasesToRun.ToArray(); - _logger.LogInfo("Running " + testCasesToRunAsArray.Length + " tests..."); + _logger.LogInfo(String.Format(Resources.NumberOfTestsRunningMessage, testCasesToRunAsArray.Length)); lock (this) { @@ -68,8 +71,7 @@ private void ComputeTestRunner(ITestFrameworkReporter reporter, bool isBeingDebu _runner = new PreparingTestRunner(solutionDirectory, reporter, _logger, _settings, _schedulingAnalyzer); if (_settings.ParallelTestExecution && isBeingDebugged) { - _logger.DebugInfo( - "Parallel execution is selected in options, but tests are executed sequentially because debugger is attached."); + _logger.DebugInfo(Resources.ParallelExecution); } } } diff --git a/GoogleTestAdapter/Core/Helpers/ByteUtils.cs b/GoogleTestAdapter/Core/Helpers/ByteUtils.cs new file mode 100644 index 000000000..fa772a2e0 --- /dev/null +++ b/GoogleTestAdapter/Core/Helpers/ByteUtils.cs @@ -0,0 +1,88 @@ +using System; + +namespace GoogleTestAdapter.Helpers +{ + public static class ByteUtils + { + /// + /// Implementation of the Boyer-Moore algorithm + /// (after https://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm, Java version) + /// + /// Index of the first occurence of pattern, or -1 if pattern is not contained in bytes + public static int IndexOf(this byte[] bytes, byte[] pattern) + { + if (pattern.Length == 0) + return 0; + + int[] byteBasedJumpTable = CreateByteBasedJumpTable(pattern); + int[] offsetBasedJumpTable = CreateOffsetBasedJumpTable(pattern); + + for (int posInBytes = pattern.Length - 1; posInBytes < bytes.Length;) + { + int posInPattern; + for (posInPattern = pattern.Length - 1; pattern[posInPattern] == bytes[posInBytes]; --posInBytes, --posInPattern) + { + if (posInPattern == 0) + return posInBytes; + } + + posInBytes += Math.Max(offsetBasedJumpTable[pattern.Length - 1 - posInPattern], byteBasedJumpTable[bytes[posInBytes]]); + } + + return -1; + } + + private static int[] CreateByteBasedJumpTable(byte[] pattern) + { + int[] table = new int[byte.MaxValue + 1]; + for (int i = 0; i < table.Length; ++i) + { + table[i] = pattern.Length; + } + for (int i = 0; i < pattern.Length - 1; ++i) + { + table[pattern[i]] = pattern.Length - 1 - i; + } + return table; + } + + private static int[] CreateOffsetBasedJumpTable(byte[] pattern) + { + int[] table = new int[pattern.Length]; + int lastPrefixPosition = pattern.Length; + for (int i = pattern.Length; i > 0; i--) + { + if (IsPrefix(pattern, i)) + lastPrefixPosition = i; + + table[pattern.Length - i] = lastPrefixPosition - i + pattern.Length; + } + for (int i = 0; i < pattern.Length - 1; i++) + { + int suffixLength = GetSuffixLength(pattern, i); + table[suffixLength] = pattern.Length - 1 - i + suffixLength; + } + return table; + } + + private static bool IsPrefix(byte[] pattern, int position) + { + for (int i = position, j = 0; i < pattern.Length; i++, j++) + { + if (pattern[i] != pattern[j]) + return false; + } + return true; + } + + private static int GetSuffixLength(byte[] pattern, int position) + { + int length = 0; + for (int i = position, j = pattern.Length - 1; i >= 0 && pattern[i] == pattern[j]; i--, j--) + { + length++; + } + return length; + } + } +} \ No newline at end of file diff --git a/GoogleTestAdapter/Core/Helpers/ProcessExecutor.cs b/GoogleTestAdapter/Core/Helpers/ProcessExecutor.cs index ebdb6baff..ea4acf0e2 100644 --- a/GoogleTestAdapter/Core/Helpers/ProcessExecutor.cs +++ b/GoogleTestAdapter/Core/Helpers/ProcessExecutor.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 5/2018. + +using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; @@ -32,11 +34,11 @@ public ProcessExecutor(IDebuggerAttacher debuggerAttacher, ILogger logger) _logger = logger; } - public int ExecuteCommandBlocking(string command, string parameters, string workingDir, string pathExtension, Action reportOutputLine) + public int ExecuteCommandBlocking(string command, string parameters, string workingDir, IDictionary envVars, string pathExtension, Action reportOutputLine) { try { - return NativeMethods.ExecuteCommandBlocking(command, parameters, workingDir, pathExtension, _debuggerAttacher, reportOutputLine, processId => _processId = processId); + return NativeMethods.ExecuteCommandBlocking(command, parameters, workingDir, envVars, pathExtension, _debuggerAttacher, reportOutputLine, processId => _processId = processId); } catch (Win32Exception ex) @@ -94,12 +96,12 @@ protected override void Dispose(bool disposing) private const uint INFINITE = 0xFFFFFFFF; internal static int ExecuteCommandBlocking( - string command, string parameters, string workingDir, string pathExtension, + string command, string parameters, string workingDir, IDictionary envVars, string pathExtension, IDebuggerAttacher debuggerAttacher, Action reportOutputLine, Action reportProcessId) { using (var pipeStream = new ProcessOutputPipeStream()) { - var processInfo = CreateProcess(command, parameters, workingDir, pathExtension, pipeStream._writingEnd); + var processInfo = CreateProcess(command, parameters, workingDir, envVars, pathExtension, pipeStream._writingEnd); reportProcessId(processInfo.dwProcessId); using (var process = new SafeWaitHandle(processInfo.hProcess, true)) using (var thread = new SafeWaitHandle(processInfo.hThread, true)) @@ -134,12 +136,27 @@ public static void CreatePipe(out SafePipeHandle readingEnd, out SafePipeHandle throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not set handle information"); } - private static StringBuilder CreateEnvironment(string pathExtension) + private static StringBuilder CreateEnvironment(string pathExtension, IDictionary additionalEnvVars) { StringDictionary envVariables = new ProcessStartInfo().EnvironmentVariables; + if (additionalEnvVars != null) + { + foreach (var entry in additionalEnvVars) + { + envVariables[entry.Key] = entry.Value; + } + } + if (!string.IsNullOrEmpty(pathExtension)) - envVariables["PATH"] = Utils.GetExtendedPath(pathExtension); + { + var path = Utils.GetExtendedPath(pathExtension); + if (envVariables.ContainsKey("PATH")) + { + path += $";{envVariables["PATH"]}"; + } + envVariables["PATH"] = path; + } var envVariablesList = new List(); foreach (DictionaryEntry entry in envVariables) @@ -157,7 +174,8 @@ private static StringBuilder CreateEnvironment(string pathExtension) return result; } - private static PROCESS_INFORMATION CreateProcess(string command, string parameters, string workingDir, string pathExtension, + private static PROCESS_INFORMATION CreateProcess(string command, string parameters, string workingDir, + IDictionary envVars, string pathExtension, SafePipeHandle outputPipeWritingEnd) { var startupinfoex = new STARTUPINFOEX @@ -171,13 +189,12 @@ private static PROCESS_INFORMATION CreateProcess(string command, string paramete } }; - string commandLine = command; + string commandLine = $"\"{command}\""; if (!string.IsNullOrEmpty(parameters)) commandLine += $" {parameters}"; if (string.IsNullOrEmpty(workingDir)) workingDir = null; - PROCESS_INFORMATION processInfo; // ReSharper disable ArgumentsStyleNamedExpression // ReSharper disable ArgumentsStyleLiteral @@ -189,7 +206,7 @@ private static PROCESS_INFORMATION CreateProcess(string command, string paramete lpThreadAttributes: null, bInheritHandles: true, dwCreationFlags: CREATE_EXTENDED_STARTUPINFO_PRESENT | CREATE_SUSPENDED, - lpEnvironment: CreateEnvironment(pathExtension), + lpEnvironment: CreateEnvironment(pathExtension, envVars), lpCurrentDirectory: workingDir, lpStartupInfo: startupinfoex, lpProcessInformation: out processInfo)) diff --git a/GoogleTestAdapter/Core/Helpers/ProcessLauncher.cs b/GoogleTestAdapter/Core/Helpers/ProcessLauncher.cs index ea0f21eef..488152842 100644 --- a/GoogleTestAdapter/Core/Helpers/ProcessLauncher.cs +++ b/GoogleTestAdapter/Core/Helpers/ProcessLauncher.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 5/2018. + +using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; @@ -27,26 +29,26 @@ public ProcessLauncher(ILogger logger, string pathExtension, Action reportP public List GetOutputOfCommand(string command) { int dummy; - return GetOutputOfCommand("", command, "", false, false, out dummy); + return GetOutputOfCommand("", null, command, "", false, false, out dummy); } public List GetOutputOfCommand(string workingDirectory, string command, string param, bool printTestOutput, bool throwIfError) { int dummy; - return GetOutputOfCommand(workingDirectory, command, param, printTestOutput, throwIfError, out dummy); + return GetOutputOfCommand(workingDirectory, null, command, param, printTestOutput, throwIfError, out dummy); } - public List GetOutputOfCommand(string workingDirectory, string command, string param, bool printTestOutput, + public List GetOutputOfCommand(string workingDirectory, IDictionary envVars, string command, string param, bool printTestOutput, bool throwIfError, out int processExitCode) { var output = new List(); - processExitCode = LaunchProcess(workingDirectory, command, param, printTestOutput, throwIfError, output); + processExitCode = LaunchProcess(workingDirectory, envVars, command, param, printTestOutput, throwIfError, output); return output; } - private int LaunchProcess(string workingDirectory, string command, string param, bool printTestOutput, + private int LaunchProcess(string workingDirectory, IDictionary additionalEnvVars, string command, string param, bool printTestOutput, bool throwIfError, List output) { var processStartInfo = new ProcessStartInfo(command, param) @@ -59,8 +61,23 @@ private int LaunchProcess(string workingDirectory, string command, string param, WorkingDirectory = workingDirectory }; + if (additionalEnvVars != null) + { + foreach (var entry in additionalEnvVars) + { + processStartInfo.EnvironmentVariables[entry.Key] = entry.Value; + } + } + if (!string.IsNullOrEmpty(_pathExtension)) - processStartInfo.EnvironmentVariables["PATH"] = Utils.GetExtendedPath(_pathExtension); + { + var path = Utils.GetExtendedPath(_pathExtension); + if (processStartInfo.EnvironmentVariables.ContainsKey("PATH")) + { + path += $";{processStartInfo.EnvironmentVariables["PATH"]}"; + } + processStartInfo.EnvironmentVariables["PATH"] = path; + } Process process = Process.Start(processStartInfo); if (process != null) @@ -70,13 +87,12 @@ private int LaunchProcess(string workingDirectory, string command, string param, var waiter = new ProcessWaiter(process); if (printTestOutput) { - _logger.LogInfo( - ">>>>>>>>>>>>>>> Output of command '" + command + " " + param + "'"); + _logger.LogInfo(String.Format(Resources.OutputOfCommandMessage, "", command, param)); } ReadTheStream(process, output, printTestOutput, throwIfError); if (printTestOutput) { - _logger.LogInfo("<<<<<<<<<<<<<<< End of Output"); + _logger.LogInfo(String.Format(Resources.EndOfOutputMessage, "")); } return waiter.WaitForExit(); } @@ -100,7 +116,7 @@ private void ReadTheStream(Process process, List streamContent, bool pri } if (throwIfError && process.ExitCode != 0) { - throw new Exception("Process exited with return code " + process.ExitCode); + throw new Exception(String.Format(Resources.ProcessExitCode, process.ExitCode)); } } diff --git a/GoogleTestAdapter/Core/Helpers/RegexTraitParser.cs b/GoogleTestAdapter/Core/Helpers/RegexTraitParser.cs index 155cca335..fcd7045b9 100644 --- a/GoogleTestAdapter/Core/Helpers/RegexTraitParser.cs +++ b/GoogleTestAdapter/Core/Helpers/RegexTraitParser.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 8/2017. using GoogleTestAdapter.Common; using GoogleTestAdapter.Settings; @@ -31,7 +31,7 @@ public List ParseTraitsRegexesString(string option, bool ignoreE } catch (Exception e) { - string message = "Could not parse pair '" + pair + "', exception message: " + e.Message; + string message = String.Format(Resources.ParsePair, pair, e.Message); if (ignoreErrors) _logger?.LogError(message); else diff --git a/GoogleTestAdapter/Core/Helpers/TestProcessLauncher.cs b/GoogleTestAdapter/Core/Helpers/TestProcessLauncher.cs index 3d3825312..f4df720e2 100644 --- a/GoogleTestAdapter/Core/Helpers/TestProcessLauncher.cs +++ b/GoogleTestAdapter/Core/Helpers/TestProcessLauncher.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 5/2018. + +using System; using System.Collections.Generic; using System.Diagnostics; using GoogleTestAdapter.Common; @@ -21,26 +23,31 @@ public TestProcessLauncher(ILogger logger, SettingsWrapper settings, bool isBein _isBeingDebugged = isBeingDebugged; } - public List GetOutputOfCommand(string workingDirectory, string command, string param, bool printTestOutput, bool throwIfError, IDebuggedProcessLauncher debuggedLauncher) + { + return GetOutputOfCommand(workingDirectory, null, command, param, printTestOutput, throwIfError, debuggedLauncher); + } + + public List GetOutputOfCommand(string workingDirectory, IDictionary envVars, string command, string param, bool printTestOutput, + bool throwIfError, IDebuggedProcessLauncher debuggedLauncher) { int dummy; - return GetOutputOfCommand(workingDirectory, command, param, printTestOutput, throwIfError, debuggedLauncher, out dummy); + return GetOutputOfCommand(workingDirectory, envVars, command, param, printTestOutput, throwIfError, debuggedLauncher, out dummy); } - public List GetOutputOfCommand(string workingDirectory, string command, string param, bool printTestOutput, + public List GetOutputOfCommand(string workingDirectory, IDictionary envVars, string command, string param, bool printTestOutput, bool throwIfError, IDebuggedProcessLauncher debuggedLauncher, out int processExitCode) { if (_isBeingDebugged) { var output = new List(); - processExitCode = LaunchProcessWithDebuggerAttached(workingDirectory, command, param, printTestOutput, debuggedLauncher); + processExitCode = LaunchProcessWithDebuggerAttached(workingDirectory, envVars, command, param, printTestOutput, debuggedLauncher); return output; } var actualLauncher = new ProcessLauncher(_logger, _settings.GetPathExtension(command), processId => _processId = processId); - return actualLauncher.GetOutputOfCommand(workingDirectory, command, param, printTestOutput, + return actualLauncher.GetOutputOfCommand(workingDirectory, envVars, command, param, printTestOutput, throwIfError, out processExitCode); } @@ -61,11 +68,11 @@ public static void KillProcess(int processId, ILogger logger) try { process.Kill(); - logger.DebugInfo($"Killed process {process} with startTime={startTime.ToShortTimeString()}"); + logger.DebugInfo(String.Format(Resources.TerminatedProcess, process, startTime.ToShortTimeString())); } catch (Exception e) { - logger.DebugWarning($"Could not kill process {process} with startTime={startTime.ToShortTimeString()}: {e.Message}"); + logger.DebugWarning(String.Format(Resources.CouldNotTerminate, process, startTime.ToShortTimeString(), e.Message)); } } catch (Exception) @@ -75,16 +82,15 @@ public static void KillProcess(int processId, ILogger logger) } - private int LaunchProcessWithDebuggerAttached(string workingDirectory, string command, string param, bool printTestOutput, + private int LaunchProcessWithDebuggerAttached(string workingDirectory, IDictionary envVars, string command, string param, bool printTestOutput, IDebuggedProcessLauncher handle) { - _logger.LogInfo("Attaching debugger to " + command); + _logger.LogInfo(String.Format(Resources.AttachDebuggerMessage, command)); if (printTestOutput) { - _logger.DebugInfo( - "Note that due to restrictions of the VS Unit Testing framework, the test executable's output can not be displayed in the test console when debugging tests!"); + _logger.DebugInfo(Resources.DebuggerAttachedOutputMessage); } - _processId = handle.LaunchProcessWithDebuggerAttached(command, workingDirectory, param, _settings.GetPathExtension(command)); + _processId = handle.LaunchProcessWithDebuggerAttached(command, workingDirectory, envVars, param, _settings.GetPathExtension(command)); Process process = Process.GetProcessById(_processId.Value); var waiter = new ProcessWaiter(process); waiter.WaitForExit(); diff --git a/GoogleTestAdapter/Core/Helpers/Utils.cs b/GoogleTestAdapter/Core/Helpers/Utils.cs index a23f45da5..91f797300 100644 --- a/GoogleTestAdapter/Core/Helpers/Utils.cs +++ b/GoogleTestAdapter/Core/Helpers/Utils.cs @@ -1,8 +1,11 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 9/2017. using System; +using System.Collections.Generic; using System.Globalization; using System.IO; +using System.Linq; +using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -65,6 +68,12 @@ public static bool SpawnAndWait(Action[] actions, int timeoutInMs = Timeout.Infi return Task.WaitAll(tasks, timeoutInMs); } + public static bool BinaryFileContainsStrings(string executable, Encoding encoding, IEnumerable strings) + { + byte[] file = File.ReadAllBytes(executable); + return strings.All(s => file.IndexOf(encoding.GetBytes(s)) >= 0); + } + public static void ValidateRegex(string pattern) { try @@ -73,7 +82,7 @@ public static void ValidateRegex(string pattern) } catch (ArgumentException e) { - throw new Exception($"Invalid regular expression \"{pattern}\", exception message: {e.Message}"); + throw new Exception(String.Format(Resources.InvalidRegularExpression, pattern, e.Message)); } } diff --git a/GoogleTestAdapter/Core/Resources.Designer.cs b/GoogleTestAdapter/Core/Resources.Designer.cs new file mode 100644 index 000000000..60fb8945e --- /dev/null +++ b/GoogleTestAdapter/Core/Resources.Designer.cs @@ -0,0 +1,1355 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GoogleTestAdapter { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GoogleTestAdapter.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Number of actual test case durations: {0}. + /// + internal static string ActualTestCase { + get { + return ResourceManager.GetString("ActualTestCase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Added test case '{0}'. + /// + internal static string AddedTestCase { + get { + return ResourceManager.GetString("AddedTestCase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Test case already in analyzer: {1}. + /// + internal static string AlreadyInAnalyzer { + get { + return ResourceManager.GetString("AlreadyInAnalyzer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Attaching debugger to {0}. + /// + internal static string AttachDebuggerMessage { + get { + return ResourceManager.GetString("AttachDebuggerMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Average difference between expected and actual duration: {0} ms. + /// + internal static string AvgDifference { + get { + return ResourceManager.GetString("AvgDifference", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}{1}: Did not find file: {2}. + /// + internal static string BatchFileMissing { + get { + return ResourceManager.GetString("BatchFileMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}{1}: Exited with code {2}, executed command: '{3}'. + /// + internal static string BatchReturnedExitCode { + get { + return ResourceManager.GetString("BatchReturnedExitCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Misc. + /// + internal static string CategoryMiscName { + get { + return ResourceManager.GetString("CategoryMiscName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parallelization. + /// + internal static string CategoryParallelizationName { + get { + return ResourceManager.GetString("CategoryParallelizationName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Runtime behavior. + /// + internal static string CategoryRuntimeBehaviorName { + get { + return ResourceManager.GetString("CategoryRuntimeBehaviorName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test execution. + /// + internal static string CategoryTestExecutionName { + get { + return ResourceManager.GetString("CategoryTestExecutionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Regexes for trait assignment. + /// + internal static string CategoryTraitsName { + get { + return ResourceManager.GetString("CategoryTraitsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Collected {1} test result(s) from result XML file {2}. + /// + internal static string CollectedResults { + get { + return ResourceManager.GetString("CollectedResults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Collected {1} test results from console output. + /// + internal static string CollectedResultsFromConsole { + get { + return ResourceManager.GetString("CollectedResultsFromConsole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Command executed: '{0} {1}', working directory: '{2}'. + /// + internal static string CommandExecuted { + get { + return ResourceManager.GetString("CommandExecuted", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exceeded maximum allowed command line length ({0}) after including {1} tests (next string length is {2}). + /// + internal static string CommandLineGeneratorError { + get { + return ResourceManager.GetString("CommandLineGeneratorError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not list test cases for executable '{0}': process execution failed with exit code {1}. + /// + internal static string CouldNotListTestCases { + get { + return ResourceManager.GetString("CouldNotListTestCases", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not terminate process {0} started at {1}: {2}. + /// + internal static string CouldNotTerminate { + get { + return ResourceManager.GetString("CouldNotTerminate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to reason is probably a crash of test {0}. + /// + internal static string CrashTest { + get { + return ResourceManager.GetString("CrashTest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to !! This test has probably CRASHED !!. + /// + internal static string CrashText { + get { + return ResourceManager.GetString("CrashText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Created {1} test results for tests which were neither found in result XML file nor in console output. + /// + internal static string CreatedTestResults { + get { + return ResourceManager.GetString("CreatedTestResults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note that due to restrictions of the VS Unit Testing framework, the test executable's output can not be displayed in the test console when debugging tests!. + /// + internal static string DebuggerAttachedOutputMessage { + get { + return ResourceManager.GetString("DebuggerAttachedOutputMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Could not delete test directory '{1}': {2}. + /// + internal static string DeleteTestDir { + get { + return ResourceManager.GetString("DeleteTestDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - directory containing the test executable. + /// + internal static string DescriptionOfExecutableDirPlaceHolder { + get { + return ResourceManager.GetString("DescriptionOfExecutableDirPlaceHolder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - path of a directory which can be used by the tests + ///{1} - id of the thread executing the current tests. + /// + internal static string DescriptionOfPlaceholdersForBatches { + get { + return ResourceManager.GetString("DescriptionOfPlaceholdersForBatches", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - executable containing the tests. + /// + internal static string DescriptionOfPlaceholdersForExecutables { + get { + return ResourceManager.GetString("DescriptionOfPlaceholdersForExecutables", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} - directory of the solution (only available inside Visual Studio). + /// + internal static string DescriptionOfSolutionDirPlaceHolder { + get { + return ResourceManager.GetString("DescriptionOfSolutionDirPlaceHolder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} does not match custom regex {1}. + /// + internal static string DoesntMatchCustom { + get { + return ResourceManager.GetString("DoesntMatchCustom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} does not match default regex {1}. + /// + internal static string DoesntMatchDefault { + get { + return ResourceManager.GetString("DoesntMatchDefault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}<<<<<<<<<<<<<<< End of Output. + /// + internal static string EndOfOutputMessage { + get { + return ResourceManager.GetString("EndOfOutputMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Exception while running tests: {1}. + /// + internal static string ExceptionMessage { + get { + return ResourceManager.GetString("ExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Exception while resolving test locations and traits in {0}\n{1}. + /// + internal static string ExceptionResolving { + get { + return ResourceManager.GetString("ExceptionResolving", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Executable {0} came from another computer and was blocked to help protect this computer.. + /// + internal static string ExecutableError { + get { + return ResourceManager.GetString("ExecutableError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}In particular: launch command prompt, change into directory '{1}', and execute the following command to make sure your tests can be run in general.{2}{3} {4}. + /// + internal static string ExecuteSteps { + get { + return ResourceManager.GetString("ExecuteSteps", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Execution has been cancelled: {1}. + /// + internal static string ExecutionCancelled { + get { + return ResourceManager.GetString("ExecutionCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution is already running with settings for executable {0}, cannot switch to settings for {1}. + /// + internal static string ExecutionString { + get { + return ResourceManager.GetString("ExecutionString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Execution took {1}. + /// + internal static string ExecutionTime { + get { + return ResourceManager.GetString("ExecutionTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} expected durations have been found in actual durations. + /// + internal static string ExpectedDurations { + get { + return ResourceManager.GetString("ExpectedDurations", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number of expected test case durations: {0}. + /// + internal static string ExpectedTestCase { + get { + return ResourceManager.GetString("ExpectedTestCase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Google Test indicator file found for executable {0}. + /// + internal static string FileFound { + get { + return ResourceManager.GetString("FileFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No Google Test indicator file found for executable {0}. + /// + internal static string FileNotFound { + get { + return ResourceManager.GetString("FileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Found {0} test method symbols and {1} trait symbols in binary {2}. + /// + internal static string FoundTestMethod { + get { + return ResourceManager.GetString("FoundTestMethod", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid file {0}. {1}. + /// + internal static string InvalidFile { + get { + return ResourceManager.GetString("InvalidFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid regular expression "{0}", exception message: {1}. + /// + internal static string InvalidRegularExpression { + get { + return ResourceManager.GetString("InvalidRegularExpression", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find source location for test {0}. + /// + internal static string LocationNotFoundError { + get { + return ResourceManager.GetString("LocationNotFoundError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} matches custom regex {1}. + /// + internal static string MatchesCustom { + get { + return ResourceManager.GetString("MatchesCustom", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} matches default regex {1}. + /// + internal static string MatchesDefault { + get { + return ResourceManager.GetString("MatchesDefault", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} must never be < 0. + /// + internal static string NeverBeZero { + get { + return ResourceManager.GetString("NeverBeZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No known test case for test result of line '{0}' - are you repeating a test run, but tests have changed in the meantime?. + /// + internal static string NoKnownTestCaseMessage { + get { + return ResourceManager.GetString("NoKnownTestCaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Command produced no output. + /// + internal static string NoOutput { + get { + return ResourceManager.GetString("NoOutput", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No settings configured for test executable '{0}'; running with solution settings: {1}. + /// + internal static string NoSettingConfigured { + get { + return ResourceManager.GetString("NoSettingConfigured", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note that no test output will be shown on the test console when executing tests concurrently!. + /// + internal static string NoTestOutputShown { + get { + return ResourceManager.GetString("NoTestOutputShown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Nothing to report.. + /// + internal static string NothingToReport { + get { + return ResourceManager.GetString("NothingToReport", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Found {0} tests in executable {1}. + /// + internal static string NumberOfTestsMessage { + get { + return ResourceManager.GetString("NumberOfTestsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Running {0} tests.... + /// + internal static string NumberOfTestsRunningMessage { + get { + return ResourceManager.GetString("NumberOfTestsRunningMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Additional test execution parameters. + /// + internal static string OptionAdditionalTestExecutionParams { + get { + return ResourceManager.GetString("OptionAdditionalTestExecutionParams", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Additional parameters for Google Test executable. Placeholders:. + /// + internal static string OptionAdditionalTestExecutionParamsDescription { + get { + return ResourceManager.GetString("OptionAdditionalTestExecutionParamsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test setup batch file. + /// + internal static string OptionBatchForTestSetup { + get { + return ResourceManager.GetString("OptionBatchForTestSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch file to be executed before test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders:. + /// + internal static string OptionBatchForTestSetupDescription { + get { + return ResourceManager.GetString("OptionBatchForTestSetupDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test teardown batch file. + /// + internal static string OptionBatchForTestTeardown { + get { + return ResourceManager.GetString("OptionBatchForTestTeardown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Batch file to be executed after test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders:. + /// + internal static string OptionBatchForTestTeardownDescription { + get { + return ResourceManager.GetString("OptionBatchForTestTeardownDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Break on failure. + /// + internal static string OptionBreakOnFailure { + get { + return ResourceManager.GetString("OptionBreakOnFailure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If enabled, a potentially attached debugger will catch assertion failures and automatically drop into interactive mode. + ///Google Test option: {0}. + /// + internal static string OptionBreakOnFailureDescription { + get { + return ResourceManager.GetString("OptionBreakOnFailureDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Catch exceptions. + /// + internal static string OptionCatchExceptions { + get { + return ResourceManager.GetString("OptionCatchExceptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Google Test catches exceptions by default; the according test fails and test execution continues. Choosing false lets exceptions pass through, allowing the debugger to catch them. + ///Google Test option: {0}. + /// + internal static string OptionCatchExceptionsDescription { + get { + return ResourceManager.GetString("OptionCatchExceptionsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Print debug info. + /// + internal static string OptionDebugMode { + get { + return ResourceManager.GetString("OptionDebugMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If true, debug output will be printed to the test console.. + /// + internal static string OptionDebugModeDescription { + get { + return ResourceManager.GetString("OptionDebugModeDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parallel test execution. + /// + internal static string OptionEnableParallelTestExecution { + get { + return ResourceManager.GetString("OptionEnableParallelTestExecution", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parallel test execution is achieved by means of different threads, each of which is assigned a number of tests to be executed. The threads will then sequentially invoke the necessary executables to produce the according test results.. + /// + internal static string OptionEnableParallelTestExecutionDescription { + get { + return ResourceManager.GetString("OptionEnableParallelTestExecutionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Terminate processes on cancel. + /// + internal static string OptionKillProcessesOnCancel { + get { + return ResourceManager.GetString("OptionKillProcessesOnCancel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If true, running test executables are actively terminated if the test execution is canceled. Note that terminating a test process might have all kinds of side effects; in particular, Google Test will not be able to perform any shutdown tasks.. + /// + internal static string OptionKillProcessesOnCancelDescription { + get { + return ResourceManager.GetString("OptionKillProcessesOnCancelDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of threads. + /// + internal static string OptionMaxNrOfThreads { + get { + return ResourceManager.GetString("OptionMaxNrOfThreads", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum number of threads to be used for test execution (0: one thread for each processor).. + /// + internal static string OptionMaxNrOfThreadsDescription { + get { + return ResourceManager.GetString("OptionMaxNrOfThreadsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number of test repetitions. + /// + internal static string OptionNrOfTestRepetitions { + get { + return ResourceManager.GetString("OptionNrOfTestRepetitions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Tests will be run for the selected number of times (-1: infinite). + ///Google Test option: {0}. + /// + internal static string OptionNrOfTestRepetitionsDescription { + get { + return ResourceManager.GetString("OptionNrOfTestRepetitionsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parse symbol information. + /// + internal static string OptionParseSymbolInformation { + get { + return ResourceManager.GetString("OptionParseSymbolInformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parse debug symbol information for test executables to obtain source location information and traits (defined via the macros in GTA_Traits.h). + ///If this is set to false, step 2 of traits discovery will be left out and only traits regexes will be effective.. + /// + internal static string OptionParseSymbolInformationDescription { + get { + return ResourceManager.GetString("OptionParseSymbolInformationDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PATH extension. + /// + internal static string OptionPathExtension { + get { + return ResourceManager.GetString("OptionPathExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If non-empty, the content will be appended to the PATH variable of the test execution and discovery processes. + ///Example: C:\MyBins;{0}\MyOtherBins; + ///Placeholders:. + /// + internal static string OptionPathExtensionDescription { + get { + return ResourceManager.GetString("OptionPathExtensionDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Print test output. + /// + internal static string OptionPrintTestOutput { + get { + return ResourceManager.GetString("OptionPrintTestOutput", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Print the output of the Google Test executable(s) to the Tests Output window.. + /// + internal static string OptionPrintTestOutputDescription { + get { + return ResourceManager.GetString("OptionPrintTestOutputDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Also run disabled tests. + /// + internal static string OptionRunDisabledTests { + get { + return ResourceManager.GetString("OptionRunDisabledTests", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If true, all (selected) tests will be run, even if they have been disabled. + ///Google Test option: {0}. + /// + internal static string OptionRunDisabledTestsDescription { + get { + return ResourceManager.GetString("OptionRunDisabledTestsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show release notes after update. + /// + internal static string OptionShowReleaseNotes { + get { + return ResourceManager.GetString("OptionShowReleaseNotes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If true, a dialog with release notes is shown after the extension has been updated.. + /// + internal static string OptionShowReleaseNotesDescription { + get { + return ResourceManager.GetString("OptionShowReleaseNotesDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shuffle tests per execution. + /// + internal static string OptionShuffleTests { + get { + return ResourceManager.GetString("OptionShuffleTests", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If true, tests will be executed in random order. Note that a true randomized order is only given when executing all tests in non-parallel fashion. Otherwise, the test excutables will most likely be executed more than once - random order is than restricted to the according executions. + ///Google Test option: {0}. + /// + internal static string OptionShuffleTestsDescription { + get { + return ResourceManager.GetString("OptionShuffleTestsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shuffle tests: Seed. + /// + internal static string OptionShuffleTestsSeed { + get { + return ResourceManager.GetString("OptionShuffleTestsSeed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 0: Seed is computed from system time, 1<=n<={0}: The given seed is used. See note of option '{1}'. + ///Google Test option: {2}. + /// + internal static string OptionShuffleTestsSeedDescription { + get { + return ResourceManager.GetString("OptionShuffleTestsSeedDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Regex for test discovery. + /// + internal static string OptionTestDiscoveryRegex { + get { + return ResourceManager.GetString("OptionTestDiscoveryRegex", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If non-empty, this regex will be used to discover the Google Test executables containing your tests. + ///Default regex: {0}. + /// + internal static string OptionTestDiscoveryRegexDescription { + get { + return ResourceManager.GetString("OptionTestDiscoveryRegexDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test discovery timeout in s. + /// + internal static string OptionTestDiscoveryTimeoutInSeconds { + get { + return ResourceManager.GetString("OptionTestDiscoveryTimeoutInSeconds", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Number of seconds after which test discovery will be assumed to have failed. 0: Infinite timeout. + /// + internal static string OptionTestDiscoveryTimeoutInSecondsDescription { + get { + return ResourceManager.GetString("OptionTestDiscoveryTimeoutInSecondsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test name separator. + /// + internal static string OptionTestNameSeparator { + get { + return ResourceManager.GetString("OptionTestNameSeparator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test names produced by Google Test might contain the character '/', which makes Visual Studio cut the name after the '/' if the Test Explorer window is not wide enough. This option's value, if non-empty, will replace the '/' character to avoid that behavior. Note that '\', ' ', '|', and '-' produce the same behavior ('.', '_', ':', and '::' are known to work). Note also that traits regexes are evaluated against the tests' display names (and must thus be consistent with this option).. + /// + internal static string OptionTestNameSeparatorDescription { + get { + return ResourceManager.GetString("OptionTestNameSeparatorDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Timestamp output. + /// + internal static string OptionTimestampOutput { + get { + return ResourceManager.GetString("OptionTimestampOutput", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If true, a timestamp is added to test and debug output.. + /// + internal static string OptionTimestampOutputDescription { + get { + return ResourceManager.GetString("OptionTimestampOutputDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Allows to override/add traits for testcases matching a regex. Traits are build up in 3 phases. First, traits are assigned to tests according to the 'Traits before' option. Next, the tests' traits (defined via the macros in GTA_Traits.h) are added to the tests, overriding traits from phase 1 with new values. Finally, the 'Traits after' option is evaluated, again in an overriding manner. + ///Syntax: {0} separates the regex from the traits, the trait's name and value are separated by {1} and each pair of regex an [rest of string was truncated]";. + /// + internal static string OptionTraitsDescription { + get { + return ResourceManager.GetString("OptionTraitsDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to After test discovery. + /// + internal static string OptionTraitsRegexesAfter { + get { + return ResourceManager.GetString("OptionTraitsRegexesAfter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Before test discovery. + /// + internal static string OptionTraitsRegexesBefore { + get { + return ResourceManager.GetString("OptionTraitsRegexesBefore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use new test execution framework (experimental). + /// + internal static string OptionUseNewTestExecutionFramework { + get { + return ResourceManager.GetString("OptionUseNewTestExecutionFramework", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Make use of the new test execution framework. Advantages: test crash detection and test output printing also work in debug mode.. + /// + internal static string OptionUseNewTestExecutionFrameworkDescription { + get { + return ResourceManager.GetString("OptionUseNewTestExecutionFrameworkDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Working directory. + /// + internal static string OptionWorkingDir { + get { + return ResourceManager.GetString("OptionWorkingDir", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If non-empty, will set the working directory for running the tests (default: {0}) + ///Example: {1}\MyTestDir + ///Placeholders:. + /// + internal static string OptionWorkingDirDescription { + get { + return ResourceManager.GetString("OptionWorkingDirDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Output file does not exist, did your tests crash?. + /// + internal static string OutputFileMissing { + get { + return ResourceManager.GetString("OutputFileMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Output of command:. + /// + internal static string OutputOfCommand { + get { + return ResourceManager.GetString("OutputOfCommand", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}>>>>>>>>>>>>>>> Output of command '{1} {2}'. + /// + internal static string OutputOfCommandMessage { + get { + return ResourceManager.GetString("OutputOfCommandMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parallel execution is selected in options, but tests are executed sequentially because debugger is attached.. + /// + internal static string ParallelExecution { + get { + return ResourceManager.GetString("ParallelExecution", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not parse duration in line '{0}'. + /// + internal static string ParseDurationMessage { + get { + return ResourceManager.GetString("ParseDurationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not parse pair '{0}', exception message: {1}. + /// + internal static string ParsePair { + get { + return ResourceManager.GetString("ParsePair", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Process has exited with code {0}. + /// + internal static string ProcessExitCode { + get { + return ResourceManager.GetString("ProcessExitCode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not read test durations: {0}. + /// + internal static string ReadTestDurationError { + get { + return ResourceManager.GetString("ReadTestDurationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Regex '{0}' cannot be parsed: {1}. + /// + internal static string RegexParseError { + get { + return ResourceManager.GetString("RegexParseError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Regex '{0}' timed out: {1}. + /// + internal static string RegexTimedOut { + get { + return ResourceManager.GetString("RegexTimedOut", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Reported {1} test results to Visual Studio during test execution, executable: '{2}'. + /// + internal static string ReportedResultsToVS { + get { + return ResourceManager.GetString("ReportedResultsToVS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Reported {1} test results to Visual Studio, executable: '{2}', duration: {3}. + /// + internal static string ReportedTestResults { + get { + return ResourceManager.GetString("ReportedTestResults", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restoring solution settings: {0}. + /// + internal static string RestoringSolutionSettings { + get { + return ResourceManager.GetString("RestoringSolutionSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test {0}: Expected {1} ms, actual {2} ms. + /// + internal static string Results { + get { + return ResourceManager.GetString("Results", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}{1}: Exception caught, message: '{2}', executed command: '{3}'. + /// + internal static string RunBatchException { + get { + return ResourceManager.GetString("RunBatchException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Failed to run test executable '{1}': {2}. + /// + internal static string RunExecutableError { + get { + return ResourceManager.GetString("RunExecutableError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to >>> Scheduling statistics <<<. + /// + internal static string SchedulingStats { + get { + return ResourceManager.GetString("SchedulingStats", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Settings for test executable '{0}': {1}. + /// + internal static string SettingsMessage { + get { + return ResourceManager.GetString("SettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SettingsWrapper is already running with settings for an executable on thread '{0}', cannot also be used by thread '{1}'. + /// + internal static string SettingsWrapperString { + get { + return ResourceManager.GetString("SettingsWrapperString", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Stack trace:{1}{2}. + /// + internal static string StackTrace { + get { + return ResourceManager.GetString("StackTrace", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Standard deviation: {0} ms. + /// + internal static string StandardDeviation { + get { + return ResourceManager.GetString("StandardDeviation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}{1}: Successfully ran '{2}'. + /// + internal static string SuccessfullyRun { + get { + return ResourceManager.GetString("SuccessfullyRun", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Terminated process {0} started at {1}. + /// + internal static string TerminatedProcess { + get { + return ResourceManager.GetString("TerminatedProcess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test case already in analyzer: {0}. + /// + internal static string TestCaseInAnalyzer { + get { + return ResourceManager.GetString("TestCaseInAnalyzer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}{1} test cases seem to not have been run - are you repeating a test run, but tests have changed in the meantime? Test cases:{2}{3}. + /// + internal static string TestCaseNotRun { + get { + return ResourceManager.GetString("TestCaseNotRun", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test whether the following commands can be executed sucessfully on the command line (make sure all required binaries are on the PATH):{0}{1}. + /// + internal static string TestCommandCanBeRun { + get { + return ResourceManager.GetString("TestCommandCanBeRun", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test discovery was cancelled after {0} s for executable {1}. + /// + internal static string TestDiscoveryCancelled { + get { + return ResourceManager.GetString("TestDiscoveryCancelled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test output:. + /// + internal static string TestOutput { + get { + return ResourceManager.GetString("TestOutput", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test result file {0} could not be parsed (completely) - your test executable has probably crashed. Exception message: {1}. + /// + internal static string TestResultParse { + get { + return ResourceManager.GetString("TestResultParse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test setup batch file. + /// + internal static string TestSetupBatchFile { + get { + return ResourceManager.GetString("TestSetupBatchFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Test teardown batch file. + /// + internal static string TestTeardownBatchFile { + get { + return ResourceManager.GetString("TestTeardownBatchFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Executing tests on {0} threads. + /// + internal static string ThreadExecutionMessage { + get { + return ResourceManager.GetString("ThreadExecutionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown literal: {0}. + /// + internal static string UnknownLiteral { + get { + return ResourceManager.GetString("UnknownLiteral", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unknown test case status: {0}. + /// + internal static string UnknownTestCase { + get { + return ResourceManager.GetString("UnknownTestCase", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Using splitter based on test durations. + /// + internal static string UsingSplitterOnDuration { + get { + return ResourceManager.GetString("UsingSplitterOnDuration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Using splitter based on number of tests. + /// + internal static string UsingSplitterOnNumber { + get { + return ResourceManager.GetString("UsingSplitterOnNumber", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} worst differences:. + /// + internal static string WorstDifferences { + get { + return ResourceManager.GetString("WorstDifferences", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlNode could not be parsed: '{0}'. Exception message: {1}. + /// + internal static string XmlNodeParse { + get { + return ResourceManager.GetString("XmlNodeParse", resourceCulture); + } + } + } +} diff --git a/GoogleTestAdapter/Core/Resources.resx b/GoogleTestAdapter/Core/Resources.resx new file mode 100644 index 000000000..0b6703a94 --- /dev/null +++ b/GoogleTestAdapter/Core/Resources.resx @@ -0,0 +1,653 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Number of actual test case durations: {0} + {0} represents a number (e.g. 5) + + + Added test case '{0}' + {0} represents an unlocalized test name (e.g. "TestSuite1.Test2") + + + {0}Test case already in analyzer: {1} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents an unlocalized test name (e.g. "TestSuite1.Test2") + + + Attaching debugger to {0} + {0} represents an unlocalized command to which debugger attaches (e.g. cmd.exe) + + + Average difference between expected and actual duration: {0} ms + {0} represents a number (e.g. 5) + + + {0}{1}: Did not find file: {2} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} is TestSetupBatchFile or TestTeardownBatchFile string, {2} represents unlocalized file path (e.g c:\test\foo.bat) + + + {0}{1}: Exited with code {2}, executed command: '{3}' + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} is TestSetupBatchFile or TestTeardownBatchFile string, {2} represents a number (e.g. 5), {3} represents unlocalized file path (e.g c:\test\foo.bat) + + + Misc + + + Parallelization + + + Runtime behavior + + + Test execution + + + Regexes for trait assignment + + + {0}Collected {1} test result(s) from result XML file {2} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5), {2} represents unlocalized file path (e.g c:\test\results.xml) + + + {0}Collected {1} test results from console output + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5) + + + Command executed: '{0} {1}', working directory: '{2}' + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents unlocalized options to test (e.g. "gtest_list_tests"), {2} represents unlocalized directory path (e.g c:\test\dir) + + + Exceeded maximum allowed command line length ({0}) after including {1} tests (next string length is {2}) + {0} represents a number (e.g. 5), {1} represents a number (e.g. 5), {2} represents a number (e.g. 5) + + + Could not list test cases for executable '{0}': process execution failed with exit code {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} is a number + + + Could not terminate process {0} started at {1}: {2} + {0} represents an unlocalized process name (e.g notepad.exe), {1} represents unlocalized string for time (e.g. "3/1/2008 7:00:00 AM"), {2} represents localized exception message (e.g. "Cannot load file") + + + reason is probably a crash of test {0} + {0} represents an unlocalized name of test (e.g. foo) + + + !! This test has probably CRASHED !! + The exclamation points and all-caps are for emphasis. + + + {0}Created {1} test results for tests which were neither found in result XML file nor in console output + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5) + + + Note that due to restrictions of the VS Unit Testing framework, the test executable's output can not be displayed in the test console when debugging tests! + + + {0}Could not delete test directory '{1}': {2} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents unlocalized directory path (e.g c:\test\dir), {2} represents localized exception message (e.g. "Cannot load file") + + + {0} - directory containing the test executable + {0} represents a directory containing a test executable + + + {0} - path of a directory which can be used by the tests +{1} - id of the thread executing the current tests + {0} represents a directory. {1} represents a thread id. + + + {0} - executable containing the tests + {0} represents the path of a test executable + + + {0} - directory of the solution (only available inside Visual Studio) + {0} represents a directory containing a solution file + + + {0} does not match custom regex {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents unlocalized string for regular expression (e.g ".*a.exe") + + + {0} does not match default regex {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents unlocalized string for regular expression (e.g ".*a.exe") + + + {0}<<<<<<<<<<<<<<< End of Output + {0} is empty or a name of a thread followed by space (e.g. "[T0] ") + + + {0}Exception while running tests: {1} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents localized exception message (e.g. "Cannot load file") + + + Exception while resolving test locations and traits in {0}\n{1} + {0} represents an unlocalized binary name (e.g notepad.exe), {1} represents localized exception message (e.g. "Cannot load file") + + + Executable {0} came from another computer and was blocked to help protect this computer. + {0} represents an unlocalized name of executable (e.g. cmd.exe) file + + + {0}In particular: launch command prompt, change into directory '{1}', and execute the following command to make sure your tests can be run in general.{2}{3} {4} + This sentence is continuation of TroubleShootingLink string from Common.Dynamic.TAfGT resources file. {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents unlocalized directory path (e.g c:\test\dir), {2} represents an unlocalized new line string (e.g "\n"), {3} is a name of an executable (e.g. foo.exe), {4} are parameters passed to the executable (e.g. /bar) + + + {0}Execution has been cancelled: {1} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents localized exception message (e.g. "Cannot load file") + + + Execution is already running with settings for executable {0}, cannot switch to settings for {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents an unlocalized name of executable (e.g. cmd.exe) file + + + {0}Execution took {1} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents unlocalized string for time it took (e.g. "0:00:02.0504161") + + + {0} expected durations have been found in actual durations + {0} represents a number (e.g. 5) + + + Number of expected test case durations: {0} + {0} represents a number (e.g. 5) + + + Google Test indicator file found for executable {0} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file + + + No Google Test indicator file found for executable {0} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file + + + Found {0} test method symbols and {1} trait symbols in binary {2} + {0} represents a number (e.g. 5), {1} represents a number (e.g. 5), {2} represents an unlocalized binary name (e.g notepad.exe) + + + Invalid file {0}. {1} + {0} represents an unlocalized file name (e.g. c:\foo.exe.gta.testdurations), {1} represents localized exception message (e.g. "Cannot load file") + + + Invalid regular expression "{0}", exception message: {1} + {0} represents an unlocalized regex (e.g. "abc*d+e*"), {1} represents localized exception message (e.g. "Cannot load file") + + + Could not find source location for test {0} + {0} represents an unlocalized test name (e.g. "TestSuite1.Test2") + + + {0} matches custom regex {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents unlocalized string for regular expression (e.g ".*a.exe") + + + {0} matches default regex {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents unlocalized string for regular expression (e.g ".*a.exe") + + + {0} must never be < 0 + {0} represents an unlocalized string for name of variable (e.g. _nrOfRunningExecutions) + + + No known test case for test result of line '{0}' - are you repeating a test run, but tests have changed in the meantime? + {0} represents an unlocalized string for line in test + + + Command produced no output + + + No settings configured for test executable '{0}'; running with solution settings: {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents a comma-separated list of setting properties + + + Note that no test output will be shown on the test console when executing tests concurrently! + + + Nothing to report. + + + Found {0} tests in executable {1} + {0} represents a number (e.g. 5), {1} represents an unlocalized binary name (e.g notepad.exe) + + + Running {0} tests... + {0} represents a number (e.g. 5) + + + Additional test execution parameters + + + Additional parameters for Google Test executable. Placeholders: + Followed by a list of placeholders. + + + Test setup batch file + + + Batch file to be executed before test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders: + Followed by a list of placeholders. + + + Test teardown batch file + + + Batch file to be executed after test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders: + Followed by a list of placeholders. + + + Break on failure + + + If enabled, a potentially attached debugger will catch assertion failures and automatically drop into interactive mode. +Google Test option: {0} + {0} represents a command-line flag. + + + Catch exceptions + + + Google Test catches exceptions by default; the according test fails and test execution continues. Choosing false lets exceptions pass through, allowing the debugger to catch them. +Google Test option: {0} + {0} represents a command-line flag. + + + Print debug info + + + If true, debug output will be printed to the test console. + + + Parallel test execution + + + Parallel test execution is achieved by means of different threads, each of which is assigned a number of tests to be executed. The threads will then sequentially invoke the necessary executables to produce the according test results. + + + Terminate processes on cancel + + + If true, running test executables are actively terminated if the test execution is canceled. Note that terminating a test process might have all kinds of side effects; in particular, Google Test will not be able to perform any shutdown tasks. + + + Maximum number of threads + + + Maximum number of threads to be used for test execution (0: one thread for each processor). + + + Number of test repetitions + + + Tests will be run for the selected number of times (-1: infinite). +Google Test option: {0} + {0} represents a command-line flag. + + + Parse symbol information + + + Parse debug symbol information for test executables to obtain source location information and traits (defined via the macros in GTA_Traits.h). +If this is set to false, step 2 of traits discovery will be left out and only traits regexes will be effective. + + + PATH extension + PATH represents an environment variable and should not be localized + + + If non-empty, the content will be appended to the PATH variable of the test execution and discovery processes. +Example: C:\MyBins;{0}\MyOtherBins; +Placeholders: + {0} represents a directory. Followed by a list of placeholders. + + + Print test output + + + Print the output of the Google Test executable(s) to the Tests Output window. + + + Also run disabled tests + + + If true, all (selected) tests will be run, even if they have been disabled. +Google Test option: {0} + {0} represents a command-line flag. + + + Show release notes after update + + + If true, a dialog with release notes is shown after the extension has been updated. + + + Shuffle tests per execution + + + If true, tests will be executed in random order. Note that a true randomized order is only given when executing all tests in non-parallel fashion. Otherwise, the test excutables will most likely be executed more than once - random order is than restricted to the according executions. +Google Test option: {0} + {0} represents a command-line flag. + + + Shuffle tests: Seed + + + 0: Seed is computed from system time, 1<=n<={0}: The given seed is used. See note of option '{1}'. +Google Test option: {2} + {0} is an integer representing the maximum value of a seed. {1} represents the localized name of another option. {2} represents a command-line flag. + + + Regex for test discovery + + + If non-empty, this regex will be used to discover the Google Test executables containing your tests. +Default regex: {0} + {0} represents a regular expression + + + Test discovery timeout in s + "s" stands for seconds + + + Number of seconds after which test discovery will be assumed to have failed. 0: Infinite timeout + + + Test name separator + + + Test names produced by Google Test might contain the character '/', which makes Visual Studio cut the name after the '/' if the Test Explorer window is not wide enough. This option's value, if non-empty, will replace the '/' character to avoid that behavior. Note that '\', ' ', '|', and '-' produce the same behavior ('.', '_', ':', and '::' are known to work). Note also that traits regexes are evaluated against the tests' display names (and must thus be consistent with this option). + + + Timestamp output + + + If true, a timestamp is added to test and debug output. + + + Allows to override/add traits for testcases matching a regex. Traits are build up in 3 phases. First, traits are assigned to tests according to the 'Traits before' option. Next, the tests' traits (defined via the macros in GTA_Traits.h) are added to the tests, overriding traits from phase 1 with new values. Finally, the 'Traits after' option is evaluated, again in an overriding manner. +Syntax: {0} separates the regex from the traits, the trait's name and value are separated by {1} and each pair of regex and trait is separated by {2}. +Example: MySuite\.*{0}Type{1}Small{2}MySuite2\.*|MySuite3\.*{0}Type{1}Medium + {0} represents a string used to separate a regex from its traits. {1} represents a string used to separate names and values. {2} represents a string used to separate regexs. + + + After test discovery + + + Before test discovery + + + Use new test execution framework (experimental) + + + Make use of the new test execution framework. Advantages: test crash detection and test output printing also work in debug mode. + + + Working directory + + + If non-empty, will set the working directory for running the tests (default: {0}) +Example: {1}\MyTestDir +Placeholders: + {0} represents the default value of the working directory. {1} represents the directory containing the solution file. Followed by a list of placeholders. + + + Output file does not exist, did your tests crash? + + + Output of command: + Followed by standard output from the command ran + + + {0}>>>>>>>>>>>>>>> Output of command '{1} {2}' + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents unlocalized command (e.g. cmd.exe), {2} represents unlocalized paramaters to executable (e.g. "/C exit 2") + + + Parallel execution is selected in options, but tests are executed sequentially because debugger is attached. + + + Could not parse duration in line '{0}' + {0} represents the line text + + + Could not parse pair '{0}', exception message: {1} + {0} is regex pair, {1} represents localized exception message (e.g. "Cannot load file") + + + Process has exited with code {0} + {0} represents a number (e.g. 5) + + + Could not read test durations: {0} + {0} represents localized exception message (e.g. "Cannot load file") + + + Regex '{0}' cannot be parsed: {1} + {0} represents unlocalized regex pattern used (e.g. ab*d+), {1} represents localized exception message (e.g. "Cannot load file") + + + Regex '{0}' timed out: {1} + {0} represents unlocalized regex pattern used (e.g. ab*d+), {1} represents localized exception message (e.g. "Cannot load file") + + + {0}Reported {1} test results to Visual Studio during test execution, executable: '{2}' + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5), {2} represents an unlocalized name of executable (e.g. cmd.exe) file + + + {0}Reported {1} test results to Visual Studio, executable: '{2}', duration: {3} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5), {2} represents an unlocalized name of executable (e.g. cmd.exe) file, {3} means stopwatch time + + + Restoring solution settings: {0} + {0} represents a comma-separated list of setting properties + + + Test {0}: Expected {1} ms, actual {2} ms + {0} represents an unlocalized name of a test (e.g. foo), {1} represents a number (e.g. 5), {2} represents a number (e.g. 5) + + + {0}{1}: Exception caught, message: '{2}', executed command: '{3}' + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} is TestSetupBatchFile or TestTeardownBatchFile string, {2} represents localized exception message (e.g. "Cannot load file"), {3} represents unlocalized file path (e.g c:\test\foo.bat) + + + {0}Failed to run test executable '{1}': {2} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents an unlocalized name of executable (e.g. cmd.exe) file, {2} represents localized exception message (e.g. "Cannot load file") + + + >>> Scheduling statistics <<< + + + Settings for test executable '{0}': {1} + {0} represents an unlocalized name of executable (e.g. cmd.exe) file, {1} represents an unlocalized settings string + + + SettingsWrapper is already running with settings for an executable on thread '{0}', cannot also be used by thread '{1}' + {0} is a name of a thread (e.g. "T0"), {1} is a name of a thread (e.g. "T0") + + + {0}Stack trace:{1}{2} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} means new line string, {2} represents unlocalized exception stack trace + + + Standard deviation: {0} ms + {0} represents the standardDeviation for statistics to debug output + + + {0}{1}: Successfully ran '{2}' + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} is TestSetupBatchFile or TestTeardownBatchFile string, {2} represents unlocalized file path (e.g c:\test\foo.bat) + + + Terminated process {0} started at {1} + {0} represents an unlocalized process name (e.g notepad.exe), {1} represents unlocalized string for time (e.g. "3/1/2008 7:00:00 AM") + + + Test case already in analyzer: {0} + {0} represents an unlocalized string for test name (e.g. "TestSuite1.Test2") + + + {0}{1} test cases seem to not have been run - are you repeating a test run, but tests have changed in the meantime? Test cases:{2}{3} + {0} is empty or a name of a thread followed by space (e.g. "[T0] "), {1} represents a number (e.g. 5), {2} represents an unlocalized new line string (e.g "\n"), {3} is a new-line separated list of unlocalized test case names + + + Test whether the following commands can be executed sucessfully on the command line (make sure all required binaries are on the PATH):{0}{1} + {0} represents an unlocalized new line string (e.g "\n"), {1} is a new-line separated sequence of commands + + + Test discovery was cancelled after {0} s for executable {1} + {0} represents a number (e.g. 5), {1} represents an unlocalized name of executable (e.g. cmd.exe) file + + + Test output: + Followed by the output of a test case + + + Test result file {0} could not be parsed (completely) - your test executable has probably crashed. Exception message: {1} + {0} represents unlocalized file path (e.g c:\test\results.xml), {1} represents localized exception message (e.g. "Cannot load file") + + + Test setup batch file + + + Test teardown batch file + + + Executing tests on {0} threads + {0} represents a number (e.g. 5) + + + Unknown literal: {0} + {0} is a name of enum literal + + + Unknown test case status: {0} + {0} represents an unlocalized status of test (e.g. "run" or "notrun") + + + Using splitter based on test durations + + + Using splitter based on number of tests + + + {0} worst differences: + {0} represents a number (e.g. 5) + + + XmlNode could not be parsed: '{0}'. Exception message: {1} + {0} represents an unlocalized name of an XML node, {1} represents localized exception message (e.g. "Cannot load file") + + \ No newline at end of file diff --git a/GoogleTestAdapter/Core/Runners/CommandLineGenerator.cs b/GoogleTestAdapter/Core/Runners/CommandLineGenerator.cs index 4623a4562..f999094e7 100644 --- a/GoogleTestAdapter/Core/Runners/CommandLineGenerator.cs +++ b/GoogleTestAdapter/Core/Runners/CommandLineGenerator.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 8/2017. + +using System; using System.Collections.Generic; using System.Linq; using GoogleTestAdapter.Helpers; @@ -117,8 +119,7 @@ private string JoinTestsUpToMaxLength(List testCases, int maxLength, o string nextTest = testCases[0].FullyQualifiedName; if (nextTest.Length > maxLength) { - throw new Exception("CommandLineGenerator: I can not deal with this case :-( - maxLength=" + maxLength + - ", includedTestCases.Count=" + includedTestCases.Count + ", nextTest.Length=" + nextTest.Length); + throw new Exception(String.Format(Resources.CommandLineGeneratorError, maxLength, includedTestCases.Count, nextTest.Length)); } while (result.Length + nextTest.Length <= maxLength && testCases.Count > 0) diff --git a/GoogleTestAdapter/Core/Runners/ParallelTestRunner.cs b/GoogleTestAdapter/Core/Runners/ParallelTestRunner.cs index 75a2164aa..a18b83e93 100644 --- a/GoogleTestAdapter/Core/Runners/ParallelTestRunner.cs +++ b/GoogleTestAdapter/Core/Runners/ParallelTestRunner.cs @@ -1,5 +1,6 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 5/2018. +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -70,8 +71,8 @@ private void RunTests(IEnumerable testCasesToRun, string baseDir, List ITestsSplitter splitter = GetTestsSplitter(testCasesToRunAsArray); List> splittedTestCasesToRun = splitter.SplitTestcases(); - _logger.LogInfo("Executing tests on " + splittedTestCasesToRun.Count + " threads"); - _logger.DebugInfo("Note that no test output will be shown on the test console when executing tests concurrently!"); + _logger.LogInfo(string.Format(Resources.ThreadExecutionMessage, splittedTestCasesToRun.Count)); + _logger.DebugInfo(Resources.NoTestOutputShown); int threadId = 0; foreach (List testcases in splittedTestCasesToRun) @@ -97,24 +98,24 @@ private ITestsSplitter GetTestsSplitter(TestCase[] testCasesToRun) foreach (KeyValuePair duration in durations) { if (!_schedulingAnalyzer.AddExpectedDuration(duration.Key, duration.Value)) - _logger.DebugWarning("TestCase already in analyzer: " + duration.Key.FullyQualifiedName); + _logger.DebugWarning(String.Format(Resources.TestCaseInAnalyzer, duration.Key.FullyQualifiedName)); } } catch (InvalidTestDurationsException e) { - _logger.LogWarning($"Could not read test durations: {e.Message}"); + _logger.LogWarning(string.Format(Resources.ReadTestDurationError, e.Message)); } ITestsSplitter splitter; if (durations == null || durations.Count < testCasesToRun.Length) { splitter = new NumberBasedTestsSplitter(testCasesToRun, _settings); - _logger.DebugInfo("Using splitter based on number of tests"); + _logger.DebugInfo(Resources.UsingSplitterOnNumber); } else { splitter = new DurationBasedTestsSplitter(durations, _settings); - _logger.DebugInfo("Using splitter based on test durations"); + _logger.DebugInfo(Resources.UsingSplitterOnDuration); } return splitter; diff --git a/GoogleTestAdapter/Core/Runners/PreparingTestRunner.cs b/GoogleTestAdapter/Core/Runners/PreparingTestRunner.cs index cfe469099..5b335f46a 100644 --- a/GoogleTestAdapter/Core/Runners/PreparingTestRunner.cs +++ b/GoogleTestAdapter/Core/Runners/PreparingTestRunner.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 5/2018. + +using System; using System.IO; using System.Collections.Generic; using System.Diagnostics; @@ -13,8 +15,11 @@ namespace GoogleTestAdapter.Runners { public class PreparingTestRunner : ITestRunner { - public const string TestSetup = "Test setup"; - public const string TestTeardown = "Test teardown"; + private enum BatchType + { + TestSetup, + TestTeardown + } private readonly ILogger _logger; private readonly SettingsWrapper _settings; @@ -57,27 +62,26 @@ public void RunTests(IEnumerable testCasesToRun, string baseDir, string batch = _settings.GetBatchForTestSetup(_solutionDirectory, testDirectory, _threadId); batch = batch == "" ? "" : _solutionDirectory + batch; - SafeRunBatch(TestSetup, _solutionDirectory, batch, isBeingDebugged); + SafeRunBatch(BatchType.TestSetup, _solutionDirectory, batch, isBeingDebugged); _innerTestRunner.RunTests(testCasesToRun, baseDir, workingDir, userParameters, isBeingDebugged, debuggedLauncher, executor); batch = _settings.GetBatchForTestTeardown(_solutionDirectory, testDirectory, _threadId); batch = batch == "" ? "" : _solutionDirectory + batch; - SafeRunBatch(TestTeardown, _solutionDirectory, batch, isBeingDebugged); + SafeRunBatch(BatchType.TestTeardown, _solutionDirectory, batch, isBeingDebugged); stopwatch.Stop(); - _logger.DebugInfo($"{_threadName}Execution took {stopwatch.Elapsed}"); + _logger.DebugInfo(String.Format(Resources.ExecutionTime, _threadName, stopwatch.Elapsed)); string errorMessage; if (!Utils.DeleteDirectory(testDirectory, out errorMessage)) { - _logger.DebugWarning( - $"{_threadName}Could not delete test directory '" + testDirectory + "': " + errorMessage); + _logger.DebugWarning(String.Format(Resources.DeleteTestDir, _threadName, testDirectory, errorMessage)); } } catch (Exception e) { - _logger.LogError($"{_threadName}Exception while running tests: " + e); + _logger.LogError(String.Format(Resources.ExceptionMessage, _threadName, e)); } } @@ -87,15 +91,17 @@ public void Cancel() } - private void SafeRunBatch(string batchType, string workingDirectory, string batch, bool isBeingDebugged) + private void SafeRunBatch(BatchType batchType, string workingDirectory, string batch, bool isBeingDebugged) { + string batchTypeString = (batchType == BatchType.TestSetup) ? Resources.TestSetupBatchFile : Resources.TestTeardownBatchFile; + if (string.IsNullOrEmpty(batch)) { return; } if (!File.Exists(batch)) { - _logger.LogError($"{_threadName}Did not find " + batchType.ToLower() + " batch file: " + batch); + _logger.LogError(String.Format(Resources.BatchFileMissing, _threadName, batchTypeString, batch)); return; } @@ -105,13 +111,14 @@ private void SafeRunBatch(string batchType, string workingDirectory, string batc } catch (Exception e) { - _logger.LogError( - $"{_threadName}{batchType} batch caused exception, msg: \'{e.Message}\', executed command: \'{batch}\'"); + _logger.LogError(String.Format(Resources.RunBatchException, _threadName, batchTypeString, e.Message, batch)); } } - private void RunBatch(string batchType, string workingDirectory, string batch, bool isBeingDebugged) + private void RunBatch(BatchType batchType, string workingDirectory, string batch, bool isBeingDebugged) { + string batchTypeString = (batchType == BatchType.TestSetup) ? Resources.TestSetupBatchFile : Resources.TestTeardownBatchFile; + int batchExitCode; if (_settings.UseNewTestExecutionFramework) { @@ -121,18 +128,16 @@ private void RunBatch(string batchType, string workingDirectory, string batch, b else { new TestProcessLauncher(_logger, _settings, isBeingDebugged).GetOutputOfCommand( - workingDirectory, batch, "", false, false, null, out batchExitCode); + workingDirectory, null, batch, "", false, false, null, out batchExitCode); } if (batchExitCode == 0) { - _logger.DebugInfo( - $"{_threadName}Successfully ran {batchType} batch \'{batch}\'"); + _logger.DebugInfo(String.Format(Resources.SuccessfullyRun, _threadName, batchTypeString, batch)); } else { - _logger.LogWarning( - $"{_threadName}{batchType} batch returned exit code {batchExitCode}, executed command: \'{batch}\'"); + _logger.LogWarning(String.Format(Resources.BatchReturnedExitCode, _threadName, batchTypeString, batchExitCode, batch)); } } diff --git a/GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs b/GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs index f6d78563e..d2a5278ab 100644 --- a/GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs +++ b/GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 1/2021. using System; using System.Collections.Generic; @@ -55,14 +55,46 @@ public void RunTests(IEnumerable testCasesToRun, string baseDir, _settings.ExecuteWithSettingsForExecutable(executable, () => { - RunTestsFromExecutable( - executable, - finalWorkingDir, - groupedTestCases[executable], - finalParameters, - isBeingDebugged, - debuggedLauncher, - executor); + var testsWithNoTestPropertySettings = groupedTestCases[executable]; + + if (_settings.TestPropertySettingsContainer != null) + { + testsWithNoTestPropertySettings = new List(); + + foreach (var testCase in groupedTestCases[executable]) + { + ITestPropertySettings settings; + if (_settings.TestPropertySettingsContainer.TryGetSettings(testCase.FullyQualifiedName, out settings)) + { + RunTestsFromExecutable( + executable, + settings.WorkingDirectory, + settings.Environment, + Enumerable.Repeat(testCase, 1), + finalParameters, + isBeingDebugged, + debuggedLauncher, + executor); + } + else + { + testsWithNoTestPropertySettings.Add(testCase); + } + } + } + + if (testsWithNoTestPropertySettings.Count != 0) + { + RunTestsFromExecutable( + executable, + finalWorkingDir, + null, + testsWithNoTestPropertySettings, + finalParameters, + isBeingDebugged, + debuggedLauncher, + executor); + } }, _logger); } @@ -80,7 +112,7 @@ public void Cancel() // ReSharper disable once UnusedParameter.Local - private void RunTestsFromExecutable(string executable, string workingDir, + private void RunTestsFromExecutable(string executable, string workingDir, IDictionary envVars, IEnumerable testCasesToRun, string userParameters, bool isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher, IProcessExecutor executor) { @@ -95,7 +127,7 @@ private void RunTestsFromExecutable(string executable, string workingDir, break; } var streamingParser = new StreamingStandardOutputTestResultParser(arguments.TestCases, _logger, _frameworkReporter); - var results = RunTests(executable, workingDir, isBeingDebugged, debuggedLauncher, arguments, resultXmlFile, executor, streamingParser).ToArray(); + var results = RunTests(executable, workingDir, envVars, isBeingDebugged, debuggedLauncher, arguments, resultXmlFile, executor, streamingParser).ToArray(); try { @@ -104,11 +136,11 @@ private void RunTestsFromExecutable(string executable, string workingDir, _frameworkReporter.ReportTestResults(results); stopwatch.Stop(); if (results.Length > 0) - _logger.DebugInfo($"{_threadName}Reported {results.Length} test results to VS, executable: '{executable}', duration: {stopwatch.Elapsed}"); + _logger.DebugInfo(String.Format(Resources.ReportedTestResults, _threadName, results.Length, executable, stopwatch.Elapsed)); } catch (TestRunCanceledException e) { - _logger.DebugInfo($"{_threadName}Execution has been canceled: {e.InnerException?.Message ?? e.Message}"); + _logger.DebugInfo(String.Format(Resources.ExecutionCancelled, _threadName, e.InnerException?.Message ?? e.Message)); Cancel(); } @@ -116,17 +148,17 @@ private void RunTestsFromExecutable(string executable, string workingDir, foreach (TestResult result in results) { if (!_schedulingAnalyzer.AddActualDuration(result.TestCase, (int)result.Duration.TotalMilliseconds)) - _logger.DebugWarning("TestCase already in analyzer: " + result.TestCase.FullyQualifiedName); + _logger.DebugWarning(String.Format(Resources.TestCaseInAnalyzer, result.TestCase.FullyQualifiedName)); } } } - private IEnumerable RunTests(string executable, string workingDir, bool isBeingDebugged, + private IEnumerable RunTests(string executable, string workingDir, IDictionary envVars, bool isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher, CommandLineGenerator.Args arguments, string resultXmlFile, IProcessExecutor executor, StreamingStandardOutputTestResultParser streamingParser) { try { - return TryRunTests(executable, workingDir, isBeingDebugged, debuggedLauncher, arguments, resultXmlFile, executor, streamingParser); + return TryRunTests(executable, workingDir, envVars, isBeingDebugged, debuggedLauncher, arguments, resultXmlFile, executor, streamingParser); } catch (Exception e) { @@ -137,15 +169,13 @@ private IEnumerable RunTests(string executable, string workingDir, b public static void LogExecutionError(ILogger logger, string executable, string workingDir, string arguments, Exception exception, string threadName = "") { - logger.LogError($"{threadName}Failed to run test executable '{executable}': {exception.Message}"); - logger.DebugError($@"{threadName}Stacktrace:{Environment.NewLine}{exception.StackTrace}"); - logger.LogError( - $"{threadName}{Strings.Instance.TroubleShootingLink}"); - logger.LogError( - $"{threadName}In particular: launch command prompt, change into directory '{workingDir}', and execute the following command to make sure your tests can be run in general.{Environment.NewLine}{executable} {arguments}"); + logger.LogError(String.Format(Resources.RunExecutableError, threadName, executable, exception.Message)); + logger.DebugError(String.Format(Resources.StackTrace, threadName, Environment.NewLine, exception.StackTrace)); + logger.LogError(String.Format(CommonResources.TroubleShootingLink, threadName)); + logger.LogError(String.Format(Resources.ExecuteSteps, threadName, workingDir, Environment.NewLine, executable, arguments)); } - private IEnumerable TryRunTests(string executable, string workingDir, bool isBeingDebugged, + private IEnumerable TryRunTests(string executable, string workingDir, IDictionary envVars, bool isBeingDebugged, IDebuggedProcessLauncher debuggedLauncher, CommandLineGenerator.Args arguments, string resultXmlFile, IProcessExecutor executor, StreamingStandardOutputTestResultParser streamingParser) { @@ -153,13 +183,13 @@ private IEnumerable TryRunTests(string executable, string workingDir if (_settings.UseNewTestExecutionFramework) { DebugUtils.AssertIsNotNull(executor, nameof(executor)); - consoleOutput = RunTestExecutableWithNewFramework(executable, workingDir, arguments, executor, streamingParser); + consoleOutput = RunTestExecutableWithNewFramework(executable, workingDir, envVars, arguments, executor, streamingParser); } else { _processLauncher = new TestProcessLauncher(_logger, _settings, isBeingDebugged); consoleOutput = - _processLauncher.GetOutputOfCommand(workingDir, executable, arguments.CommandLine, + _processLauncher.GetOutputOfCommand(workingDir, envVars, executable, arguments.CommandLine, _settings.PrintTestOutput && !_settings.ParallelTestExecution, false, debuggedLauncher); } @@ -173,7 +203,8 @@ private IEnumerable TryRunTests(string executable, string workingDir return testResults; } - private List RunTestExecutableWithNewFramework(string executable, string workingDir, CommandLineGenerator.Args arguments, IProcessExecutor executor, + private List RunTestExecutableWithNewFramework(string executable, string workingDir, IDictionary envVars, + CommandLineGenerator.Args arguments, IProcessExecutor executor, StreamingStandardOutputTestResultParser streamingParser) { string pathExtension = _settings.GetPathExtension(executable); @@ -181,8 +212,7 @@ private List RunTestExecutableWithNewFramework(string executable, string !_settings.ParallelTestExecution; if (printTestOutput) - _logger.LogInfo( - $"{_threadName}>>>>>>>>>>>>>>> Output of command '" + executable + " " + arguments.CommandLine + "'"); + _logger.LogInfo(String.Format(Resources.OutputOfCommandMessage, _threadName, executable, arguments.CommandLine)); Action reportOutputAction = line => { @@ -196,27 +226,27 @@ private List RunTestExecutableWithNewFramework(string executable, string } catch (TestRunCanceledException e) { - _logger.DebugInfo($"{_threadName}Execution has been canceled: {e.InnerException?.Message ?? e.Message}"); + _logger.DebugInfo(String.Format(Resources.ExecutionCancelled, _threadName, e.InnerException?.Message ?? e.Message)); Cancel(); } }; _processExecutor = executor; _processExecutor.ExecuteCommandBlocking( - executable, arguments.CommandLine, workingDir, pathExtension, + executable, arguments.CommandLine, workingDir, envVars, pathExtension, reportOutputAction); streamingParser.Flush(); if (printTestOutput) - _logger.LogInfo($"{_threadName}<<<<<<<<<<<<<<< End of Output"); + _logger.LogInfo(String.Format(Resources.EndOfOutputMessage, _threadName)); var consoleOutput = new List(); new TestDurationSerializer().UpdateTestDurations(streamingParser.TestResults); - _logger.DebugInfo( - $"{_threadName}Reported {streamingParser.TestResults.Count} test results to VS during test execution, executable: '{executable}'"); + _logger.DebugInfo(String.Format(Resources.ReportedResultsToVS, _threadName, streamingParser.TestResults.Count, executable)); + foreach (TestResult result in streamingParser.TestResults) { if (!_schedulingAnalyzer.AddActualDuration(result.TestCase, (int) result.Duration.TotalMilliseconds)) - _logger.LogWarning($"{_threadName}TestCase already in analyzer: {result.TestCase.FullyQualifiedName}"); + _logger.LogWarning(String.Format(Resources.AlreadyInAnalyzer, _threadName, result.TestCase.FullyQualifiedName)); } return consoleOutput; } diff --git a/GoogleTestAdapter/Core/Runners/TestResultCollector.cs b/GoogleTestAdapter/Core/Runners/TestResultCollector.cs index 3ac00fff5..cdf7929f7 100644 --- a/GoogleTestAdapter/Core/Runners/TestResultCollector.cs +++ b/GoogleTestAdapter/Core/Runners/TestResultCollector.cs @@ -1,3 +1,5 @@ +// This file has been modified by Microsoft on 8/2017. + using System; using System.Collections.Generic; using System.Linq; @@ -61,7 +63,7 @@ private void CollectResultsFromXmlFile(TestCase[] testCasesRun, string resultXml } if (nrOfCollectedTestResults > 0) _logger.DebugInfo( - $"{_threadName}Collected {nrOfCollectedTestResults} test results from result XML file {resultXmlFile}"); + String.Format(Resources.CollectedResults, _threadName, nrOfCollectedTestResults, resultXmlFile)); } private void CollectResultsFromConsoleOutput(StandardOutputTestResultParser consoleParser, List testResults) @@ -75,12 +77,12 @@ private void CollectResultsFromConsoleOutput(StandardOutputTestResultParser cons nrOfCollectedTestResults++; } if (nrOfCollectedTestResults > 0) - _logger.DebugInfo($"{_threadName}Collected {nrOfCollectedTestResults} test results from console output"); + _logger.DebugInfo(String.Format(Resources.CollectedResultsFromConsole, _threadName, nrOfCollectedTestResults)); } private void CreateMissingResults(TestCase[] testCases, TestCase crashedTestCase, List testResults) { - var errorMessage = $"reason is probably a crash of test {crashedTestCase.DisplayName}"; + var errorMessage = String.Format(Resources.CrashTest, crashedTestCase.DisplayName); var errorStackTrace = ErrorMessageParser.CreateStackTraceEntry("crash suspect", crashedTestCase.CodeFilePath, crashedTestCase.LineNumber.ToString()); @@ -95,14 +97,13 @@ private void CreateMissingResults(TestCase[] testCases, TestCase crashedTestCase }); } if (testCases.Length > 0) - _logger.DebugInfo($"{_threadName}Created {testCases.Length} test results for tests which were neither found in result XML file nor in console output"); + _logger.DebugInfo(String.Format(Resources.CreatedTestResults, _threadName, testCases.Length)); } private void ReportSuspiciousTestCases(TestCase[] testCases) { string testCasesAsString = string.Join(Environment.NewLine, testCases.Select(tc => tc.DisplayName)); - _logger.DebugWarning( - $"{_threadName}{testCases.Length} test cases seem to not have been run - are you repeating a test run, but tests have changed in the meantime? Test cases:{Environment.NewLine}{testCasesAsString}"); + _logger.DebugWarning(String.Format(Resources.TestCaseNotRun, _threadName, testCases.Length, Environment.NewLine, testCasesAsString)); } } diff --git a/GoogleTestAdapter/Core/Scheduling/SchedulingAnalyzer.cs b/GoogleTestAdapter/Core/Scheduling/SchedulingAnalyzer.cs index 7986ee279..5b709b02b 100644 --- a/GoogleTestAdapter/Core/Scheduling/SchedulingAnalyzer.cs +++ b/GoogleTestAdapter/Core/Scheduling/SchedulingAnalyzer.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 8/2017. + +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; @@ -39,12 +41,12 @@ public bool AddActualDuration(TestCase testCase, int duration) public void PrintStatisticsToDebugOutput() { - _logger.DebugInfo(">>> Scheduling statistics <<<"); - _logger.DebugInfo($"# of expected test case durations: {ExpectedTestcaseDurations.Count}"); - _logger.DebugInfo($"# of actual test case durations: {ActualTestcaseDurations.Count}"); + _logger.DebugInfo(Resources.SchedulingStats); + _logger.DebugInfo(String.Format(Resources.ExpectedTestCase, ExpectedTestcaseDurations.Count)); + _logger.DebugInfo(String.Format(Resources.ActualTestCase, ActualTestcaseDurations.Count)); if (ExpectedTestcaseDurations.Count == 0 || ActualTestcaseDurations.Count == 0) { - _logger.DebugInfo("Nothing to report."); + _logger.DebugInfo(Resources.NothingToReport); return; } @@ -63,15 +65,15 @@ public void PrintStatisticsToDebugOutput() double sumOfSquaresOfDifferences = differences.Select(d => (d.DifferenceInMs - avgDifference) * (d.DifferenceInMs - avgDifference)).Sum(); double standardDeviation = Math.Sqrt(sumOfSquaresOfDifferences / differences.Count); - _logger.DebugInfo($"{differences.Count} expected durations have been found in actual durations"); - _logger.DebugInfo($"Avg difference between expected and actual duration: {avgDifference.ToString("F1", CultureInfo.InvariantCulture)}ms"); - _logger.DebugInfo($"Standard deviation: {standardDeviation.ToString("F1", CultureInfo.InvariantCulture)}ms"); + _logger.DebugInfo(String.Format(Resources.ExpectedDurations, differences.Count)); + _logger.DebugInfo(String.Format(Resources.AvgDifference, avgDifference.ToString("F1", CultureInfo.InvariantCulture))); + _logger.DebugInfo(String.Format(Resources.StandardDeviation, standardDeviation.ToString("F1", CultureInfo.InvariantCulture))); int nrOfWorstDifferences = Math.Min(10, differences.Count); - _logger.DebugInfo($"{nrOfWorstDifferences} worst differences:"); + _logger.DebugInfo(String.Format(Resources.WorstDifferences, nrOfWorstDifferences)); for (int i = 0; i < nrOfWorstDifferences; i++) { - _logger.DebugInfo($"Test {differences[i].TestCase.FullyQualifiedName}: Expected {ExpectedTestcaseDurations[differences[i].TestCase]}ms, actual {ActualTestcaseDurations[differences[i].TestCase]}ms"); + _logger.DebugInfo(String.Format(Resources.Results, differences[i].TestCase.FullyQualifiedName, ExpectedTestcaseDurations[differences[i].TestCase], ActualTestcaseDurations[differences[i].TestCase])); } } diff --git a/GoogleTestAdapter/Core/Scheduling/TestDurationSerializer.cs b/GoogleTestAdapter/Core/Scheduling/TestDurationSerializer.cs index f565356ec..069b91519 100644 --- a/GoogleTestAdapter/Core/Scheduling/TestDurationSerializer.cs +++ b/GoogleTestAdapter/Core/Scheduling/TestDurationSerializer.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 8/2017. using GoogleTestAdapter.Helpers; using GoogleTestAdapter.Model; @@ -163,7 +163,7 @@ private GtaTestDurations LoadTestDurations(string durationsFile) } catch (InvalidOperationException e) when (e.InnerException is XmlSchemaValidationException) { - throw new InvalidTestDurationsException($"Invalid file {durationsFile}. {e.InnerException.Message}", e.InnerException); + throw new InvalidTestDurationsException(String.Format(Resources.InvalidFile, durationsFile, e.InnerException.Message), e.InnerException); } } } diff --git a/GoogleTestAdapter/Core/Settings/ITestPropertySettings.cs b/GoogleTestAdapter/Core/Settings/ITestPropertySettings.cs new file mode 100644 index 000000000..717692219 --- /dev/null +++ b/GoogleTestAdapter/Core/Settings/ITestPropertySettings.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace GoogleTestAdapter.Settings +{ + public interface ITestPropertySettings + { + IDictionary Environment { get; } + string WorkingDirectory { get; } + } +} diff --git a/GoogleTestAdapter/Core/Settings/ITestPropertySettingsContainer.cs b/GoogleTestAdapter/Core/Settings/ITestPropertySettingsContainer.cs new file mode 100644 index 000000000..e784e35a3 --- /dev/null +++ b/GoogleTestAdapter/Core/Settings/ITestPropertySettingsContainer.cs @@ -0,0 +1,8 @@ + +namespace GoogleTestAdapter.Settings +{ + public interface ITestPropertySettingsContainer + { + bool TryGetSettings(string testName, out ITestPropertySettings settings); + } +} diff --git a/GoogleTestAdapter/Core/Settings/SettingsWrapper.cs b/GoogleTestAdapter/Core/Settings/SettingsWrapper.cs index 97eb2329e..9134762a5 100644 --- a/GoogleTestAdapter/Core/Settings/SettingsWrapper.cs +++ b/GoogleTestAdapter/Core/Settings/SettingsWrapper.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 7/2017. +// This file has been modified by Microsoft on 5/2018. using System; using System.Collections.Generic; @@ -45,9 +45,8 @@ public class SettingsWrapper .OrderBy(p => p.Name) .ToArray(); - public const string TestFinderRegex = @"[Tt]est[s]?[0-9]*\.exe"; - private readonly IGoogleTestAdapterSettingsContainer _settingsContainer; + private readonly ITestPropertySettingsContainer _testPropertySettingsContainer; public RegexTraitParser RegexTraitParser { private get; set; } private int _nrOfRunningExecutions; @@ -56,14 +55,22 @@ public class SettingsWrapper private IGoogleTestAdapterSettings _currentSettings; public SettingsWrapper(IGoogleTestAdapterSettingsContainer settingsContainer) + : this(settingsContainer, null) + { + } + + public ITestPropertySettingsContainer TestPropertySettingsContainer => _testPropertySettingsContainer; + + public SettingsWrapper(IGoogleTestAdapterSettingsContainer settingsContainer, ITestPropertySettingsContainer testPropertySettingsContainer) { _settingsContainer = settingsContainer; + _testPropertySettingsContainer = testPropertySettingsContainer; _currentSettings = _settingsContainer.SolutionSettings; } public virtual SettingsWrapper Clone() { - return new SettingsWrapper(_settingsContainer) { RegexTraitParser = RegexTraitParser }; + return new SettingsWrapper(_settingsContainer, _testPropertySettingsContainer) { RegexTraitParser = RegexTraitParser }; } // needed for mocking @@ -88,13 +95,13 @@ public void ExecuteWithSettingsForExecutable(string executable, Action action, I _currentSettings = projectSettings; string settingsString = ToString(); _currentSettings = _settingsContainer.SolutionSettings; - logger.DebugInfo($"Settings for test executable '{executable}': {settingsString}"); + logger.DebugInfo(String.Format(Resources.SettingsMessage, executable, settingsString)); _currentSettings = projectSettings; } else { - logger.DebugInfo($"No settings configured for test executable '{executable}'; running with solution settings: {this}"); + logger.DebugInfo(String.Format(Resources.NoSettingConfigured, executable, this)); } } @@ -116,7 +123,7 @@ public void ExecuteWithSettingsForExecutable(string executable, Action action, I if (_currentSettings != _settingsContainer.SolutionSettings) { _currentSettings = _settingsContainer.SolutionSettings; - logger.DebugInfo($"Back to solution settings: {this}"); + logger.DebugInfo(String.Format(Resources.RestoringSolutionSettings, this)); } } } @@ -129,15 +136,13 @@ public virtual void CheckCorrectUsage(string executable) if (_nrOfRunningExecutions == 0) return; if (_nrOfRunningExecutions < 0) - throw new InvalidOperationException($"{nameof(_nrOfRunningExecutions)} must never be < 0"); + throw new InvalidOperationException(String.Format(Resources.NeverBeZero, nameof(_nrOfRunningExecutions))); if (_currentThread != Thread.CurrentThread) - throw new InvalidOperationException( - $"SettingsWrapper is already running with settings for an executable on thread '{_currentThread.Name}', can not also be used by thread {Thread.CurrentThread.Name}"); + throw new InvalidOperationException(String.Format(Resources.SettingsWrapperString, _currentThread.Name, Thread.CurrentThread.Name)); if (executable != _currentExecutable) - throw new InvalidOperationException( - $"Execution is already running with settings for executable {_currentExecutable}, can not switch to settings for {executable}"); + throw new InvalidOperationException(String.Format(Resources.ExecutionString, _currentExecutable, executable)); } public override string ToString() @@ -171,7 +176,11 @@ public string GetBatchForTestTeardown(string solutionDirectory, string testDirec => ReplacePlaceholders(BatchForTestTeardown, solutionDirectory, testDirectory, threadId); public string GetWorkingDir(string solutionDirectory, string testDirectory, int threadId) - => ReplacePlaceholders(WorkingDir, solutionDirectory, testDirectory, threadId); + { + return string.IsNullOrWhiteSpace(WorkingDir) + ? OptionWorkingDirDefaultValue + : ReplacePlaceholders(WorkingDir, solutionDirectory, testDirectory, threadId); + } private string ReplacePlaceholders(string theString, string solutionDirectory, string testDirectory, int threadId) @@ -200,15 +209,11 @@ public static string ReplacePlaceholders(string userParameters, string executabl } - public const string CategoryTestExecutionName = "Test execution"; - public const string CategoryTraitsName = "Regexes for trait assignment"; - public const string CategoryRuntimeBehaviorName = "Runtime behavior"; - public const string CategoryParallelizationName = "Parallelization"; - public const string CategoryMiscName = "Misc"; - - public const string PageGeneralName = "General"; - public const string PageParallelizationName = CategoryParallelizationName; - public const string PageGoogleTestName = "Google Test"; + public static readonly string CategoryTestExecutionName = Resources.CategoryTestExecutionName; + public static readonly string CategoryTraitsName = Resources.CategoryTraitsName; + public static readonly string CategoryRuntimeBehaviorName = Resources.CategoryRuntimeBehaviorName; + public static readonly string CategoryParallelizationName = Resources.CategoryParallelizationName; + public static readonly string CategoryMiscName = Resources.CategoryMiscName; public const string SolutionDirPlaceholder = "$(SolutionDir)"; public const string TestDirPlaceholder = "$(TestDir)"; @@ -216,55 +221,49 @@ public static string ReplacePlaceholders(string userParameters, string executabl public const string ExecutablePlaceholder = "$(Executable)"; public const string ExecutableDirPlaceholder = "$(ExecutableDir)"; - private const string DescriptionOfSolutionDirPlaceHolder = - SolutionDirPlaceholder + " - directory of the solution (only available inside VS)"; + private static readonly string DescriptionOfSolutionDirPlaceHolder = + string.Format(Resources.DescriptionOfSolutionDirPlaceHolder, SolutionDirPlaceholder); - private const string DescriptionOfExecutableDirPlaceHolder = - ExecutableDirPlaceholder + " - directory containing the test executable"; + private static readonly string DescriptionOfExecutableDirPlaceHolder = + string.Format(Resources.DescriptionOfExecutableDirPlaceHolder, ExecutableDirPlaceholder); - private const string DescriptionOfPlaceholdersForBatches = - TestDirPlaceholder + " - path of a directory which can be used by the tests\n" + - ThreadIdPlaceholder + " - id of thread executing the current tests\n" + - DescriptionOfSolutionDirPlaceHolder; + private static readonly string DescriptionOfPlaceholdersForBatches = + string.Format(Resources.DescriptionOfPlaceholdersForBatches, TestDirPlaceholder, ThreadIdPlaceholder) + + "\n" + DescriptionOfSolutionDirPlaceHolder; - private const string DescriptionOfPlaceholdersForExecutables = + private static readonly string DescriptionOfPlaceholdersForExecutables = DescriptionOfPlaceholdersForBatches + "\n" + - ExecutablePlaceholder + " - executable containing the tests\n" + - DescriptionOfExecutableDirPlaceHolder; + string.Format(Resources.DescriptionOfPlaceholdersForExecutables, ExecutablePlaceholder) + + "\n" + DescriptionOfExecutableDirPlaceHolder; #region GeneralOptionsPage public virtual string DebuggingNamedPipeId => _currentSettings.DebuggingNamedPipeId; - public const string OptionUseNewTestExecutionFramework = "Use new test execution framework (experimental)"; + public static readonly string OptionUseNewTestExecutionFramework = Resources.OptionUseNewTestExecutionFramework; public const bool OptionUseNewTestExecutionFrameworkDefaultValue = true; - public const string OptionUseNewTestExecutionFrameworkDescription = - "Make use of the new test execution framework. Advantages: test crash detection and test output printing also work in debug mode."; + public static readonly string OptionUseNewTestExecutionFrameworkDescription = Resources.OptionUseNewTestExecutionFrameworkDescription; public virtual bool UseNewTestExecutionFramework => _currentSettings.UseNewTestExecutionFramework ?? OptionUseNewTestExecutionFrameworkDefaultValue; - public const string OptionPrintTestOutput = "Print test output"; + public static readonly string OptionPrintTestOutput = Resources.OptionPrintTestOutput; public const bool OptionPrintTestOutputDefaultValue = false; - public const string OptionPrintTestOutputDescription = - "Print the output of the Google Test executable(s) to the Tests Output window."; + public static readonly string OptionPrintTestOutputDescription = Resources.OptionPrintTestOutputDescription; public virtual bool PrintTestOutput => _currentSettings.PrintTestOutput ?? OptionPrintTestOutputDefaultValue; - public const string OptionTestDiscoveryRegex = "Regex for test discovery"; + public static readonly string OptionTestDiscoveryRegex = Resources.OptionTestDiscoveryRegex; public const string OptionTestDiscoveryRegexDefaultValue = ""; - public const string OptionTestDiscoveryRegexDescription = - "If non-empty, this regex will be used to discover the Google Test executables containing your tests.\nDefault regex: " - + TestFinderRegex; + public static readonly string OptionTestDiscoveryRegexDescription = string.Format(Resources.OptionTestDiscoveryRegexDescription, String.Empty); public virtual string TestDiscoveryRegex => _currentSettings.TestDiscoveryRegex ?? OptionTestDiscoveryRegexDefaultValue; - public const string OptionTestDiscoveryTimeoutInSeconds = "Test discovery timeout in s"; + public static readonly string OptionTestDiscoveryTimeoutInSeconds = Resources.OptionTestDiscoveryTimeoutInSeconds; public const int OptionTestDiscoveryTimeoutInSecondsDefaultValue = 30; - public const string OptionTestDiscoveryTimeoutInSecondsDescription = - "Number of seconds after which test discovery will be assumed to have failed. 0: Infinite timeout"; + public static readonly string OptionTestDiscoveryTimeoutInSecondsDescription = Resources.OptionTestDiscoveryTimeoutInSecondsDescription; public virtual int TestDiscoveryTimeoutInSeconds { get @@ -278,20 +277,20 @@ public virtual int TestDiscoveryTimeoutInSeconds { } - public const string OptionWorkingDir = "Working directory"; + public static readonly string OptionWorkingDir = Resources.OptionWorkingDir; public const string OptionWorkingDirDefaultValue = ExecutableDirPlaceholder; - public const string OptionWorkingDirDescription = - "If non-empty, will set the working directory for running the tests (default: " + DescriptionOfExecutableDirPlaceHolder + ").\nExample: " + SolutionDirPlaceholder + "\\MyTestDir\nPlaceholders:\n" - + DescriptionOfExecutableDirPlaceHolder + "\n" + DescriptionOfSolutionDirPlaceHolder; + public static readonly string OptionWorkingDirDescription = + string.Format(Resources.OptionWorkingDirDescription, DescriptionOfExecutableDirPlaceHolder, SolutionDirPlaceholder) + + "\n" + DescriptionOfExecutableDirPlaceHolder + "\n" + DescriptionOfSolutionDirPlaceHolder; public virtual string WorkingDir => _currentSettings.WorkingDir ?? OptionWorkingDirDefaultValue; - public const string OptionPathExtension = "PATH extension"; + public static readonly string OptionPathExtension = Resources.OptionPathExtension; public const string OptionPathExtensionDefaultValue = ""; - public const string OptionPathExtensionDescription = - "If non-empty, the content will be appended to the PATH variable of the test execution and discovery processes.\nExample: C:\\MyBins;" + ExecutableDirPlaceholder + "\\MyOtherBins;\nPlaceholders:\n" - + DescriptionOfExecutableDirPlaceHolder; + public static readonly string OptionPathExtensionDescription = + string.Format(Resources.OptionPathExtensionDescription, ExecutableDirPlaceholder) + + "\n" + DescriptionOfExecutableDirPlaceHolder; public virtual string PathExtension => _currentSettings.PathExtension ?? OptionPathExtensionDefaultValue; @@ -300,21 +299,13 @@ public virtual int TestDiscoveryTimeoutInSeconds { public const string TraitsRegexesRegexSeparator = "///"; public const string TraitsRegexesTraitSeparator = ","; public const string OptionTraitsRegexesDefaultValue = ""; - public const string OptionTraitsDescription = "Allows to override/add traits for testcases matching a regex. Traits are build up in 3 phases: 1st, traits are assigned to tests according to the 'Traits before' option. 2nd, the tests' traits (defined via the macros in GTA_Traits.h) are added to the tests, overriding traits from phase 1 with new values. 3rd, the 'Traits after' option is evaluated, again in an overriding manner.\nSyntax: " - + TraitsRegexesRegexSeparator + - " separates the regex from the traits, the trait's name and value are separated by " - + TraitsRegexesTraitSeparator + - " and each pair of regex and trait is separated by " - + TraitsRegexesPairSeparator + ".\nExample: " + - @"MySuite\.*" - + TraitsRegexesRegexSeparator + "Type" - + TraitsRegexesTraitSeparator + "Small" - + TraitsRegexesPairSeparator + - @"MySuite2\.*|MySuite3\.*" - + TraitsRegexesRegexSeparator + "Type" - + TraitsRegexesTraitSeparator + "Medium"; - - public const string OptionTraitsRegexesBefore = "Before test discovery"; + public static readonly string OptionTraitsDescription = string.Format( + Resources.OptionTraitsDescription, + TraitsRegexesRegexSeparator, + TraitsRegexesTraitSeparator, + TraitsRegexesPairSeparator); + + public static readonly string OptionTraitsRegexesBefore = Resources.OptionTraitsRegexesBefore; public virtual List TraitsRegexesBefore { @@ -325,7 +316,7 @@ public virtual List TraitsRegexesBefore } } - public const string OptionTraitsRegexesAfter = "After test discovery"; + public static readonly string OptionTraitsRegexesAfter = Resources.OptionTraitsRegexesAfter; public virtual List TraitsRegexesAfter { @@ -337,77 +328,70 @@ public virtual List TraitsRegexesAfter } - public const string OptionTestNameSeparator = "Test name separator"; + public static readonly string OptionTestNameSeparator = Resources.OptionTestNameSeparator; public const string OptionTestNameSeparatorDefaultValue = ""; - public const string OptionTestNameSeparatorDescription = - "Test names produced by Google Test might contain the character '/', which makes VS cut the name after the '/' if the test explorer window is not wide enough. This option's value, if non-empty, will replace the '/' character to avoid that behavior. Note that '\\', ' ', '|', and '-' produce the same behavior ('.', '_', ':', and '::' are known to work - there might be more). Note also that traits regexes are evaluated against the tests' display names (and must thus be consistent with this option)."; + public static readonly string OptionTestNameSeparatorDescription = Resources.OptionTestNameSeparatorDescription; public virtual string TestNameSeparator => _currentSettings.TestNameSeparator ?? OptionTestNameSeparatorDefaultValue; - public const string OptionParseSymbolInformation = "Parse symbol information"; + public static readonly string OptionParseSymbolInformation = Resources.OptionParseSymbolInformation; public const bool OptionParseSymbolInformationDefaultValue = true; - public const string OptionParseSymbolInformationDescription = - "Parse debug symbol information for test executables to obtain source location information and traits (defined via the macros in GTA_Traits.h).\n" + - "If this is set to false step 2 of traits discovery will be left out and only traits regexes will be effective."; + public static readonly string OptionParseSymbolInformationDescription = Resources.OptionParseSymbolInformationDescription; public virtual bool ParseSymbolInformation => _currentSettings.ParseSymbolInformation ?? OptionParseSymbolInformationDefaultValue; - public const string OptionDebugMode = "Print debug info"; + public static readonly string OptionDebugMode = Resources.OptionDebugMode; public const bool OptionDebugModeDefaultValue = false; - public const string OptionDebugModeDescription = - "If true, debug output will be printed to the test console."; + public static readonly string OptionDebugModeDescription = Resources.OptionDebugModeDescription; public virtual bool DebugMode => _currentSettings.DebugMode ?? OptionDebugModeDefaultValue; - public const string OptionTimestampOutput = "Timestamp output"; + public static readonly string OptionTimestampOutput = Resources.OptionTimestampOutput; public const bool OptionTimestampOutputDefaultValue = false; - public const string OptionTimestampOutputDescription = - "If true, a timestamp is added to test and debug output."; + public static readonly string OptionTimestampOutputDescription = Resources.OptionTimestampOutputDescription; public virtual bool TimestampOutput => _currentSettings.TimestampOutput ?? OptionTimestampOutputDefaultValue; - public const string OptionShowReleaseNotes = "Show release notes after update"; + public static readonly string OptionShowReleaseNotes = Resources.OptionShowReleaseNotes; public const bool OptionShowReleaseNotesDefaultValue = true; - public const string OptionShowReleaseNotesDescription = - "If true, a dialog with release notes is shown after the extension has been updated."; + public static readonly string OptionShowReleaseNotesDescription = Resources.OptionShowReleaseNotesDescription; public virtual bool ShowReleaseNotes => _currentSettings.ShowReleaseNotes ?? OptionShowReleaseNotesDefaultValue; - public const string OptionAdditionalTestExecutionParams = "Additional test execution parameters"; + public static readonly string OptionAdditionalTestExecutionParams = Resources.OptionAdditionalTestExecutionParams; public const string OptionAdditionalTestExecutionParamsDefaultValue = ""; - public const string OptionAdditionalTestExecutionParamsDescription = - "Additional parameters for Google Test executable. Placeholders:\n" - + DescriptionOfPlaceholdersForExecutables; + public static readonly string OptionAdditionalTestExecutionParamsDescription = + Resources.OptionAdditionalTestExecutionParamsDescription + + "\n" + DescriptionOfPlaceholdersForExecutables; public virtual string AdditionalTestExecutionParam => _currentSettings.AdditionalTestExecutionParam ?? OptionAdditionalTestExecutionParamsDefaultValue; - public const string OptionBatchForTestSetup = "Test setup batch file"; + public static readonly string OptionBatchForTestSetup = Resources.OptionBatchForTestSetup; public const string OptionBatchForTestSetupDefaultValue = ""; - public const string OptionBatchForTestSetupDescription = - "Batch file to be executed before test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders:\n" - + DescriptionOfPlaceholdersForBatches; + public static readonly string OptionBatchForTestSetupDescription = + Resources.OptionBatchForTestSetupDescription + + "\n" + DescriptionOfPlaceholdersForBatches; public virtual string BatchForTestSetup => _currentSettings.BatchForTestSetup ?? OptionBatchForTestSetupDefaultValue; - public const string OptionBatchForTestTeardown = "Test teardown batch file"; + public static readonly string OptionBatchForTestTeardown = Resources.OptionBatchForTestTeardown; public const string OptionBatchForTestTeardownDefaultValue = ""; - public const string OptionBatchForTestTeardownDescription = - "Batch file to be executed after test execution. If tests are executed in parallel, the batch file will be executed once per thread. Placeholders:\n" - + DescriptionOfPlaceholdersForBatches; + public static readonly string OptionBatchForTestTeardownDescription = + Resources.OptionBatchForTestTeardownDescription + + "\n" + DescriptionOfPlaceholdersForBatches; public virtual string BatchForTestTeardown => _currentSettings.BatchForTestTeardown ?? OptionBatchForTestTeardownDefaultValue; - public const string OptionKillProcessesOnCancel = "Kill processes on cancel"; + public static readonly string OptionKillProcessesOnCancel = Resources.OptionKillProcessesOnCancel; public const bool OptionKillProcessesOnCancelDefaultValue = false; - public const string OptionKillProcessesOnCancelDescription = - "If true, running test executables are actively killed if the test execution is canceled. Note that killing a test process might have all kinds of side effects; in particular, Google Test will not be able to perform any shutdown tasks."; + public static readonly string OptionKillProcessesOnCancelDescription = Resources.OptionKillProcessesOnCancelDescription; public virtual bool KillProcessesOnCancel => _currentSettings.KillProcessesOnCancel ?? OptionKillProcessesOnCancelDefaultValue; @@ -415,18 +399,16 @@ public virtual List TraitsRegexesAfter #region ParallelizationOptionsPage - public const string OptionEnableParallelTestExecution = "Parallel test execution"; + public static readonly string OptionEnableParallelTestExecution = Resources.OptionEnableParallelTestExecution; public const bool OptionEnableParallelTestExecutionDefaultValue = false; - public const string OptionEnableParallelTestExecutionDescription = - "Parallel test execution is achieved by means of different threads, each of which is assigned a number of tests to be executed. The threads will then sequentially invoke the necessary executables to produce the according test results."; + public static readonly string OptionEnableParallelTestExecutionDescription = Resources.OptionEnableParallelTestExecutionDescription; public virtual bool ParallelTestExecution => _currentSettings.ParallelTestExecution ?? OptionEnableParallelTestExecutionDefaultValue; - public const string OptionMaxNrOfThreads = "Maximum number of threads"; + public static readonly string OptionMaxNrOfThreads = Resources.OptionMaxNrOfThreads; public const int OptionMaxNrOfThreadsDefaultValue = 0; - public const string OptionMaxNrOfThreadsDescription = - "Maximum number of threads to be used for test execution (0: one thread for each processor)."; + public static readonly string OptionMaxNrOfThreadsDescription = Resources.OptionMaxNrOfThreadsDescription; public virtual int MaxNrOfThreads { @@ -445,38 +427,34 @@ public virtual int MaxNrOfThreads #region GoogleTestOptionsPage - public const string OptionCatchExceptions = "Catch exceptions"; + public static readonly string OptionCatchExceptions = Resources.OptionCatchExceptions; public const bool OptionCatchExceptionsDefaultValue = true; - public const string OptionCatchExceptionsDescription = - "Google Test catches exceptions by default; the according test fails and test execution continues. Choosing false lets exceptions pass through, allowing the debugger to catch them.\n" - + "Google Test option:" + GoogleTestConstants.CatchExceptions; + public static readonly string OptionCatchExceptionsDescription = + string.Format(Resources.OptionCatchExceptionsDescription, GoogleTestConstants.CatchExceptions); public virtual bool CatchExceptions => _currentSettings.CatchExceptions ?? OptionCatchExceptionsDefaultValue; - public const string OptionBreakOnFailure = "Break on failure"; + public static readonly string OptionBreakOnFailure = Resources.OptionBreakOnFailure; public const bool OptionBreakOnFailureDefaultValue = false; - public const string OptionBreakOnFailureDescription = - "If enabled, a potentially attached debugger will catch assertion failures and automatically drop into interactive mode.\n" - + "Google Test option:" + GoogleTestConstants.BreakOnFailure; + public static readonly string OptionBreakOnFailureDescription = + string.Format(Resources.OptionBreakOnFailureDescription, GoogleTestConstants.BreakOnFailure); public virtual bool BreakOnFailure => _currentSettings.BreakOnFailure ?? OptionBreakOnFailureDefaultValue; - public const string OptionRunDisabledTests = "Also run disabled tests"; + public static readonly string OptionRunDisabledTests = Resources.OptionRunDisabledTests; public const bool OptionRunDisabledTestsDefaultValue = false; - public const string OptionRunDisabledTestsDescription = - "If true, all (selected) tests will be run, even if they have been disabled.\n" - + "Google Test option:" + GoogleTestConstants.AlsoRunDisabledTestsOption; + public static readonly string OptionRunDisabledTestsDescription = + string.Format(Resources.OptionRunDisabledTestsDescription, GoogleTestConstants.AlsoRunDisabledTestsOption); public virtual bool RunDisabledTests => _currentSettings.RunDisabledTests ?? OptionRunDisabledTestsDefaultValue; - public const string OptionNrOfTestRepetitions = "Number of test repetitions"; + public static readonly string OptionNrOfTestRepetitions = Resources.OptionNrOfTestRepetitions; public const int OptionNrOfTestRepetitionsDefaultValue = 1; - public const string OptionNrOfTestRepetitionsDescription = - "Tests will be run for the selected number of times (-1: infinite).\n" - + "Google Test option:" + GoogleTestConstants.NrOfRepetitionsOption; + public static readonly string OptionNrOfTestRepetitionsDescription = + string.Format(Resources.OptionNrOfTestRepetitionsDescription, GoogleTestConstants.NrOfRepetitionsOption); public virtual int NrOfTestRepetitions { @@ -492,23 +470,21 @@ public virtual int NrOfTestRepetitions } - public const string OptionShuffleTests = "Shuffle tests per execution"; + public static readonly string OptionShuffleTests = Resources.OptionShuffleTests; public const bool OptionShuffleTestsDefaultValue = false; - public const string OptionShuffleTestsDescription = - "If true, tests will be executed in random order. Note that a true randomized order is only given when executing all tests in non-parallel fashion. Otherwise, the test excutables will most likely be executed more than once - random order is than restricted to the according executions.\n" - + "Google Test option:" + GoogleTestConstants.ShuffleTestsOption; + public static readonly string OptionShuffleTestsDescription = + string.Format(Resources.OptionShuffleTestsDescription, GoogleTestConstants.ShuffleTestsOption); public virtual bool ShuffleTests => _currentSettings.ShuffleTests ?? OptionShuffleTestsDefaultValue; - public const string OptionShuffleTestsSeed = "Shuffle tests: Seed"; + public static readonly string OptionShuffleTestsSeed = Resources.OptionShuffleTestsSeed; public const int OptionShuffleTestsSeedDefaultValue = GoogleTestConstants.ShuffleTestsSeedDefaultValue; - public const string OptionShuffleTestsSeedDescription = "0: Seed is computed from system time, 1<=n<=" - + GoogleTestConstants.ShuffleTestsSeedMaxValueAsString - + ": The given seed is used. See note of option '" - + OptionShuffleTests - + "'.\n" - + "Google Test option:" + GoogleTestConstants.ShuffleTestsSeedOption; + public static readonly string OptionShuffleTestsSeedDescription = string.Format( + Resources.OptionShuffleTestsSeedDescription, + GoogleTestConstants.ShuffleTestsSeedMaxValueAsString, + Resources.OptionShuffleTests, + GoogleTestConstants.ShuffleTestsSeedOption); public virtual int ShuffleTestsSeed { diff --git a/GoogleTestAdapter/Core/TestCases/MethodSignatureCreator.cs b/GoogleTestAdapter/Core/TestCases/MethodSignatureCreator.cs index 6fec42a4c..50aa83a7d 100644 --- a/GoogleTestAdapter/Core/TestCases/MethodSignatureCreator.cs +++ b/GoogleTestAdapter/Core/TestCases/MethodSignatureCreator.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 8/2017. + +using System; using System.Collections.Generic; using GoogleTestAdapter.Helpers; @@ -19,7 +21,7 @@ internal IEnumerable GetTestMethodSignatures(TestCaseDescriptor descript case TestCaseDescriptor.TestTypes.Simple: return GetTestMethodSignature(descriptor.Suite, descriptor.Name).Yield(); default: - throw new InvalidOperationException($"Unknown literal {descriptor.TestType}"); + throw new InvalidOperationException(String.Format(Resources.UnknownLiteral, descriptor.TestType)); } } diff --git a/GoogleTestAdapter/Core/TestCases/NewTestCaseResolver.cs b/GoogleTestAdapter/Core/TestCases/NewTestCaseResolver.cs index a128fe4ea..8d61e29b5 100644 --- a/GoogleTestAdapter/Core/TestCases/NewTestCaseResolver.cs +++ b/GoogleTestAdapter/Core/TestCases/NewTestCaseResolver.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 9/2017. + +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -73,11 +75,11 @@ private void AddSymbolsFromBinary(string binary) _allTestMethodSymbols.AddRange(diaResolver.GetFunctions("*" + GoogleTestConstants.TestBodySignature)); _allTraitSymbols.AddRange(diaResolver.GetFunctions("*" + TraitAppendix)); - _logger.DebugInfo($"Found {_allTestMethodSymbols.Count} test method symbols and {_allTraitSymbols.Count} trait symbols in binary {binary}"); + _logger.DebugInfo(String.Format(Resources.FoundTestMethod, _allTestMethodSymbols.Count, _allTraitSymbols.Count, binary)); } catch (Exception e) { - _logger.DebugError($"Exception while resolving test locations and traits in {binary}\n{e}"); + _logger.DebugError(String.Format(Resources.ExceptionResolving, binary, e)); } } } @@ -104,7 +106,7 @@ public static List GetTraits(SourceFileLocation nativeSymbol, IEnumerable // ReSharper disable once LoopCanBeConvertedToQuery foreach (SourceFileLocation nativeTraitSymbol in allTraitSymbols) { - if (nativeSymbol.Symbol.StartsWith(nativeTraitSymbol.TestClassSignature)) + if (nativeSymbol.Symbol.StartsWith(nativeTraitSymbol.TestClassSignature, StringComparison.Ordinal)) { int lengthOfSerializedTrait = nativeTraitSymbol.Symbol.Length - nativeTraitSymbol.IndexOfSerializedTrait - TraitAppendix.Length; string serializedTrait = nativeTraitSymbol.Symbol.Substring(nativeTraitSymbol.IndexOfSerializedTrait, lengthOfSerializedTrait); diff --git a/GoogleTestAdapter/Core/TestCases/StreamingListTestsParser.cs b/GoogleTestAdapter/Core/TestCases/StreamingListTestsParser.cs index 2acaa0c4d..53ece6249 100644 --- a/GoogleTestAdapter/Core/TestCases/StreamingListTestsParser.cs +++ b/GoogleTestAdapter/Core/TestCases/StreamingListTestsParser.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 9/2017. + +using System; using System.Text.RegularExpressions; namespace GoogleTestAdapter.TestCases @@ -30,7 +32,7 @@ public class TestCaseDescriptorCreatedEventArgs : EventArgs public void ReportLine(string line) { string trimmedLine = line.Trim('.', '\n', '\r'); - if (trimmedLine.StartsWith(" ")) + if (trimmedLine.StartsWith(" ", StringComparison.Ordinal)) { TestCaseDescriptor descriptor = CreateDescriptor(_currentSuite, trimmedLine.Substring(2)); TestCaseDescriptorCreated?.Invoke(this, @@ -86,7 +88,7 @@ private static string GetDisplayName(string fullyQalifiedName, string typeParam, private static string GetEnclosedTypeParam(string typeParam) { - if (typeParam.EndsWith(">")) + if (typeParam.EndsWith(">", StringComparison.Ordinal)) { typeParam += " "; } diff --git a/GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs b/GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs index fb15aa08d..6edaa47d9 100644 --- a/GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs +++ b/GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 7/2017. +// This file has been modified by Microsoft on 5/2018. using System; using System.Collections.Generic; @@ -45,7 +45,8 @@ public IList CreateTestCases(Action reportTestCase = null) { var launcher = new ProcessLauncher(_logger, _settings.GetPathExtension(_executable), null); int processExitCode; - standardOutput = launcher.GetOutputOfCommand("", _executable, GoogleTestConstants.ListTestsOption.Trim(), + string workingDir = new FileInfo(_executable).DirectoryName; + standardOutput = launcher.GetOutputOfCommand(workingDir, null, _executable, GoogleTestConstants.ListTestsOption, false, false, out processExitCode); if (!CheckProcessExitCode(processExitCode, standardOutput)) @@ -54,7 +55,7 @@ public IList CreateTestCases(Action reportTestCase = null) catch (Exception e) { SequentialTestRunner.LogExecutionError(_logger, _executable, Path.GetFullPath(""), - GoogleTestConstants.ListTestsOption.Trim(), e); + GoogleTestConstants.ListTestsOption, e); return new List(); } @@ -129,6 +130,7 @@ private IList NewCreateTestcases(Action reportTestCase, List try { + string workingDir = new FileInfo(_executable).DirectoryName; int processExitCode = ProcessExecutor.ExecutionFailed; ProcessExecutor executor = null; var listAndParseTestsTask = new Task(() => @@ -136,8 +138,9 @@ private IList NewCreateTestcases(Action reportTestCase, List executor = new ProcessExecutor(null, _logger); processExitCode = executor.ExecuteCommandBlocking( _executable, - GoogleTestConstants.ListTestsOption.Trim(), - "", + GoogleTestConstants.ListTestsOption, + workingDir, + null, _settings.GetPathExtension(_executable), lineAction); }, TaskCreationOptions.AttachedToParent); @@ -149,12 +152,11 @@ private IList NewCreateTestcases(Action reportTestCase, List string dir = Path.GetDirectoryName(_executable); string file = Path.GetFileName(_executable); - string cdToWorkingDir = $@"cd ""{dir}"""; - string listTestsCommand = $"{file} {GoogleTestConstants.ListTestsOption.Trim()}"; - - _logger.LogError($"Test discovery was cancelled after {_settings.TestDiscoveryTimeoutInSeconds}s for executable {_executable}"); - _logger.DebugError($"Test whether the following commands can be executed sucessfully on the command line (make sure all required binaries are on the PATH):{Environment.NewLine}{cdToWorkingDir}{Environment.NewLine}{listTestsCommand}"); + string command = $@"cd ""{dir}""{Environment.NewLine}{file} {GoogleTestConstants.ListTestsOption}"; + _logger.LogError(String.Format(Resources.TestDiscoveryCancelled, _settings.TestDiscoveryTimeoutInSeconds, _executable)); + _logger.DebugError(String.Format(Resources.TestCommandCanBeRun, Environment.NewLine, command)); + return new List(); } @@ -173,7 +175,7 @@ private IList NewCreateTestcases(Action reportTestCase, List catch (Exception e) { SequentialTestRunner.LogExecutionError(_logger, _executable, Path.GetFullPath(""), - GoogleTestConstants.ListTestsOption.Trim(), e); + GoogleTestConstants.ListTestsOption, e); return new List(); } return testCases; @@ -183,14 +185,12 @@ private bool CheckProcessExitCode(int processExitCode, ICollection stand { if (processExitCode != 0) { - string messsage = - $"Could not list test cases of executable '{_executable}': executing process failed with return code {processExitCode}"; - messsage += - $"\nCommand executed: '{_executable} {GoogleTestConstants.ListTestsOption.Trim()}', working directory: '{Path.GetDirectoryName(_executable)}'"; + string messsage = String.Format(Resources.CouldNotListTestCases, _executable, processExitCode); + messsage += Environment.NewLine + String.Format(Resources.CommandExecuted, _executable, GoogleTestConstants.ListTestsOption, Path.GetDirectoryName(_executable)); if (standardOutput.Count(s => !string.IsNullOrEmpty(s)) > 0) - messsage += $"\nOutput of command:\n{string.Join("\n", standardOutput)}"; + messsage += Environment.NewLine + Resources.OutputOfCommand + Environment.NewLine + string.Join(Environment.NewLine, standardOutput); else - messsage += "\nCommand produced no output"; + messsage += Environment.NewLine + Resources.NoOutput; _logger.LogError(messsage); return false; @@ -244,7 +244,7 @@ private TestCase CreateTestCase(TestCaseDescriptor descriptor, TestCaseLocation return testCase; } - _logger.LogWarning($"Could not find source location for test {descriptor.FullyQualifiedName}"); + _logger.LogWarning(String.Format(Resources.LocationNotFoundError, descriptor.FullyQualifiedName)); return new TestCase( descriptor.FullyQualifiedName, _executable, descriptor.DisplayName, "", 0); } @@ -252,7 +252,7 @@ private TestCase CreateTestCase(TestCaseDescriptor descriptor, TestCaseLocation internal static string StripTestSymbolNamespace(string symbol) { var suffixLength = GoogleTestConstants.TestBodySignature.Length; - var namespaceEnd = symbol.LastIndexOf("::", symbol.Length - suffixLength - 1); + var namespaceEnd = symbol.LastIndexOf("::", symbol.Length - suffixLength - 1, StringComparison.Ordinal); var nameStart = namespaceEnd >= 0 ? namespaceEnd + 2 : 0; return symbol.Substring(nameStart); } diff --git a/GoogleTestAdapter/Core/TestCases/TestCaseResolver.cs b/GoogleTestAdapter/Core/TestCases/TestCaseResolver.cs index 3c4f8ba14..7de4f0659 100644 --- a/GoogleTestAdapter/Core/TestCases/TestCaseResolver.cs +++ b/GoogleTestAdapter/Core/TestCases/TestCaseResolver.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 7/2017. +// This file has been modified by Microsoft on 8/2017. using System; using System.Collections.Generic; @@ -62,7 +62,7 @@ private Dictionary FindTestCaseLocationsInBinary( { IList allTestMethodSymbols = diaResolver.GetFunctions(symbolFilterString); IList allTraitSymbols = diaResolver.GetFunctions("*" + TraitAppendix); - _logger.DebugInfo($"Found {allTestMethodSymbols.Count} test method symbols and {allTraitSymbols.Count} trait symbols in binary {binary}"); + _logger.DebugInfo(String.Format(Resources.FoundTestMethod, allTestMethodSymbols.Count, allTraitSymbols.Count, binary)); return allTestMethodSymbols .Where(nsfl => testMethodSignatures.Contains(TestCaseFactory.StripTestSymbolNamespace(nsfl.Symbol))) @@ -71,7 +71,7 @@ private Dictionary FindTestCaseLocationsInBinary( } catch (Exception e) { - _logger.DebugError($"Exception while resolving test locations and traits in {binary}\n{e}"); + _logger.DebugError(String.Format(Resources.ExceptionResolving, binary, e)); return new Dictionary(); } } diff --git a/GoogleTestAdapter/Core/TestResults/ErrorMessageParser.cs b/GoogleTestAdapter/Core/TestResults/ErrorMessageParser.cs index d981355aa..fd4f6664d 100644 --- a/GoogleTestAdapter/Core/TestResults/ErrorMessageParser.cs +++ b/GoogleTestAdapter/Core/TestResults/ErrorMessageParser.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 9/2017. + +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -68,7 +70,7 @@ public void Parse() if (_outputBeforeFirstFailure != "") { - if (!_outputBeforeFirstFailure.EndsWith("\n") && !_outputBeforeFirstFailure.EndsWith("\r\n")) + if (!_outputBeforeFirstFailure.EndsWith("\n", StringComparison.Ordinal) && !_outputBeforeFirstFailure.EndsWith("\r\n", StringComparison.Ordinal)) _outputBeforeFirstFailure += "\n"; ErrorMessage = $"{_outputBeforeFirstFailure}{ErrorMessage}"; } diff --git a/GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs b/GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs index b6a75cdf7..c3d4af2a6 100644 --- a/GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs +++ b/GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 9/2017. + +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -14,7 +16,7 @@ public class StandardOutputTestResultParser public const string Failed = "[ FAILED ]"; public const string Passed = "[ OK ]"; - public const string CrashText = "!! This test has probably CRASHED !!"; + public static readonly string CrashText = Resources.CrashText; /// /// 1000 ticks = 0.1ms to make sure VS shows "<1ms" @@ -61,7 +63,7 @@ private TestResult CreateTestResult(int indexOfTestcase) TestCase testCase = FindTestcase(qualifiedTestname); if (testCase == null) { - _logger.DebugWarning($"No known test case for test result of line '{line}' - are you repeating a test run, but tests have changed in the meantime?"); + _logger.DebugWarning(String.Format(Resources.NoKnownTestCaseMessage, line)); return null; } @@ -136,7 +138,7 @@ public static TimeSpan ParseDuration(string line, ILogger logger) } catch (Exception) { - logger.LogWarning("Could not parse duration in line '" + line + "'"); + logger.LogWarning(String.Format(Resources.ParseDurationMessage, line)); } return NormalizeDuration(TimeSpan.FromMilliseconds(durationInMs)); @@ -199,17 +201,17 @@ public static TestCase FindTestcase(string qualifiedTestname, IList te public static bool IsRunLine(string line) { - return line.StartsWith(Run); + return line.StartsWith(Run, StringComparison.Ordinal); } public static bool IsPassedLine(string line) { - return line.StartsWith(Passed); + return line.StartsWith(Passed, StringComparison.Ordinal); } public static bool IsFailedLine(string line) { - return line.StartsWith(Failed); + return line.StartsWith(Failed, StringComparison.Ordinal); } public static string RemovePrefix(string line) diff --git a/GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs b/GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs index ac24f08d0..45550a1d5 100644 --- a/GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs +++ b/GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs @@ -1,4 +1,6 @@ -using System; +// This file has been modified by Microsoft on 9/2017. + +using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; @@ -111,7 +113,7 @@ private TestResult CreateTestResult() TestCase testCase = StandardOutputTestResultParser.FindTestcase(qualifiedTestname, _testCasesRun); if (testCase == null) { - _logger.DebugWarning($"No known test case for test result of line '{line}'' - are you repeating a test run, but tests have changed in the meantime?"); + _logger.DebugWarning(String.Format(Resources.NoKnownTestCaseMessage, line)); return null; } @@ -156,7 +158,7 @@ private TestResult CreateTestResult() CrashedTestCase = testCase; string message = StandardOutputTestResultParser.CrashText; - message += errorMsg == "" ? "" : $"\nTest output:\n\n{errorMsg}"; + message += errorMsg == "" ? "" : ("\n" + Resources.TestOutput + $"\n\n{errorMsg}"); TestResult result = StandardOutputTestResultParser.CreateFailedTestResult( testCase, TimeSpan.FromMilliseconds(0), diff --git a/GoogleTestAdapter/Core/TestResults/XmlTestResultParser.cs b/GoogleTestAdapter/Core/TestResults/XmlTestResultParser.cs index 7fc2ddc8b..70744539a 100644 --- a/GoogleTestAdapter/Core/TestResults/XmlTestResultParser.cs +++ b/GoogleTestAdapter/Core/TestResults/XmlTestResultParser.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 8/2017. using System; using System.Collections.Generic; @@ -14,8 +14,6 @@ namespace GoogleTestAdapter.TestResults { public class XmlTestResultParser { - private const string ErrorMsgNoXmlFile = "Output file does not exist, did your tests crash?"; - private static readonly NumberFormatInfo NumberFormatInfo = new CultureInfo("en-US").NumberFormat; @@ -39,7 +37,7 @@ public List GetTestResults() return ParseTestResults(); } - _logger.LogWarning(ErrorMsgNoXmlFile); + _logger.LogWarning(Resources.OutputFileMissing); return new List(); } @@ -72,8 +70,7 @@ private List ParseTestResults() } catch (XmlException e) { - _logger.DebugWarning( - $"Test result file {_xmlResultFile} could not be parsed (completely) - your test executable has probably crashed. Exception message: {e.Message}"); + _logger.DebugWarning(String.Format(Resources.TestResultParse, _xmlResultFile, e.Message)); } return testResults; @@ -87,8 +84,7 @@ private TestResult TryParseTestResult(XmlNode testcaseNode) } catch (Exception e) { - _logger.DebugWarning( - $"XmlNode could not be parsed: \'{GetQualifiedName(testcaseNode)}\'. Exception message: {e.Message}"); + _logger.DebugWarning(String.Format(Resources.XmlNodeParse, GetQualifiedName(testcaseNode), e.Message)); return null; } } @@ -133,7 +129,7 @@ private TestResult ParseTestResult(XmlNode testcaseNode) testResult.Outcome = TestOutcome.Skipped; break; default: - string msg = "Unknown testcase status: " + testCaseStatus; + string msg = String.Format(Resources.UnknownTestCase, testCaseStatus); _logger.LogError(msg); throw new Exception(msg); } diff --git a/GoogleTestAdapter/DiaResolver.Tests/DiaResolverTests.cs b/GoogleTestAdapter/DiaResolver.Tests/DiaResolverTests.cs index 4a9afec2f..bb9fe6ba5 100644 --- a/GoogleTestAdapter/DiaResolver.Tests/DiaResolverTests.cs +++ b/GoogleTestAdapter/DiaResolver.Tests/DiaResolverTests.cs @@ -1,4 +1,6 @@ -using System.Collections.Generic; +// This file has been modified by Microsoft on 8/2017. + +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using FluentAssertions; @@ -100,7 +102,7 @@ public void GetFunctions_ExeWithoutPdb_AttemptsToFindPdbAreLogged() .Contain(msg => msg.Contains("Couldn't find the .pdb file")); fakeLogger.Infos .Should() - .Contain(msg => msg.Contains("Attempts to find pdb:")); + .Contain(msg => msg.Contains("Attempts to find PDB")); } private void DoResolveTest(string executable, string filter, int expectedLocations, int expectedErrorMessages, bool disposeResolver = true) diff --git a/GoogleTestAdapter/DiaResolver.Tests/PeParserTests.cs b/GoogleTestAdapter/DiaResolver.Tests/PeParserTests.cs index e167b00ad..1fa306166 100644 --- a/GoogleTestAdapter/DiaResolver.Tests/PeParserTests.cs +++ b/GoogleTestAdapter/DiaResolver.Tests/PeParserTests.cs @@ -1,4 +1,6 @@ -using System.IO; +// This file has been modified by Microsoft on 9/2017. + +using System.IO; using FluentAssertions; using GoogleTestAdapter.Tests.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -45,6 +47,15 @@ public void PeParser_X86StaticallyLinked_FindsEmbeddedPdbPath() pdb.Should().Be(expectedPdb); } + [TestMethod] + [TestCategory(Unit)] + public void PeParser_X86UnicodeName_FindsEmbeddedPdbPath() + { + string pdb = PeParser.ExtractPdbPath(TestResources.UnicodeNameExe, MockLogger.Object); + string expectedPdb = Path.GetFullPath(Path.ChangeExtension(TestResources.UnicodeNameExe, ".pdb")); + pdb.Should().Be(expectedPdb); + } + } } \ No newline at end of file diff --git a/GoogleTestAdapter/DiaResolver.Tests/packages.config b/GoogleTestAdapter/DiaResolver.Tests/packages.config index f4e3cbeef..351b72b0d 100644 --- a/GoogleTestAdapter/DiaResolver.Tests/packages.config +++ b/GoogleTestAdapter/DiaResolver.Tests/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/GoogleTestAdapter/DiaResolver/DiaFactory.cs b/GoogleTestAdapter/DiaResolver/DiaFactory.cs index f9f8460d4..4f4f453d2 100644 --- a/GoogleTestAdapter/DiaResolver/DiaFactory.cs +++ b/GoogleTestAdapter/DiaResolver/DiaFactory.cs @@ -19,7 +19,7 @@ static DiaFactory() string path = Path.Combine(GetAssemblyBaseDir(), Is32Bit() ? "x86" : "x64", DiaDll); var ptrDll = LoadLibrary(path); if (ptrDll == IntPtr.Zero) - throw new Exception($"Cannot load {path}."); + throw new Exception(String.Format(Resources.LoadError, path)); } public static IDiaDataSource CreateInstance() @@ -48,7 +48,7 @@ private static bool Is32Bit() return IntPtr.Size == 4; } - [DllImport("Kernel32.dll")] + [DllImport("Kernel32.dll", CharSet = CharSet.Unicode)] private static extern IntPtr LoadLibrary(string path); [DllImport(DiaDll, ExactSpelling = true, PreserveSig = false)] diff --git a/GoogleTestAdapter/DiaResolver/DiaResolver.cs b/GoogleTestAdapter/DiaResolver/DiaResolver.cs index fd2b4dac6..ee958f54d 100644 --- a/GoogleTestAdapter/DiaResolver/DiaResolver.cs +++ b/GoogleTestAdapter/DiaResolver/DiaResolver.cs @@ -1,4 +1,4 @@ -// This file has been modified by Microsoft on 6/2017. +// This file has been modified by Microsoft on 8/2017. using GoogleTestAdapter.Common; using Microsoft.Dia; @@ -53,17 +53,17 @@ internal DiaResolver(string binary, string pathExtension, ILogger logger) string pdb = FindPdbFile(binary, pathExtension); if (pdb == null) { - _logger.LogWarning($"Couldn't find the .pdb file of file '{binary}'. You will not get any source locations for your tests."); + _logger.LogWarning(String.Format(Resources.PdbFileNotFoundError, binary)); return; } if (!TryCreateDiaInstance()) { - _logger.LogError("Couldn't find the msdia.dll to parse *.pdb files. You will not get any source locations for your tests."); + _logger.LogError(Resources.msdiaError); return; } - _logger.DebugInfo($"Parsing pdb file \"{pdb}\""); + _logger.DebugInfo(String.Format(Resources.ParsingFile, pdb)); _fileStream = File.Open(pdb, FileMode.Open, FileAccess.Read, FileShare.Read); _diaDataSource.loadDataFromIStream(new DiaMemoryStream(_fileStream)); @@ -93,7 +93,7 @@ private string FindPdbFile(string binary, string pathExtension) string pdb = PeParser.ExtractPdbPath(binary, _logger); if (pdb != null && File.Exists(pdb)) return pdb; - attempts.Add("parsing from executable"); + attempts.Add($"\"{binary}\""); pdb = Path.ChangeExtension(binary, ".pdb"); if (File.Exists(pdb)) @@ -120,7 +120,7 @@ private string FindPdbFile(string binary, string pathExtension) } } - _logger.DebugInfo("Attempts to find pdb: " + string.Join("::", attempts)); + _logger.DebugInfo(String.Format(Resources.AttemptsToFind, string.Join("::", attempts))); return null; } @@ -147,7 +147,7 @@ private SourceFileLocation ToSourceFileLocation(NativeSourceFileLocation nativeS IDiaEnumLineNumbers lineNumbers = GetLineNumbers(nativeSymbol.AddressSection, nativeSymbol.AddressOffset, nativeSymbol.Length); if (lineNumbers.count <= 0) { - _logger.LogWarning("Failed to locate line number for " + nativeSymbol); + _logger.LogWarning(String.Format(Resources.LineNumberError, nativeSymbol)); return new SourceFileLocation(_binary, "", 0); } @@ -186,8 +186,8 @@ private IDiaEnumSymbols FindFunctionsByRegex(string pattern) catch (NotImplementedException) { // https://developercommunity.visualstudio.com/content/problem/4631/dia-sdk-still-doesnt-support-debugfastlink.html - _logger.LogWarning("In order to get source locations for your tests, please ensure to generate *full* PDBs for your test executables."); - _logger.LogWarning("Use linker option /DEBUG:FULL (VS2017) or /DEBUG (VS2015 and older) - do not use /DEBUG:FASTLINK!"); + _logger.LogWarning(Resources.GenerateFullPDBMessage); + _logger.LogWarning(Resources.UseLinkerOption); } return result; } diff --git a/GoogleTestAdapter/DiaResolver/DiaResolver.csproj b/GoogleTestAdapter/DiaResolver/DiaResolver.csproj index a623939ae..6ee7c2275 100644 --- a/GoogleTestAdapter/DiaResolver/DiaResolver.csproj +++ b/GoogleTestAdapter/DiaResolver/DiaResolver.csproj @@ -2,7 +2,7 @@ - + Debug AnyCPU @@ -43,10 +43,17 @@ true + + $(MSBuildThisFileDirectory)..\..\loc\lcl\{Lang}\GoogleTestAdapter.DiaResolver.dll.lcl + - Microsoft + Microsoft400 StrongName + + + false + @@ -66,6 +73,11 @@ + + True + True + Resources.resx + @@ -85,11 +97,18 @@ PreserveNewest + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + - + if exist "$(SolutionDir)Keys\Key_Release.snk" ( echo Using Release key for signing assembly @@ -106,4 +125,12 @@ --> + + + + Microsoft400 + StrongName + + + \ No newline at end of file diff --git a/GoogleTestAdapter/DiaResolver/PeParser.cs b/GoogleTestAdapter/DiaResolver/PeParser.cs index 1a1104417..75988e3d9 100644 --- a/GoogleTestAdapter/DiaResolver/PeParser.cs +++ b/GoogleTestAdapter/DiaResolver/PeParser.cs @@ -1,54 +1,14 @@ -using System; +// This file has been modified by Microsoft on 4/2020. + +using GoogleTestAdapter.Common; +using Microsoft.Win32.SafeHandles; +using System; using System.Collections.Generic; using System.Runtime.InteropServices; -using GoogleTestAdapter.Common; +using System.Text; namespace GoogleTestAdapter.DiaResolver { - - [StructLayout(LayoutKind.Sequential)] - // ReSharper disable once InconsistentNaming - struct LOADED_IMAGE - { - public IntPtr ModuleName; - public IntPtr hFile; - public IntPtr MappedAddress; - public IntPtr FileHeader; - public IntPtr LastRvaSection; - public uint NumbOfSections; - public IntPtr FirstRvaSection; - public uint charachteristics; - public ushort systemImage; - public ushort dosImage; - public ushort readOnly; - public ushort version; - public IntPtr links_1; - public IntPtr links_2; - public uint sizeOfImage; - public IntPtr links_3; - public IntPtr links_4; - public IntPtr links_5; - } - - [StructLayout(LayoutKind.Explicit)] - // ReSharper disable once InconsistentNaming - struct IMAGE_IMPORT_DESCRIPTOR - { - [FieldOffset(0)] - public uint Characteristics; - [FieldOffset(0)] - public uint OriginalFirstThunk; - - [FieldOffset(4)] - public uint TimeDateStamp; - [FieldOffset(8)] - public uint ForwarderChain; - [FieldOffset(12)] - public uint Name; - [FieldOffset(16)] - public uint FirstThunk; - } - [StructLayout(LayoutKind.Explicit)] // ReSharper disable once InconsistentNaming struct IMAGE_DEBUG_DIRECTORY @@ -78,6 +38,57 @@ struct IMAGE_DEBUG_DIRECTORY public uint PointerToRawData; } + [StructLayout(LayoutKind.Sequential)] + unsafe struct IMAGE_DOS_HEADER + { + public ushort e_magic; + public ushort e_cblp; + public ushort e_cp; + public ushort e_crlc; + public ushort e_cparhdr; + public ushort e_minalloc; + public ushort e_maxalloc; + public ushort e_ss; + public ushort e_sp; + public ushort e_csum; + public ushort e_ip; + public ushort e_cs; + public ushort e_lfarlc; + public ushort e_ovno; + public fixed ushort e_res1[4]; + public ushort e_oemid; + public ushort e_oeminfo; + public fixed ushort e_res2[10]; + public int e_lfanew; + } + + [StructLayout(LayoutKind.Explicit)] + // ReSharper disable once InconsistentNaming + struct IMAGE_IMPORT_DESCRIPTOR + { + [FieldOffset(0)] + public uint Characteristics; + [FieldOffset(0)] + public uint OriginalFirstThunk; + + [FieldOffset(4)] + public uint TimeDateStamp; + [FieldOffset(8)] + public uint ForwarderChain; + [FieldOffset(12)] + public uint Name; + [FieldOffset(16)] + public uint FirstThunk; + } + + [StructLayout(LayoutKind.Sequential)] + unsafe struct IMAGE_NT_HEADERS + { + public int Signature; + public fixed byte FileHeader[20]; + public fixed byte OptionalHeader[224]; + } + [StructLayout(LayoutKind.Explicit)] struct PdbInfo { @@ -97,60 +108,207 @@ struct PdbInfo public byte PdbFileName; } + struct LoadedImage + { + public IntPtr MappedAddress; + public IntPtr FileHeader; + } + unsafe public static class PeParser { private static class NativeMethods { - [DllImport("imageHlp.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Ansi, BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern bool MapAndLoad(string imageName, string dllPath, LOADED_IMAGE* loadedImage, bool dotDll, bool readOnly); + public const ushort IMAGE_DOS_SIGNATURE = 0x5A4D; + public const ushort IMAGE_NT_SIGNATURE = 0x00004550; + + public const uint GENERIC_READ = unchecked(0x80000000); + public const uint FILE_MAP_READ = 0x0004; + public const uint FILE_SHARE_READ = 0x00000001; + public const uint OPEN_EXISTING = 3; + public const uint PAGE_READONLY = 0x02; + + [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + public static extern SafeFileHandle CreateFile( + string lpFileName, uint dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes, + uint dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile); + + [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + public static extern SafeFileHandle CreateFileMapping( + SafeFileHandle hFile, IntPtr lpFileMappingAttributes, uint flProtect, + uint dwMaximumSizeHigh, uint dwMaximumSizeLow, string lpName); - [DllImport("imageHlp.dll", CallingConvention = CallingConvention.Winapi)] - public static extern bool UnMapAndLoad(ref LOADED_IMAGE loadedImage); + [DllImport("kernel32.dll", SetLastError = true)] + public static extern bool GetFileSizeEx(SafeFileHandle hFile, out long lpFileSize); - [DllImport("dbghelp.dll", CallingConvention = CallingConvention.Winapi)] + [DllImport("kernel32.dll", SetLastError = true)] + public static extern IntPtr MapViewOfFile( + SafeFileHandle hFileMappingObject, uint dwDesiredAccess, uint dwFileOffsetHigh, + uint dwFileOffsetLow, UIntPtr dwNumberOfBytesToMap); + + [DllImport("kernel32.dll", SetLastError = true)] + public static extern bool UnmapViewOfFile(IntPtr lpBaseAddress); + + [DllImport("dbghelp.dll")] public static extern void* ImageDirectoryEntryToData(IntPtr pBase, byte mappedAsImage, ushort directoryEntry, uint* size); - [DllImport("dbghelp.dll", CallingConvention = CallingConvention.Winapi)] + [DllImport("dbghelp.dll")] public static extern IntPtr ImageRvaToVa(IntPtr pNtHeaders, IntPtr pBase, uint rva, IntPtr pLastRvaSection); } - private static void ParsePeFile(string executable, ILogger logger, Action action) + private static bool MapAndLoad(string imageName, out LoadedImage loadedImage) + { + loadedImage = new LoadedImage(); + + long fileSize; + IntPtr mapAddr; + using (var hFile = NativeMethods.CreateFile(imageName, NativeMethods.GENERIC_READ, + NativeMethods.FILE_SHARE_READ, IntPtr.Zero, NativeMethods.OPEN_EXISTING, 0, IntPtr.Zero)) + { + if (hFile.IsInvalid) + return false; + + if (!NativeMethods.GetFileSizeEx(hFile, out fileSize)) + return false; + + using (var hMapping = NativeMethods.CreateFileMapping(hFile, IntPtr.Zero, NativeMethods.PAGE_READONLY, 0, 0, null)) + { + if (hMapping.IsInvalid) + return false; + + mapAddr = NativeMethods.MapViewOfFile(hMapping, NativeMethods.FILE_MAP_READ, 0, 0, UIntPtr.Zero); + if (mapAddr == IntPtr.Zero) + return false; + } + } + + unsafe + { + if (fileSize < Marshal.SizeOf()) + return false; + + var dosHeader = (IMAGE_DOS_HEADER*)mapAddr; + IMAGE_NT_HEADERS* rawFileHeader; + if (dosHeader->e_magic == NativeMethods.IMAGE_DOS_SIGNATURE) + { + if (dosHeader->e_lfanew <= 0 + || fileSize < dosHeader->e_lfanew + Marshal.SizeOf()) + { + return false; + } + + rawFileHeader = (IMAGE_NT_HEADERS*)((byte*)mapAddr + dosHeader->e_lfanew); + } + else if (dosHeader->e_magic == NativeMethods.IMAGE_NT_SIGNATURE) + { + if (fileSize < Marshal.SizeOf()) + return false; + + rawFileHeader = (IMAGE_NT_HEADERS*)mapAddr; + } + else + { + return false; + } + + if (rawFileHeader->Signature != NativeMethods.IMAGE_NT_SIGNATURE) + return false; + + loadedImage.MappedAddress = mapAddr; + loadedImage.FileHeader = (IntPtr)rawFileHeader; + return true; + } + } + + private static bool UnMapAndLoad(ref LoadedImage loadedImage) { - LOADED_IMAGE image = new LOADED_IMAGE(); + if (NativeMethods.UnmapViewOfFile(loadedImage.MappedAddress)) + { + loadedImage = new LoadedImage(); + return true; + } + return false; + } + + private static void ParsePeFile(string executable, ILogger logger, Action action) + { + LoadedImage image = new LoadedImage(); bool loaded = false; try { - loaded = NativeMethods.MapAndLoad(executable, null, &image, true, true); + loaded = MapAndLoad(executable, out image); if(loaded) action(image); } finally { - if (loaded && !NativeMethods.UnMapAndLoad(ref image)) - logger.LogError("UnMapAndLoad failed!"); + if (loaded && !UnMapAndLoad(ref image)) + logger.LogError(Resources.UnMapLoad); } } - public static List ParseImports(string executable, ILogger logger) + private static void ProcessImports(string executable, ILogger logger, Func predicate) { - var imports = new List(); ParsePeFile(executable, logger, (image) => { + bool shouldContinue = true; uint size = 0u; var directoryEntry = (IMAGE_IMPORT_DESCRIPTOR*)NativeMethods.ImageDirectoryEntryToData(image.MappedAddress, 0, 1, &size); - while (directoryEntry->OriginalFirstThunk != 0u) + if (directoryEntry == null) { - imports.Add(GetString(image, directoryEntry->Name)); + logger.LogError(Resources.ImageDirectoryEntryToData); + return; + } + while (shouldContinue && directoryEntry->OriginalFirstThunk != 0u) + { + shouldContinue = predicate(GetString(image, directoryEntry->Name)); directoryEntry++; } }); + } + + public static List ParseImports(string executable, ILogger logger) + { + var imports = new List(); + ProcessImports(executable, logger, (import) => + { + imports.Add(import); + return true; // Always continue. + }); return imports; } - private static string GetString(LOADED_IMAGE image, uint offset) + public static bool FindImport(string executable, List imports, StringComparison comparisonType, ILogger logger) + { + var found = false; + ProcessImports(executable, logger, (currentImport) => + { + foreach (var import in imports) + found = found || String.Compare(import, currentImport, comparisonType) == 0; + + return !found; // Continue only if not found yet. + }); + return found; + } + + private static string PtrToStringUtf8(IntPtr ptr) + { + if (ptr == IntPtr.Zero) + return null; + + int size = 0; + while (Marshal.ReadByte(ptr, size) != 0) + ++size; + + byte[] buffer = new byte[size]; + Marshal.Copy(ptr, buffer, 0, buffer.Length); + + return Encoding.UTF8.GetString(buffer); + } + + private static string GetString(LoadedImage image, uint offset) { IntPtr stringPtr = NativeMethods.ImageRvaToVa(image.FileHeader, image.MappedAddress, offset, IntPtr.Zero); - return Marshal.PtrToStringAnsi(stringPtr); + return PtrToStringUtf8(stringPtr); } // Most windows executables contain the path to their PDB @@ -167,10 +325,14 @@ public static string ExtractPdbPath(string executable, ILogger logger) { uint size = 0u; var dbgDir = (IMAGE_DEBUG_DIRECTORY*)NativeMethods.ImageDirectoryEntryToData(image.MappedAddress, 0, 6, &size); - if (dbgDir->SizeOfData > 0) + if (dbgDir == null) + { + logger.LogError(Resources.ImageDirectoryEntryToData); + } + else if (dbgDir->SizeOfData > 0) { var pdbInfo = (PdbInfo*)NativeMethods.ImageRvaToVa(image.FileHeader, image.MappedAddress, dbgDir->AddressOfRawData, IntPtr.Zero); - pdbPath = Marshal.PtrToStringAnsi(new IntPtr(&pdbInfo->PdbFileName)); + pdbPath = PtrToStringUtf8(new IntPtr(&pdbInfo->PdbFileName)); } }); diff --git a/GoogleTestAdapter/DiaResolver/Resources.Designer.cs b/GoogleTestAdapter/DiaResolver/Resources.Designer.cs new file mode 100644 index 000000000..25dc83539 --- /dev/null +++ b/GoogleTestAdapter/DiaResolver/Resources.Designer.cs @@ -0,0 +1,153 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace GoogleTestAdapter.DiaResolver { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GoogleTestAdapter.DiaResolver.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Attempts to find PDB: {0}. + /// + internal static string AttemptsToFind { + get { + return ResourceManager.GetString("AttemptsToFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to In order to get source locations for your tests, please ensure to generate *full* PDBs for your test executables.. + /// + internal static string GenerateFullPDBMessage { + get { + return ResourceManager.GetString("GenerateFullPDBMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ImageDirectoryEntryToData failed!. + /// + internal static string ImageDirectoryEntryToData { + get { + return ResourceManager.GetString("ImageDirectoryEntryToData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to locate line number for {0}. + /// + internal static string LineNumberError { + get { + return ResourceManager.GetString("LineNumberError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot load {0}.. + /// + internal static string LoadError { + get { + return ResourceManager.GetString("LoadError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Couldn't find the msdia.dll to parse *.pdb files. You will not get any source locations for your tests.. + /// + internal static string msdiaError { + get { + return ResourceManager.GetString("msdiaError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing PDB file {0}. + /// + internal static string ParsingFile { + get { + return ResourceManager.GetString("ParsingFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Couldn't find the .pdb file of file '{0}'. You will not get any source locations for your tests.. + /// + internal static string PdbFileNotFoundError { + get { + return ResourceManager.GetString("PdbFileNotFoundError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to UnMapAndLoad failed!. + /// + internal static string UnMapLoad { + get { + return ResourceManager.GetString("UnMapLoad", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Use linker option /DEBUG:FULL (Visual Studio 2017) or /DEBUG (Visual Studio 2015 and older) - do not use /DEBUG:FASTLINK!. + /// + internal static string UseLinkerOption { + get { + return ResourceManager.GetString("UseLinkerOption", resourceCulture); + } + } + } +} diff --git a/GoogleTestAdapter/DiaResolver/Resources.resx b/GoogleTestAdapter/DiaResolver/Resources.resx new file mode 100644 index 000000000..435ceab19 --- /dev/null +++ b/GoogleTestAdapter/DiaResolver/Resources.resx @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + In order to get source locations for your tests, please ensure to generate *full* PDBs for your test executables. + + + Failed to locate line number for {0} + {0} represents an unlocalized symbol name (e.g. "foo") + + + Couldn't find the msdia.dll to parse *.pdb files. You will not get any source locations for your tests. + + + Couldn't find the .pdb file of file '{0}'. You will not get any source locations for your tests. + {0} represents unlocalized file path (e.g c:\test\foo.exe) + + + Use linker option /DEBUG:FULL (Visual Studio 2017) or /DEBUG (Visual Studio 2015 and older) - do not use /DEBUG:FASTLINK! + + + UnMapAndLoad failed! + + + Attempts to find PDB: {0} + {0} is a list of locations attempted + + + Parsing PDB file {0} + {0} represents unlocalized file path (e.g c:\test\foo.pdb) + + + Cannot load {0}. + {0} represents unlocalized file path (e.g c:\test\foo.pdb) + + + ImageDirectoryEntryToData failed! + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/Application.cpp b/GoogleTestAdapter/FakeGtestDll/Application.cpp new file mode 100644 index 000000000..c83a138d7 --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/Application.cpp @@ -0,0 +1,6 @@ +__declspec(dllimport) void FakeGtestDllLibrary_ExportedFunction(); + +int main() +{ + FakeGtestDllLibrary_ExportedFunction(); +} diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication-x64.vcxproj b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication-x64.vcxproj new file mode 100644 index 000000000..75991a89d --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication-x64.vcxproj @@ -0,0 +1,97 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {05C435E1-603C-4402-B28C-E54932F3131C} + Win32Proj + FakeGtestDllApplication + 8.1 + + + + + Application + true + v100 + v110 + v120 + v140 + v141 + Unicode + + + Application + false + v100 + v110 + v120 + v140 + v141 + true + Unicode + + + + + + + + + + + + + + + true + + + false + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Console + true + + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Console + true + + + + + + + + {8c66b902-b3b3-40c1-b178-7f5405f654b0} + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication-x64.vcxproj.filters b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication-x64.vcxproj.filters new file mode 100644 index 000000000..ebc9c0a7b --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication-x64.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication.vcxproj b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication.vcxproj new file mode 100644 index 000000000..49430806f --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication.vcxproj @@ -0,0 +1,97 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {C2601F9E-8B97-4901-85F4-2531102543C8} + Win32Proj + FakeGtestDllApplication + 8.1 + + + + + Application + true + v100 + v110 + v120 + v140 + v141 + Unicode + + + Application + false + v100 + v110 + v120 + v140 + v141 + true + Unicode + + + + + + + + + + + + + + + true + + + false + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Console + true + + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Console + true + + + + + + + + {db701549-3f79-4d1d-9db9-ca55683d679e} + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication.vcxproj.filters b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication.vcxproj.filters new file mode 100644 index 000000000..ebc9c0a7b --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllApplication.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary-x64.vcxproj b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary-x64.vcxproj new file mode 100644 index 000000000..9a69bc133 --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary-x64.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {8C66B902-B3B3-40C1-B178-7F5405F654B0} + Win32Proj + FakeGtestDllLibrary + 8.1 + + + + + DynamicLibrary + true + v100 + v110 + v120 + v140 + v141 + Unicode + + + DynamicLibrary + false + v100 + v110 + v120 + v140 + v141 + true + Unicode + + + + + + + + + + + + + + + true + gtest + + + false + gtest + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Windows + true + + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Windows + true + + + + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary-x64.vcxproj.filters b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary-x64.vcxproj.filters new file mode 100644 index 000000000..e82218324 --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary-x64.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary.vcxproj b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary.vcxproj new file mode 100644 index 000000000..ee54d657c --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary.vcxproj @@ -0,0 +1,94 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {DB701549-3F79-4D1D-9DB9-CA55683D679E} + Win32Proj + FakeGtestDllLibrary + 8.1 + + + + + DynamicLibrary + true + v100 + v110 + v120 + v140 + v141 + Unicode + + + DynamicLibrary + false + v100 + v110 + v120 + v140 + v141 + true + Unicode + + + + + + + + + + + + + + + true + gtest + + + false + gtest + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Windows + true + + + + + Level3 + Disabled + true + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + + Windows + true + + + + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary.vcxproj.filters b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary.vcxproj.filters new file mode 100644 index 000000000..e82218324 --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/FakeGtestDllLibrary.vcxproj.filters @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/FakeGtestDll/Library.cpp b/GoogleTestAdapter/FakeGtestDll/Library.cpp new file mode 100644 index 000000000..7b03763d7 --- /dev/null +++ b/GoogleTestAdapter/FakeGtestDll/Library.cpp @@ -0,0 +1 @@ +__declspec(dllexport) void FakeGtestDllLibrary_ExportedFunction() {} \ No newline at end of file diff --git a/GoogleTestAdapter/GoogleTestAdapter.sln b/GoogleTestAdapter/GoogleTestAdapter.sln index 7dcc3e168..170598ca3 100644 --- a/GoogleTestAdapter/GoogleTestAdapter.sln +++ b/GoogleTestAdapter/GoogleTestAdapter.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.26717.1 +VisualStudioVersion = 15.0.27120.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{1F754A4D-BD42-4368-8B90-F3C03F24A2F3}" ProjectSection(SolutionItems) = preProject @@ -130,6 +130,20 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Packaging.TAfGT", "Packagin EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SemaphoreExe", "SemaphoreExe\SemaphoreExe.vcxproj", "{F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnicodeNameExe", "UnicodeNameExe\UnicodeNameExe.vcxproj", "{8B27FD59-F03C-468E-B878-CFFC7484B7F7}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FakeGtestDllLibrary", "FakeGtestDll\FakeGtestDllLibrary.vcxproj", "{DB701549-3F79-4D1D-9DB9-CA55683D679E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FakeGtestDllLibrary-x64", "FakeGtestDll\FakeGtestDllLibrary-x64.vcxproj", "{8C66B902-B3B3-40C1-B178-7F5405F654B0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FakeGtestDllApplication", "FakeGtestDll\FakeGtestDllApplication.vcxproj", "{C2601F9E-8B97-4901-85F4-2531102543C8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FakeGtestDllApplication-x64", "FakeGtestDll\FakeGtestDllApplication-x64.vcxproj", "{05C435E1-603C-4402-B28C-E54932F3131C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoogleTestProjectTemplate", "GoogleTestProjectTemplate\GoogleTestProjectTemplate.csproj", "{A56C1F19-EAA6-4C99-BAC3-2B14D0CCC544}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GoogleTestItemTemplate", "GoogleTestItemTemplate\GoogleTestItemTemplate.csproj", "{87A1108A-3819-4B31-99EA-217F3E11E958}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution VsPackage.Shared\VsPackage.Shared.projitems*{55294b5f-a075-43f2-b0e9-2b11925e8b91}*SharedItemsImports = 4 @@ -138,369 +152,145 @@ Global EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Debug|x64.ActiveCfg = Debug|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Debug|x64.Build.0 = Debug|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Debug|x86.ActiveCfg = Debug|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Debug|x86.Build.0 = Debug|Any CPU {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Release|Any CPU.ActiveCfg = Release|Any CPU {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Release|Any CPU.Build.0 = Release|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Release|x64.ActiveCfg = Release|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Release|x64.Build.0 = Release|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Release|x86.ActiveCfg = Release|Any CPU - {E6276CAD-E4C3-4B25-876A-65B265EBFF1A}.Release|x86.Build.0 = Release|Any CPU {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Debug|x64.ActiveCfg = Debug|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Debug|x64.Build.0 = Debug|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Debug|x86.ActiveCfg = Debug|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Debug|x86.Build.0 = Debug|Any CPU {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Release|Any CPU.ActiveCfg = Release|Any CPU {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Release|Any CPU.Build.0 = Release|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Release|x64.ActiveCfg = Release|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Release|x64.Build.0 = Release|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Release|x86.ActiveCfg = Release|Any CPU - {55294B5F-A075-43F2-B0E9-2B11925E8B91}.Release|x86.Build.0 = Release|Any CPU {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Debug|x64.ActiveCfg = Debug|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Debug|x64.Build.0 = Debug|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Debug|x86.ActiveCfg = Debug|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Debug|x86.Build.0 = Debug|Any CPU {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Release|Any CPU.ActiveCfg = Release|Any CPU {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Release|Any CPU.Build.0 = Release|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Release|x64.ActiveCfg = Release|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Release|x64.Build.0 = Release|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Release|x86.ActiveCfg = Release|Any CPU - {44C04E51-D543-4155-A57E-BBEB73D3F8E5}.Release|x86.Build.0 = Release|Any CPU {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Debug|x64.ActiveCfg = Debug|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Debug|x64.Build.0 = Debug|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Debug|x86.ActiveCfg = Debug|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Debug|x86.Build.0 = Debug|Any CPU {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Release|Any CPU.ActiveCfg = Release|Any CPU {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Release|Any CPU.Build.0 = Release|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Release|x64.ActiveCfg = Release|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Release|x64.Build.0 = Release|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Release|x86.ActiveCfg = Release|Any CPU - {B06C696E-E458-490A-AC44-9E4F460DBAFE}.Release|x86.Build.0 = Release|Any CPU {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Debug|x64.ActiveCfg = Debug|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Debug|x64.Build.0 = Debug|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Debug|x86.ActiveCfg = Debug|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Debug|x86.Build.0 = Debug|Any CPU {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Release|Any CPU.ActiveCfg = Release|Any CPU {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Release|Any CPU.Build.0 = Release|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Release|x64.ActiveCfg = Release|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Release|x64.Build.0 = Release|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Release|x86.ActiveCfg = Release|Any CPU - {FDC95D92-5E1E-4BDF-AA35-181851FCE755}.Release|x86.Build.0 = Release|Any CPU {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Debug|x64.ActiveCfg = Debug|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Debug|x64.Build.0 = Debug|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Debug|x86.ActiveCfg = Debug|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Debug|x86.Build.0 = Debug|Any CPU {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Release|Any CPU.ActiveCfg = Release|Any CPU {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Release|Any CPU.Build.0 = Release|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Release|x64.ActiveCfg = Release|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Release|x64.Build.0 = Release|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Release|x86.ActiveCfg = Release|Any CPU - {A3ADB538-F3DF-4C5F-960D-11B6DF66A1A3}.Release|x86.Build.0 = Release|Any CPU {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Debug|Any CPU.Build.0 = Debug|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Debug|x64.ActiveCfg = Debug|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Debug|x64.Build.0 = Debug|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Debug|x86.ActiveCfg = Debug|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Debug|x86.Build.0 = Debug|Any CPU {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Release|Any CPU.ActiveCfg = Release|Any CPU {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Release|Any CPU.Build.0 = Release|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Release|x64.ActiveCfg = Release|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Release|x64.Build.0 = Release|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Release|x86.ActiveCfg = Release|Any CPU - {941BA1B7-2CF4-4D5C-8680-5C73CD6FE197}.Release|x86.Build.0 = Release|Any CPU {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Debug|x64.ActiveCfg = Debug|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Debug|x64.Build.0 = Debug|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Debug|x86.ActiveCfg = Debug|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Debug|x86.Build.0 = Debug|Any CPU {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Release|Any CPU.ActiveCfg = Release|Any CPU {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Release|Any CPU.Build.0 = Release|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Release|x64.ActiveCfg = Release|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Release|x64.Build.0 = Release|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Release|x86.ActiveCfg = Release|Any CPU - {7F4372DA-70E2-48D0-BEE2-8043528428D0}.Release|x86.Build.0 = Release|Any CPU {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Debug|x64.ActiveCfg = Debug|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Debug|x64.Build.0 = Debug|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Debug|x86.ActiveCfg = Debug|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Debug|x86.Build.0 = Debug|Any CPU {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Release|Any CPU.ActiveCfg = Release|Any CPU {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Release|Any CPU.Build.0 = Release|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Release|x64.ActiveCfg = Release|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Release|x64.Build.0 = Release|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Release|x86.ActiveCfg = Release|Any CPU - {B9C827B5-DC90-4A78-B477-852EAE1196AF}.Release|x86.Build.0 = Release|Any CPU {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Debug|x64.ActiveCfg = Debug|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Debug|x64.Build.0 = Debug|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Debug|x86.ActiveCfg = Debug|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Debug|x86.Build.0 = Debug|Any CPU {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Release|Any CPU.Build.0 = Release|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Release|x64.ActiveCfg = Release|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Release|x64.Build.0 = Release|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Release|x86.ActiveCfg = Release|Any CPU - {032BEBF7-2D2B-4CFD-B53D-E3D21B3AC9D6}.Release|x86.Build.0 = Release|Any CPU {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Debug|x64.ActiveCfg = Debug|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Debug|x64.Build.0 = Debug|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Debug|x86.ActiveCfg = Debug|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Debug|x86.Build.0 = Debug|Any CPU {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Release|Any CPU.Build.0 = Release|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Release|x64.ActiveCfg = Release|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Release|x64.Build.0 = Release|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Release|x86.ActiveCfg = Release|Any CPU - {BC05D210-68CD-47D0-AE8C-0F3168D1BE73}.Release|x86.Build.0 = Release|Any CPU {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Debug|x64.ActiveCfg = Debug|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Debug|x64.Build.0 = Debug|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Debug|x86.ActiveCfg = Debug|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Debug|x86.Build.0 = Debug|Any CPU {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Release|Any CPU.ActiveCfg = Release|Any CPU {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Release|Any CPU.Build.0 = Release|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Release|x64.ActiveCfg = Release|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Release|x64.Build.0 = Release|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Release|x86.ActiveCfg = Release|Any CPU - {17F4B73F-E4D3-4E40-98FC-788B1D0F8225}.Release|x86.Build.0 = Release|Any CPU {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Debug|x64.ActiveCfg = Debug|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Debug|x64.Build.0 = Debug|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Debug|x86.ActiveCfg = Debug|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Debug|x86.Build.0 = Debug|Any CPU {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Release|Any CPU.ActiveCfg = Release|Any CPU {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Release|Any CPU.Build.0 = Release|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Release|x64.ActiveCfg = Release|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Release|x64.Build.0 = Release|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Release|x86.ActiveCfg = Release|Any CPU - {9041BDED-FA1B-4C17-B7EA-7B750C470C23}.Release|x86.Build.0 = Release|Any CPU {87F26371-0005-4301-9C49-A6DF4F06B81C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {87F26371-0005-4301-9C49-A6DF4F06B81C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Debug|x64.ActiveCfg = Debug|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Debug|x64.Build.0 = Debug|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Debug|x86.ActiveCfg = Debug|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Debug|x86.Build.0 = Debug|Any CPU {87F26371-0005-4301-9C49-A6DF4F06B81C}.Release|Any CPU.ActiveCfg = Release|Any CPU {87F26371-0005-4301-9C49-A6DF4F06B81C}.Release|Any CPU.Build.0 = Release|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Release|x64.ActiveCfg = Release|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Release|x64.Build.0 = Release|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Release|x86.ActiveCfg = Release|Any CPU - {87F26371-0005-4301-9C49-A6DF4F06B81C}.Release|x86.Build.0 = Release|Any CPU {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Debug|x64.ActiveCfg = Debug|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Debug|x64.Build.0 = Debug|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Debug|x86.ActiveCfg = Debug|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Debug|x86.Build.0 = Debug|Any CPU {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Release|Any CPU.ActiveCfg = Release|Any CPU {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Release|Any CPU.Build.0 = Release|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Release|x64.ActiveCfg = Release|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Release|x64.Build.0 = Release|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Release|x86.ActiveCfg = Release|Any CPU - {12952B24-C70B-4A26-839A-EE4183BE8CC0}.Release|x86.Build.0 = Release|Any CPU {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Debug|x64.ActiveCfg = Debug|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Debug|x64.Build.0 = Debug|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Debug|x86.ActiveCfg = Debug|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Debug|x86.Build.0 = Debug|Any CPU {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Release|Any CPU.Build.0 = Release|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Release|x64.ActiveCfg = Release|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Release|x64.Build.0 = Release|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Release|x86.ActiveCfg = Release|Any CPU - {2F0E4458-6C1C-461F-A60A-B731AD97E839}.Release|x86.Build.0 = Release|Any CPU {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Debug|x64.ActiveCfg = Debug|x64 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Debug|x64.Build.0 = Debug|x64 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Debug|x86.ActiveCfg = Debug|Win32 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Debug|x86.Build.0 = Debug|Win32 {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Release|Any CPU.ActiveCfg = Release|Win32 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Release|x64.ActiveCfg = Release|x64 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Release|x64.Build.0 = Release|x64 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Release|x86.ActiveCfg = Release|Win32 - {04990B2A-C7B5-40DA-A856-230E1E062FF1}.Release|x86.Build.0 = Release|Win32 {A5AA0879-9511-420A-9025-1AB87FAB7348}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Debug|x64.ActiveCfg = Debug|x64 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Debug|x64.Build.0 = Debug|x64 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Debug|x86.ActiveCfg = Debug|Win32 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Debug|x86.Build.0 = Debug|Win32 {A5AA0879-9511-420A-9025-1AB87FAB7348}.Release|Any CPU.ActiveCfg = Release|Win32 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Release|x64.ActiveCfg = Release|x64 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Release|x64.Build.0 = Release|x64 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Release|x86.ActiveCfg = Release|Win32 - {A5AA0879-9511-420A-9025-1AB87FAB7348}.Release|x86.Build.0 = Release|Win32 {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Debug|x64.ActiveCfg = Debug|x64 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Debug|x64.Build.0 = Debug|x64 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Debug|x86.ActiveCfg = Debug|Win32 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Debug|x86.Build.0 = Debug|Win32 {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Release|Any CPU.ActiveCfg = Release|Win32 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Release|x64.ActiveCfg = Release|x64 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Release|x64.Build.0 = Release|x64 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Release|x86.ActiveCfg = Release|Win32 - {446DA549-6EEF-4C48-A73C-F35B79C0BDE9}.Release|x86.Build.0 = Release|Win32 {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Debug|x64.ActiveCfg = Debug|x64 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Debug|x64.Build.0 = Debug|x64 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Debug|x86.ActiveCfg = Debug|Win32 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Debug|x86.Build.0 = Debug|Win32 {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Release|Any CPU.ActiveCfg = Release|Win32 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Release|x64.ActiveCfg = Release|x64 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Release|x64.Build.0 = Release|x64 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Release|x86.ActiveCfg = Release|Win32 - {1F2C133F-B7BD-4446-A65C-3F7EF9A22CE0}.Release|x86.Build.0 = Release|Win32 {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Debug|x64.ActiveCfg = Debug|x64 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Debug|x64.Build.0 = Debug|x64 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Debug|x86.ActiveCfg = Debug|Win32 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Debug|x86.Build.0 = Debug|Win32 {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Release|Any CPU.ActiveCfg = Release|Win32 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Release|x64.ActiveCfg = Release|x64 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Release|x64.Build.0 = Release|x64 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Release|x86.ActiveCfg = Release|Win32 - {4A4606CD-6D7B-4F76-8981-46D3C74E18BD}.Release|x86.Build.0 = Release|Win32 {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Debug|x64.ActiveCfg = Debug|x64 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Debug|x64.Build.0 = Debug|x64 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Debug|x86.ActiveCfg = Debug|Win32 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Debug|x86.Build.0 = Debug|Win32 {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Release|Any CPU.ActiveCfg = Release|Win32 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Release|x64.ActiveCfg = Release|x64 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Release|x64.Build.0 = Release|x64 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Release|x86.ActiveCfg = Release|Win32 - {7F98DAED-D035-4DFB-9E78-10D1C8FA3A32}.Release|x86.Build.0 = Release|Win32 {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Debug|Any CPU.ActiveCfg = Debug|Win32 {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Debug|Any CPU.Build.0 = Debug|Win32 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Debug|x64.ActiveCfg = Debug|x64 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Debug|x64.Build.0 = Debug|x64 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Debug|x86.ActiveCfg = Debug|Win32 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Debug|x86.Build.0 = Debug|Win32 {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Release|Any CPU.ActiveCfg = Release|Win32 {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Release|Any CPU.Build.0 = Release|Win32 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Release|x64.ActiveCfg = Release|x64 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Release|x64.Build.0 = Release|x64 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Release|x86.ActiveCfg = Release|Win32 - {6EFFF365-F626-4BBA-A255-38468E4DF6E0}.Release|x86.Build.0 = Release|Win32 {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Debug|x64.ActiveCfg = Debug|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Debug|x64.Build.0 = Debug|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Debug|x86.ActiveCfg = Debug|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Debug|x86.Build.0 = Debug|Any CPU {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Release|Any CPU.ActiveCfg = Release|Any CPU {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Release|Any CPU.Build.0 = Release|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Release|x64.ActiveCfg = Release|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Release|x64.Build.0 = Release|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Release|x86.ActiveCfg = Release|Any CPU - {F4B47B1D-41B2-4C7A-804D-4664B590A4F7}.Release|x86.Build.0 = Release|Any CPU {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Debug|Any CPU.ActiveCfg = Debug|Win32 {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Debug|Any CPU.Build.0 = Debug|Win32 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Debug|x64.ActiveCfg = Debug|x64 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Debug|x64.Build.0 = Debug|x64 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Debug|x86.ActiveCfg = Debug|Win32 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Debug|x86.Build.0 = Debug|Win32 {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Release|Any CPU.ActiveCfg = Release|Win32 {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Release|Any CPU.Build.0 = Release|Win32 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Release|x64.ActiveCfg = Release|x64 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Release|x64.Build.0 = Release|x64 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Release|x86.ActiveCfg = Release|Win32 - {72AEA89D-FA32-4E4F-BA04-9C670B53F746}.Release|x86.Build.0 = Release|Win32 {BAB53542-85AA-4780-9F48-2984C036189A}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {BAB53542-85AA-4780-9F48-2984C036189A}.Debug|x64.ActiveCfg = Debug|x64 - {BAB53542-85AA-4780-9F48-2984C036189A}.Debug|x64.Build.0 = Debug|x64 - {BAB53542-85AA-4780-9F48-2984C036189A}.Debug|x86.ActiveCfg = Debug|Win32 - {BAB53542-85AA-4780-9F48-2984C036189A}.Debug|x86.Build.0 = Debug|Win32 {BAB53542-85AA-4780-9F48-2984C036189A}.Release|Any CPU.ActiveCfg = Release|Win32 - {BAB53542-85AA-4780-9F48-2984C036189A}.Release|x64.ActiveCfg = Release|x64 - {BAB53542-85AA-4780-9F48-2984C036189A}.Release|x64.Build.0 = Release|x64 - {BAB53542-85AA-4780-9F48-2984C036189A}.Release|x86.ActiveCfg = Release|Win32 - {BAB53542-85AA-4780-9F48-2984C036189A}.Release|x86.Build.0 = Release|Win32 {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Debug|x64.ActiveCfg = Debug|x64 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Debug|x64.Build.0 = Debug|x64 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Debug|x86.ActiveCfg = Debug|Win32 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Debug|x86.Build.0 = Debug|Win32 {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Release|Any CPU.ActiveCfg = Release|Win32 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Release|x64.ActiveCfg = Release|x64 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Release|x64.Build.0 = Release|x64 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Release|x86.ActiveCfg = Release|Win32 - {2E3221EB-86DA-427D-84EC-DEFD3F966D9A}.Release|x86.Build.0 = Release|Win32 {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Debug|x64.ActiveCfg = Debug|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Debug|x64.Build.0 = Debug|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Debug|x86.ActiveCfg = Debug|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Debug|x86.Build.0 = Debug|Any CPU {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Release|Any CPU.ActiveCfg = Release|Any CPU {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Release|Any CPU.Build.0 = Release|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Release|x64.ActiveCfg = Release|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Release|x64.Build.0 = Release|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Release|x86.ActiveCfg = Release|Any CPU - {483FE0C7-4E8D-4591-BE45-EAC6B2EA5F4F}.Release|x86.Build.0 = Release|Any CPU {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Debug|x64.ActiveCfg = Debug|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Debug|x64.Build.0 = Debug|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Debug|x86.ActiveCfg = Debug|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Debug|x86.Build.0 = Debug|Any CPU {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Release|Any CPU.ActiveCfg = Release|Any CPU {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Release|Any CPU.Build.0 = Release|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Release|x64.ActiveCfg = Release|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Release|x64.Build.0 = Release|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Release|x86.ActiveCfg = Release|Any CPU - {4735D8CC-FA30-432D-854C-2984A7DA5DD2}.Release|x86.Build.0 = Release|Any CPU {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Debug|x64.ActiveCfg = Debug|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Debug|x64.Build.0 = Debug|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Debug|x86.ActiveCfg = Debug|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Debug|x86.Build.0 = Debug|Any CPU {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Release|Any CPU.Build.0 = Release|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Release|x64.ActiveCfg = Release|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Release|x64.Build.0 = Release|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Release|x86.ActiveCfg = Release|Any CPU - {B3AEAD11-8EA3-4AB0-9DB0-643BFAAEB9B2}.Release|x86.Build.0 = Release|Any CPU {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Debug|Any CPU.ActiveCfg = Debug|Win32 {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Debug|Any CPU.Build.0 = Debug|Win32 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Debug|x64.ActiveCfg = Debug|x64 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Debug|x64.Build.0 = Debug|x64 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Debug|x86.ActiveCfg = Debug|Win32 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Debug|x86.Build.0 = Debug|Win32 {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Release|Any CPU.ActiveCfg = Release|Win32 {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Release|Any CPU.Build.0 = Release|Win32 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Release|x64.ActiveCfg = Release|x64 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Release|x64.Build.0 = Release|x64 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Release|x86.ActiveCfg = Release|Win32 - {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43}.Release|x86.Build.0 = Release|Win32 + {8B27FD59-F03C-468E-B878-CFFC7484B7F7}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {8B27FD59-F03C-468E-B878-CFFC7484B7F7}.Debug|Any CPU.Build.0 = Debug|Win32 + {8B27FD59-F03C-468E-B878-CFFC7484B7F7}.Release|Any CPU.ActiveCfg = Release|Win32 + {8B27FD59-F03C-468E-B878-CFFC7484B7F7}.Release|Any CPU.Build.0 = Release|Win32 + {DB701549-3F79-4D1D-9DB9-CA55683D679E}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {DB701549-3F79-4D1D-9DB9-CA55683D679E}.Debug|Any CPU.Build.0 = Debug|Win32 + {DB701549-3F79-4D1D-9DB9-CA55683D679E}.Release|Any CPU.ActiveCfg = Release|Win32 + {DB701549-3F79-4D1D-9DB9-CA55683D679E}.Release|Any CPU.Build.0 = Release|Win32 + {8C66B902-B3B3-40C1-B178-7F5405F654B0}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8C66B902-B3B3-40C1-B178-7F5405F654B0}.Debug|Any CPU.Build.0 = Debug|x64 + {8C66B902-B3B3-40C1-B178-7F5405F654B0}.Release|Any CPU.ActiveCfg = Release|x64 + {8C66B902-B3B3-40C1-B178-7F5405F654B0}.Release|Any CPU.Build.0 = Release|x64 + {C2601F9E-8B97-4901-85F4-2531102543C8}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {C2601F9E-8B97-4901-85F4-2531102543C8}.Debug|Any CPU.Build.0 = Debug|Win32 + {C2601F9E-8B97-4901-85F4-2531102543C8}.Release|Any CPU.ActiveCfg = Release|Win32 + {C2601F9E-8B97-4901-85F4-2531102543C8}.Release|Any CPU.Build.0 = Release|Win32 + {05C435E1-603C-4402-B28C-E54932F3131C}.Debug|Any CPU.ActiveCfg = Debug|x64 + {05C435E1-603C-4402-B28C-E54932F3131C}.Debug|Any CPU.Build.0 = Debug|x64 + {05C435E1-603C-4402-B28C-E54932F3131C}.Release|Any CPU.ActiveCfg = Release|x64 + {05C435E1-603C-4402-B28C-E54932F3131C}.Release|Any CPU.Build.0 = Release|x64 + {A56C1F19-EAA6-4C99-BAC3-2B14D0CCC544}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A56C1F19-EAA6-4C99-BAC3-2B14D0CCC544}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A56C1F19-EAA6-4C99-BAC3-2B14D0CCC544}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A56C1F19-EAA6-4C99-BAC3-2B14D0CCC544}.Release|Any CPU.Build.0 = Release|Any CPU + {87A1108A-3819-4B31-99EA-217F3E11E958}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87A1108A-3819-4B31-99EA-217F3E11E958}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87A1108A-3819-4B31-99EA-217F3E11E958}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87A1108A-3819-4B31-99EA-217F3E11E958}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -529,6 +319,11 @@ Global {BAB53542-85AA-4780-9F48-2984C036189A} = {1FF56AF6-0ACE-4FE8-B802-4832703EC2DC} {2E3221EB-86DA-427D-84EC-DEFD3F966D9A} = {1FF56AF6-0ACE-4FE8-B802-4832703EC2DC} {F48AD2EC-96B3-41C6-9F89-3542EC7A3D43} = {475245AA-A07D-41D8-BC84-959C5E12A52C} + {8B27FD59-F03C-468E-B878-CFFC7484B7F7} = {475245AA-A07D-41D8-BC84-959C5E12A52C} + {DB701549-3F79-4D1D-9DB9-CA55683D679E} = {475245AA-A07D-41D8-BC84-959C5E12A52C} + {8C66B902-B3B3-40C1-B178-7F5405F654B0} = {475245AA-A07D-41D8-BC84-959C5E12A52C} + {C2601F9E-8B97-4901-85F4-2531102543C8} = {475245AA-A07D-41D8-BC84-959C5E12A52C} + {05C435E1-603C-4402-B28C-E54932F3131C} = {475245AA-A07D-41D8-BC84-959C5E12A52C} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C942DDD5-B04E-4D57-BA9F-A444392C9480} diff --git a/GoogleTestAdapter/ItemTemplates/Test/GoogleTest/GoogleTest.vstemplate b/GoogleTestAdapter/GoogleTestItemTemplate/GoogleTest.vstemplate similarity index 78% rename from GoogleTestAdapter/ItemTemplates/Test/GoogleTest/GoogleTest.vstemplate rename to GoogleTestAdapter/GoogleTestItemTemplate/GoogleTest.vstemplate index 91f42fcc7..3db883972 100644 --- a/GoogleTestAdapter/ItemTemplates/Test/GoogleTest/GoogleTest.vstemplate +++ b/GoogleTestAdapter/GoogleTestItemTemplate/GoogleTest.vstemplate @@ -1,7 +1,7 @@ - Google Test - A Google Test based unit test. + + VC Microsoft.VisualC.Item.GoogleTest 10 diff --git a/GoogleTestAdapter/GoogleTestItemTemplate/GoogleTestItemTemplate.csproj b/GoogleTestAdapter/GoogleTestItemTemplate/GoogleTestItemTemplate.csproj new file mode 100644 index 000000000..8acbfbacf --- /dev/null +++ b/GoogleTestAdapter/GoogleTestItemTemplate/GoogleTestItemTemplate.csproj @@ -0,0 +1,64 @@ + + + + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + Debug + AnyCPU + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {87A1108A-3819-4B31-99EA-217F3E11E958} + Library + Properties + GoogleTestItemTemplate + GoogleTestItemTemplate + v4.6.1 + 512 + false + false + false + false + false + false + false + false + false + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + Designer + Test + + + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/GoogleTestItemTemplate/Icon.ico b/GoogleTestAdapter/GoogleTestItemTemplate/Icon.ico new file mode 100644 index 000000000..3f71a88c4 Binary files /dev/null and b/GoogleTestAdapter/GoogleTestItemTemplate/Icon.ico differ diff --git a/GoogleTestAdapter/ItemTemplates/Test/GoogleTest/test.cpp b/GoogleTestAdapter/GoogleTestItemTemplate/test.cpp similarity index 100% rename from GoogleTestAdapter/ItemTemplates/Test/GoogleTest/test.cpp rename to GoogleTestAdapter/GoogleTestItemTemplate/test.cpp diff --git a/GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/GoogleTest.vcxproj b/GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTest.vcxproj similarity index 97% rename from GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/GoogleTest.vcxproj rename to GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTest.vcxproj index 2b6f47d1d..ae8fa98f2 100644 --- a/GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/GoogleTest.vcxproj +++ b/GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTest.vcxproj @@ -23,7 +23,7 @@ Win32Proj $targetplatformversion$ Application - v141 + v142 Unicode @@ -53,7 +53,6 @@ pch.h Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true EnableFastChecks $rtdebug$ Level3 @@ -69,7 +68,6 @@ pch.h Disabled X64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true EnableFastChecks $rtdebug$ Level3 diff --git a/GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/GoogleTest.vstemplate b/GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTest.vstemplate similarity index 83% rename from GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/GoogleTest.vstemplate rename to GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTest.vstemplate index c5cec5cb9..2ae418988 100644 --- a/GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/GoogleTest.vstemplate +++ b/GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTest.vstemplate @@ -1,7 +1,7 @@ - Google Test - A Google Test based unit testing project. + + VC Microsoft.VisualC.Project.GoogleTest 1000 @@ -25,8 +25,8 @@ Microsoft.NewProjectWizard.WizardImplementation - - + + - \ No newline at end of file + diff --git a/GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTestProjectTemplate.csproj b/GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTestProjectTemplate.csproj new file mode 100644 index 000000000..b7ace52af --- /dev/null +++ b/GoogleTestAdapter/GoogleTestProjectTemplate/GoogleTestProjectTemplate.csproj @@ -0,0 +1,69 @@ + + + + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + Debug + AnyCPU + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {A56C1F19-EAA6-4C99-BAC3-2B14D0CCC544} + Library + Properties + GoogleTestProjectTemplate + GoogleTestProjectTemplate + v4.6.1 + 512 + false + false + false + false + false + false + false + false + false + false + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + Designer + Test + + + + + + + + + + \ No newline at end of file diff --git a/GoogleTestAdapter/GoogleTestProjectTemplate/Icon.ico b/GoogleTestAdapter/GoogleTestProjectTemplate/Icon.ico new file mode 100644 index 000000000..3f71a88c4 Binary files /dev/null and b/GoogleTestAdapter/GoogleTestProjectTemplate/Icon.ico differ diff --git a/GoogleTestAdapter/GoogleTestProjectTemplate/pch.cpp b/GoogleTestAdapter/GoogleTestProjectTemplate/pch.cpp new file mode 100644 index 000000000..250fb2778 --- /dev/null +++ b/GoogleTestAdapter/GoogleTestProjectTemplate/pch.cpp @@ -0,0 +1,5 @@ +// +// pch.cpp +// + +#include "pch.h" diff --git a/GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/pch.h b/GoogleTestAdapter/GoogleTestProjectTemplate/pch.h similarity index 55% rename from GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/pch.h rename to GoogleTestAdapter/GoogleTestProjectTemplate/pch.h index 29c81fffa..0572a70b0 100644 --- a/GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/pch.h +++ b/GoogleTestAdapter/GoogleTestProjectTemplate/pch.h @@ -1,6 +1,5 @@ // // pch.h -// Header for standard system include files. // #pragma once diff --git a/GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/test.cpp b/GoogleTestAdapter/GoogleTestProjectTemplate/test.cpp similarity index 100% rename from GoogleTestAdapter/ProjectTemplates/Test/GoogleTest/test.cpp rename to GoogleTestAdapter/GoogleTestProjectTemplate/test.cpp diff --git a/GoogleTestAdapter/ItemTemplates/Test/.gitignore b/GoogleTestAdapter/ItemTemplates/Test/.gitignore deleted file mode 100644 index 071f467a1..000000000 --- a/GoogleTestAdapter/ItemTemplates/Test/.gitignore +++ /dev/null @@ -1 +0,0 @@ -GoogleTestIT.zip diff --git a/GoogleTestAdapter/NewProjectWizard/ApplicationInsights.config b/GoogleTestAdapter/NewProjectWizard/ApplicationInsights.config deleted file mode 100644 index ec406213f..000000000 --- a/GoogleTestAdapter/NewProjectWizard/ApplicationInsights.config +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/GoogleTestAdapter/NewProjectWizard/NewProjectWizard.csproj b/GoogleTestAdapter/NewProjectWizard/NewProjectWizard.csproj index f099d26d6..673d962db 100644 --- a/GoogleTestAdapter/NewProjectWizard/NewProjectWizard.csproj +++ b/GoogleTestAdapter/NewProjectWizard/NewProjectWizard.csproj @@ -1,7 +1,7 @@  - + Debug @@ -43,16 +43,21 @@ true + + $(MSBuildThisFileDirectory)..\..\loc\lcl\{Lang}\NewProjectWizard.dll.lcl + $(LSBuildRoot)\MCP_excludeBaml.lss + - Microsoft + Microsoft400 StrongName + + + false + - - $(NuGetPackages)Microsoft.ApplicationInsights.2.3.0\lib\net45\Microsoft.ApplicationInsights.dll - $(NuGetPackages)Microsoft.Build.Utilities.Core.14.3.0\lib\net45\Microsoft.Build.Utilities.Core.dll @@ -118,11 +123,10 @@ SinglePageWizardDialog.xaml - - ResXFileCodeGenerator + PublicResXFileCodeGenerator Resources.Designer.cs Designer @@ -131,7 +135,6 @@ Resources.resx True - @@ -162,12 +165,20 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + + + + + + Microsoft400 + StrongName + + \ No newline at end of file diff --git a/GoogleTestAdapter/NewProjectWizard/Properties/Resources.Designer.cs b/GoogleTestAdapter/NewProjectWizard/Properties/Resources.Designer.cs index 4f8aed5e9..3cada9c02 100644 --- a/GoogleTestAdapter/NewProjectWizard/Properties/Resources.Designer.cs +++ b/GoogleTestAdapter/NewProjectWizard/Properties/Resources.Designer.cs @@ -22,7 +22,7 @@ namespace NewProjectWizard.Properties { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { + public class Resources { private static global::System.Resources.ResourceManager resourceMan; @@ -36,7 +36,7 @@ internal Resources() { /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { + public static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("NewProjectWizard.Properties.Resources", typeof(Resources).Assembly); @@ -51,7 +51,7 @@ internal Resources() { /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { + public static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } @@ -60,19 +60,91 @@ internal Resources() { } } + /// + /// Looks up a localized string similar to Consume Google Test as:. + /// + public static string ConsumeAs { + get { + return ResourceManager.GetString("ConsumeAs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dynamic Library (.dll). + /// + public static string DynamicLib { + get { + return ResourceManager.GetString("DynamicLib", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link dynamically (Recommended). + /// + public static string LinkDynamic { + get { + return ResourceManager.GetString("LinkDynamic", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link statically. + /// + public static string LinkStatic { + get { + return ResourceManager.GetString("LinkStatic", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <No project>. + /// + public static string NoProject { + get { + return ResourceManager.GetString("NoProject", resourceCulture); + } + } + /// /// Looks up a localized string similar to Cannot find NuGet.VisualStudio.Interop.dll. Wizard cannot continue.. /// - internal static string NuGetInteropNotFound { + public static string NuGetInteropNotFound { get { return ResourceManager.GetString("NuGetInteropNotFound", resourceCulture); } } + /// + /// Looks up a localized string similar to C++ runtime libraries:. + /// + public static string RuntimeLibs { + get { + return ResourceManager.GetString("RuntimeLibs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select project to test (Optional):. + /// + public static string SelectProject { + get { + return ResourceManager.GetString("SelectProject", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Static Library (.lib). + /// + public static string StaticLib { + get { + return ResourceManager.GetString("StaticLib", resourceCulture); + } + } + /// /// Looks up a localized string similar to Windows SDK not found.. /// - internal static string WinSDKNotFound { + public static string WinSDKNotFound { get { return ResourceManager.GetString("WinSDKNotFound", resourceCulture); } @@ -81,7 +153,7 @@ internal static string WinSDKNotFound { /// /// Looks up a localized string similar to Test Project Configuration. /// - internal static string WizardTitle { + public static string WizardTitle { get { return ResourceManager.GetString("WizardTitle", resourceCulture); } diff --git a/GoogleTestAdapter/NewProjectWizard/Properties/Resources.resx b/GoogleTestAdapter/NewProjectWizard/Properties/Resources.resx index da4bc6f5e..4dd9cb9b4 100644 --- a/GoogleTestAdapter/NewProjectWizard/Properties/Resources.resx +++ b/GoogleTestAdapter/NewProjectWizard/Properties/Resources.resx @@ -117,9 +117,36 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Consume Google Test as: + Followed by radio buttons to select a static or dynamic library + + + Dynamic Library (.dll) + + + Link dynamically (Recommended) + + + Link statically + + + <No project> + Default selection in a project selection dropdown + Cannot find NuGet.VisualStudio.Interop.dll. Wizard cannot continue. + + C++ runtime libraries: + Followed by radio buttons to "link statically" or "link dynamically" + + + Select project to test (Optional): + + + Static Library (.lib) + Windows SDK not found. diff --git a/GoogleTestAdapter/NewProjectWizard/SinglePageWizardDialog.xaml b/GoogleTestAdapter/NewProjectWizard/SinglePageWizardDialog.xaml index 473d6f772..4d8cb037f 100644 --- a/GoogleTestAdapter/NewProjectWizard/SinglePageWizardDialog.xaml +++ b/GoogleTestAdapter/NewProjectWizard/SinglePageWizardDialog.xaml @@ -6,6 +6,7 @@ xmlns:vsui="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.15.0" xmlns:vsimaging="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.Imaging" xmlns:vsimagecatalog="clr-namespace:Microsoft.VisualStudio.Imaging;assembly=Microsoft.VisualStudio.ImageCatalog" + xmlns:resx="clr-namespace:NewProjectWizard.Properties" DataContext="{Binding RelativeSource={RelativeSource Self}}" Height="350" MinHeight="350" @@ -76,6 +77,7 @@ Margin="24,8,24,24"> +