diff --git a/GoogleTestAdapter/Common.Dynamic.GTA/Strings.cs b/GoogleTestAdapter/Common.Dynamic.GTA/Strings.cs
index 596147fd5..811c23b9f 100644
--- a/GoogleTestAdapter/Common.Dynamic.GTA/Strings.cs
+++ b/GoogleTestAdapter/Common.Dynamic.GTA/Strings.cs
@@ -6,7 +6,7 @@ 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 TroubleShootingLink => "{0}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..06d569892 100644
--- a/GoogleTestAdapter/Common.Dynamic.TAfGT/Common.Dynamic.TAfGT.csproj
+++ b/GoogleTestAdapter/Common.Dynamic.TAfGT/Common.Dynamic.TAfGT.csproj
@@ -50,6 +50,11 @@
+
+ True
+ True
+ Resources.resx
+
@@ -61,6 +66,13 @@
Common
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
diff --git a/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.Designer.cs b/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.Designer.cs
new file mode 100644
index 000000000..1e990c292
--- /dev/null
+++ b/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.Designer.cs
@@ -0,0 +1,99 @@
+//------------------------------------------------------------------------------
+//
+// 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()]
+ 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.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)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Test Adapter for Google Test.
+ ///
+ internal static string ExtensionName {
+ get {
+ return ResourceManager.GetString("ExtensionName", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Test Adapter for Google Test: Test discovery starting....
+ ///
+ internal static string TestDiscoveryStarting {
+ get {
+ return ResourceManager.GetString("TestDiscoveryStarting", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Test Adapter for Google Test: Test execution starting....
+ ///
+ internal 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.
+ ///
+ internal 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..28ecd4c11
--- /dev/null
+++ b/GoogleTestAdapter/Common.Dynamic.TAfGT/Resources.resx
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ Test Adapter for Google Test
+
+
+ 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
index 339711d38..6908f7ea9 100644
--- a/GoogleTestAdapter/Common.Dynamic.TAfGT/Strings.cs
+++ b/GoogleTestAdapter/Common.Dynamic.TAfGT/Strings.cs
@@ -5,9 +5,9 @@ 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...";
+ public string ExtensionName => Resources.ExtensionName;
+ public string TroubleShootingLink => Resources.TroubleShootingLink;
+ public string TestDiscoveryStarting => Resources.TestDiscoveryStarting;
+ public string TestExecutionStarting => Resources.TestExecutionStarting;
}
}
diff --git a/GoogleTestAdapter/Core.Tests/GoogleTestDiscovererTests.cs b/GoogleTestAdapter/Core.Tests/GoogleTestDiscovererTests.cs
index c5911754f..f14924f9c 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 8/2017.
+
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
@@ -163,7 +165,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
{
diff --git a/GoogleTestAdapter/Core/Core.csproj b/GoogleTestAdapter/Core/Core.csproj
index 9669590d8..784f6c73a 100644
--- a/GoogleTestAdapter/Core/Core.csproj
+++ b/GoogleTestAdapter/Core/Core.csproj
@@ -67,6 +67,11 @@
+
+ True
+ True
+ Resources.resx
+
@@ -108,6 +113,11 @@
Designer
GtaTestDurations.xsd
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
diff --git a/GoogleTestAdapter/Core/GoogleTestDiscoverer.cs b/GoogleTestAdapter/Core/GoogleTestDiscoverer.cs
index 589800837..c6559e381 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 8/2017.
using GoogleTestAdapter.Common;
using GoogleTestAdapter.DiaResolver;
@@ -70,12 +70,12 @@ private static void DiscoverTests(string executable, ITestFrameworkReporter repo
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,9 +86,9 @@ 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;
}
@@ -98,27 +98,25 @@ public bool IsGoogleTestExecutable(string executable, string customRegex = "")
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}");
+ _logger.DebugInfo(String.Format(Resources.FileNotFound, executable));
bool matches;
- string regexSource, regex;
+ string regex;
if (string.IsNullOrWhiteSpace(customRegex))
{
- regexSource = "default";
regex = SettingsWrapper.TestFinderRegex;
matches = CompiledTestFinderRegex.IsMatch(executable);
+ _logger.DebugInfo(String.Format(matches ? Resources.MatchesDefault : Resources.DoesntMatchDefault, executable, regex));
}
else
{
- regexSource = "custom";
regex = customRegex;
matches = SafeMatches(executable, customRegex);
+ _logger.DebugInfo(String.Format(matches ? Resources.MatchesCustom : Resources.DoesntMatchCustom, executable, regex));
}
- _logger.DebugInfo(
- $"'{executable}' {(matches ? "matches" : "does not match")} {regexSource} regex '{regex}'");
return matches;
}
@@ -146,11 +144,11 @@ 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;
}
@@ -160,7 +158,7 @@ private static bool VerifyExecutableTrust(string executable, ILogger logger)
var zone = Zone.CreateFromUrl(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/ProcessLauncher.cs b/GoogleTestAdapter/Core/Helpers/ProcessLauncher.cs
index ea0f21eef..2f231f411 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 8/2017.
+
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
@@ -70,13 +72,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 +101,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..5869ea951 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 8/2017.
+
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using GoogleTestAdapter.Common;
@@ -61,11 +63,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)
@@ -78,7 +80,7 @@ public static void KillProcess(int processId, ILogger logger)
private int LaunchProcessWithDebuggerAttached(string workingDirectory, 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(
diff --git a/GoogleTestAdapter/Core/Helpers/Utils.cs b/GoogleTestAdapter/Core/Helpers/Utils.cs
index a23f45da5..8158d2d93 100644
--- a/GoogleTestAdapter/Core/Helpers/Utils.cs
+++ b/GoogleTestAdapter/Core/Helpers/Utils.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.Globalization;
@@ -73,7 +73,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..eb49339e7
--- /dev/null
+++ b/GoogleTestAdapter/Core/Resources.Designer.cs
@@ -0,0 +1,792 @@
+//------------------------------------------------------------------------------
+//
+// 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 {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 {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 {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} 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 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 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..dbccca410
--- /dev/null
+++ b/GoogleTestAdapter/Core/Resources.resx
@@ -0,0 +1,434 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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)
+
+
+ {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)
+
+
+ {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)
+
+
+ {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} 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)
+
+
+ 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 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..74e934153 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 8/2017.
+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..10025237f 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 8/2017.
+
+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)
{
@@ -126,13 +133,11 @@ private void RunBatch(string batchType, string workingDirectory, string batch, b
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..2ae691019 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 8/2017.
using System;
using System.Collections.Generic;
@@ -104,11 +104,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,7 +116,7 @@ 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));
}
}
}
@@ -137,12 +137,10 @@ 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(Strings.Instance.TroubleShootingLink, threadName));
+ logger.LogError(String.Format(Resources.ExecuteSteps, threadName, workingDir, Environment.NewLine, executable, arguments));
}
private IEnumerable TryRunTests(string executable, string workingDir, bool isBeingDebugged,
@@ -181,8 +179,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,7 +193,7 @@ 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();
}
};
@@ -207,16 +204,16 @@ private List RunTestExecutableWithNewFramework(string executable, string
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/SettingsWrapper.cs b/GoogleTestAdapter/Core/Settings/SettingsWrapper.cs
index 97eb2329e..7156a3dc9 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 8/2017.
using System;
using System.Collections.Generic;
@@ -88,13 +88,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 +116,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 +129,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()
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..9a937c24a 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 8/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));
}
}
}
diff --git a/GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs b/GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs
index fb15aa08d..ca2fdc79a 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 8/2017.
using System;
using System.Collections.Generic;
@@ -149,12 +149,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.Trim()}";
+ _logger.LogError(String.Format(Resources.TestDiscoveryCancelled, _settings.TestDiscoveryTimeoutInSeconds, _executable));
+ _logger.DebugError(String.Format(Resources.TestCommandCanBeRun, Environment.NewLine, command));
+
return new List();
}
@@ -183,14 +182,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.Trim(), 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 +241,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);
}
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/StandardOutputTestResultParser.cs b/GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs
index b6a75cdf7..15c4b79f8 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 8/2017.
+
+using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@@ -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));
diff --git a/GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs b/GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs
index ac24f08d0..e4bdc5526 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 8/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;
}
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/DiaFactory.cs b/GoogleTestAdapter/DiaResolver/DiaFactory.cs
index f9f8460d4..4e8753e8f 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()
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..0d8cc81d5 100644
--- a/GoogleTestAdapter/DiaResolver/DiaResolver.csproj
+++ b/GoogleTestAdapter/DiaResolver/DiaResolver.csproj
@@ -66,6 +66,11 @@
+
+ True
+ True
+ Resources.resx
+
@@ -85,6 +90,13 @@
PreserveNewest
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
+
diff --git a/GoogleTestAdapter/DiaResolver/PeParser.cs b/GoogleTestAdapter/DiaResolver/PeParser.cs
index 1a1104417..0b19215d6 100644
--- a/GoogleTestAdapter/DiaResolver/PeParser.cs
+++ b/GoogleTestAdapter/DiaResolver/PeParser.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.Runtime.InteropServices;
using GoogleTestAdapter.Common;
@@ -127,7 +129,7 @@ private static void ParsePeFile(string executable, ILogger logger, Action
+// 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 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..4508571f7
--- /dev/null
+++ b/GoogleTestAdapter/DiaResolver/Resources.resx
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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)
+
+
\ No newline at end of file
diff --git a/GoogleTestAdapter/TestAdapter.Tests/TestDiscovererTests.cs b/GoogleTestAdapter/TestAdapter.Tests/TestDiscovererTests.cs
index 14d4d71e5..a7e240953 100644
--- a/GoogleTestAdapter/TestAdapter.Tests/TestDiscovererTests.cs
+++ b/GoogleTestAdapter/TestAdapter.Tests/TestDiscovererTests.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 FluentAssertions;
using GoogleTestAdapter.Helpers;
@@ -40,7 +40,7 @@ public void DiscoverTests_WithCustomNonMatchingRegex_DoesNotFindTests()
public void DiscoverTests_CrashingExecutable_CrashIsLogged()
{
RunExecutableAndCheckLogging(TestResources.AlwaysCrashingExe,
- () => MockLogger.Verify(l => l.LogError(It.Is(s => s.Contains("Could not list test cases of executable"))),
+ () => MockLogger.Verify(l => l.LogError(It.Is(s => s.Contains("Could not list test cases for executable"))),
Times.Once));
}
@@ -49,7 +49,7 @@ public void DiscoverTests_CrashingExecutable_CrashIsLogged()
public void DiscoverTests_FailingExecutable_ExitCodeIsLogged()
{
RunExecutableAndCheckLogging(TestResources.AlwaysFailingExe,
- () => MockLogger.Verify(l => l.LogError(It.Is(s => s.Contains("executing process failed with return code 4711"))),
+ () => MockLogger.Verify(l => l.LogError(It.Is(s => s.Contains("process execution failed with exit code 4711"))),
Times.Once));
}
@@ -85,7 +85,7 @@ public void DiscoverTests_UntrustedExecutable_IsNotRun()
File.Copy(TestResources.SemaphoreExe, Temp1Exe);
File.Exists(SemPath).Should().BeFalse();
RunExecutableAndCheckLogging(Temp1Exe,
- () => MockLogger.Verify(l => l.LogError(It.Is(s => s.Contains("executing process failed with return code 143"))),
+ () => MockLogger.Verify(l => l.LogError(It.Is(s => s.Contains("process execution failed with exit code 143"))),
Times.Once));
File.Exists(SemPath).Should().BeTrue("because exe should have been run");
}
diff --git a/GoogleTestAdapter/TestAdapter.Tests/TestExecutorTestsBase.cs b/GoogleTestAdapter/TestAdapter.Tests/TestExecutorTestsBase.cs
index ff92c6e84..6b8e9a917 100644
--- a/GoogleTestAdapter/TestAdapter.Tests/TestExecutorTestsBase.cs
+++ b/GoogleTestAdapter/TestAdapter.Tests/TestExecutorTestsBase.cs
@@ -1,4 +1,6 @@
-using System;
+// This file has been modified by Microsoft on 8/2017.
+
+using System;
using System.Linq;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -17,8 +19,9 @@ namespace GoogleTestAdapter.TestAdapter
{
public abstract class TestExecutorTestsBase : TestAdapterTestsBase
{
+ private const string TestSetup = "Test setup";
+ private const string TestTeardown = "Test teardown";
private readonly bool _parallelTestExecution;
-
private readonly int _maxNrOfThreads;
@@ -147,10 +150,10 @@ public virtual void RunTests_WithSetupAndTeardownBatchesWhereTeardownFails_LogsW
RunAndVerifyTests(TestResources.DllTests_ReleaseX86, 1, 1, 0);
MockLogger.Verify(l => l.LogWarning(
- It.Is(s => s.Contains(PreparingTestRunner.TestSetup))),
+ It.Is(s => s.Contains(TestSetup))),
Times.Never);
MockLogger.Verify(l => l.LogWarning(
- It.Is(s => s.Contains(PreparingTestRunner.TestTeardown))),
+ It.Is(s => s.Contains(TestTeardown))),
Times.AtLeastOnce());
}
@@ -164,10 +167,10 @@ public virtual void RunTests_WithSetupAndTeardownBatchesWhereSetupFails_LogsWarn
RunAndVerifyTests(TestResources.DllTests_ReleaseX86, 1, 1, 0);
MockLogger.Verify(l => l.LogWarning(
- It.Is(s => s.Contains(PreparingTestRunner.TestSetup))),
+ It.Is(s => s.Contains(TestSetup))),
Times.AtLeastOnce());
MockLogger.Verify(l => l.LogWarning(
- It.Is(s => s.Contains(PreparingTestRunner.TestTeardown))),
+ It.Is(s => s.Contains(TestTeardown))),
Times.Never);
}
@@ -178,22 +181,22 @@ public virtual void RunTests_WithoutBatches_NoLogging()
RunAndVerifyTests(TestResources.DllTests_ReleaseX86, 1, 1, 0);
MockLogger.Verify(l => l.LogInfo(
- It.Is(s => s.Contains(PreparingTestRunner.TestSetup))),
+ It.Is(s => s.Contains(TestSetup))),
Times.Never);
MockLogger.Verify(l => l.LogWarning(
- It.Is(s => s.Contains(PreparingTestRunner.TestSetup))),
+ It.Is(s => s.Contains(TestSetup))),
Times.Never);
MockLogger.Verify(l => l.LogError(
- It.Is(s => s.Contains(PreparingTestRunner.TestSetup))),
+ It.Is(s => s.Contains(TestSetup))),
Times.Never);
MockLogger.Verify(l => l.LogInfo(
- It.Is(s => s.Contains(PreparingTestRunner.TestTeardown))),
+ It.Is(s => s.Contains(TestTeardown))),
Times.Never);
MockLogger.Verify(l => l.LogWarning(
- It.Is(s => s.Contains(PreparingTestRunner.TestTeardown))),
+ It.Is(s => s.Contains(TestTeardown))),
Times.Never);
MockLogger.Verify(l => l.LogError(
- It.Is(s => s.Contains(PreparingTestRunner.TestTeardown))),
+ It.Is(s => s.Contains(TestTeardown))),
Times.Never);
}
@@ -206,7 +209,7 @@ public virtual void RunTests_WithNonexistingSetupBatch_LogsError()
RunAndVerifyTests(TestResources.DllTests_ReleaseX86, 1, 1, 0);
MockLogger.Verify(l => l.LogError(
- It.Is(s => s.Contains(PreparingTestRunner.TestSetup.ToLower()))),
+ It.Is(s => s.Contains(TestSetup))),
Times.AtLeastOnce());
}
diff --git a/GoogleTestAdapter/TestAdapter/CommonFunctions.cs b/GoogleTestAdapter/TestAdapter/CommonFunctions.cs
index f9fd74be0..85875176e 100644
--- a/GoogleTestAdapter/TestAdapter/CommonFunctions.cs
+++ b/GoogleTestAdapter/TestAdapter/CommonFunctions.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.Common;
using GoogleTestAdapter.Helpers;
@@ -10,22 +12,29 @@
namespace GoogleTestAdapter.TestAdapter
{
+ public enum TestPhase
+ {
+ TestDiscovery,
+ TestExecution
+ }
+
public static class CommonFunctions
{
- public static void ReportErrors(ILogger logger, string phase, bool isDebugModeEnabled)
+ public static void ReportErrors(ILogger logger, TestPhase phase, bool isDebugModeEnabled)
{
IList errors = logger.GetMessages(Severity.Error, Severity.Warning);
if (errors.Count == 0)
return;
bool hasErrors = logger.GetMessages(Severity.Error).Count > 0;
+ string phaseString = (phase == TestPhase.TestDiscovery) ? Resources.TestDiscovery : Resources.TestExecution;
string hint = isDebugModeEnabled
? ""
- : " (enable debug mode for more information)";
+ : Resources.EnableDebugMode;
string jointErrors = string.Join(Environment.NewLine, errors);
- string message = $"{Environment.NewLine}================{Environment.NewLine}"
- + $"The following errors and warnings occured during {phase}{hint}:{Environment.NewLine}"
+ string message = $"{Environment.NewLine}================{Environment.NewLine}"
+ + String.Format(Resources.ErrorAndWarning, phaseString, hint, Environment.NewLine)
+ jointErrors;
if (hasErrors)
@@ -64,7 +73,7 @@ public static void LogVisualStudioVersion(ILogger logger)
case VsVersion.VS2012:
return;
default:
- logger.DebugInfo($"Visual Studio Version: {version}");
+ logger.DebugInfo(String.Format(Resources.VSVersion, version));
break;
}
}
diff --git a/GoogleTestAdapter/TestAdapter/DataConversionExtensions.cs b/GoogleTestAdapter/TestAdapter/DataConversionExtensions.cs
index 661b1f504..cbf7eebe3 100644
--- a/GoogleTestAdapter/TestAdapter/DataConversionExtensions.cs
+++ b/GoogleTestAdapter/TestAdapter/DataConversionExtensions.cs
@@ -1,4 +1,6 @@
-using System;
+// This file has been modified by Microsoft on 8/2017.
+
+using System;
using System.Linq;
using GoogleTestAdapter.Common;
using GoogleTestAdapter.Model;
@@ -113,7 +115,7 @@ public static Severity GetSeverity(this TestMessageLevel level)
case TestMessageLevel.Error:
return Severity.Error;
default:
- throw new InvalidOperationException($"Unknown enum literal: {level}");
+ throw new InvalidOperationException(String.Format(Resources.UnknownEnum, level));
}
}
diff --git a/GoogleTestAdapter/TestAdapter/Framework/MessageBasedDebuggerAttacher.cs b/GoogleTestAdapter/TestAdapter/Framework/MessageBasedDebuggerAttacher.cs
index 0ff083c89..7a4248cd4 100644
--- a/GoogleTestAdapter/TestAdapter/Framework/MessageBasedDebuggerAttacher.cs
+++ b/GoogleTestAdapter/TestAdapter/Framework/MessageBasedDebuggerAttacher.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 GoogleTestAdapter.Common;
using GoogleTestAdapter.Framework;
@@ -43,7 +43,7 @@ public bool AttachDebugger(int processId)
{
client.Service.AttachDebugger(processId);
stopWatch.Stop();
- _logger.DebugInfo($"Debugger attached to process {processId}, took {stopWatch.ElapsedMilliseconds} ms");
+ _logger.DebugInfo(String.Format(Resources.DebuggerAttachTime, processId, stopWatch.ElapsedMilliseconds));
return true;
}
}
@@ -51,15 +51,15 @@ public bool AttachDebugger(int processId)
{
var errorMessage = serviceFault.Detail.Message;
if (string.IsNullOrWhiteSpace(errorMessage))
- errorMessage = $"Could not attach debugger to process {processId}, no error message available";
+ errorMessage = String.Format(Resources.DebuggerAttachMessage, processId);
- errorMessage += $"{Environment.NewLine}There might be more information on the problem in Visual Studio's ActivityLog.xml (see e.g. https://blogs.msdn.microsoft.com/visualstudio/2010/02/24/troubleshooting-extensions-with-the-activity-log/)";
+ errorMessage += $"{Environment.NewLine}{Resources.MoreInformationMessage}";
_logger.LogError(errorMessage);
}
catch (Exception e)
{
- _logger.LogError($"Could not attach debugger to process {processId}:{Environment.NewLine}{e}");
+ _logger.LogError(String.Format(Resources.CouldNotAttachMessage, processId, Environment.NewLine, e));
}
return false;
}
diff --git a/GoogleTestAdapter/TestAdapter/Framework/VsTestFrameworkLogger.cs b/GoogleTestAdapter/TestAdapter/Framework/VsTestFrameworkLogger.cs
index d6711b5ca..12ba6dfdf 100644
--- a/GoogleTestAdapter/TestAdapter/Framework/VsTestFrameworkLogger.cs
+++ b/GoogleTestAdapter/TestAdapter/Framework/VsTestFrameworkLogger.cs
@@ -1,4 +1,6 @@
-using System;
+// This file has been modified by Microsoft on 8/2017.
+
+using System;
using GoogleTestAdapter.Common;
using GoogleTestAdapter.Helpers;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
@@ -27,13 +29,13 @@ public override void Log(Severity severity, string message)
LogSafe(TestMessageLevel.Informational, message);
break;
case Severity.Warning:
- LogSafe(TestMessageLevel.Warning, $"Warning: {message}");
+ LogSafe(TestMessageLevel.Warning, String.Format(Resources.WarningMessage, message));
break;
case Severity.Error:
- LogSafe(TestMessageLevel.Error, $"ERROR: {message}");
+ LogSafe(TestMessageLevel.Error, String.Format(Resources.ErrorMessage, message));
break;
default:
- throw new Exception($"Unknown enum literal: {severity}");
+ throw new Exception(String.Format(Resources.UnknownLiteral, severity));
}
}
diff --git a/GoogleTestAdapter/TestAdapter/Framework/VsVersion.cs b/GoogleTestAdapter/TestAdapter/Framework/VsVersion.cs
index fb101cafe..2a2b6b7d5 100644
--- a/GoogleTestAdapter/TestAdapter/Framework/VsVersion.cs
+++ b/GoogleTestAdapter/TestAdapter/Framework/VsVersion.cs
@@ -1,4 +1,6 @@
-using System;
+// This file has been modified by Microsoft on 8/2017.
+
+using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
@@ -63,7 +65,7 @@ public static VsVersion GetVisualStudioVersion(ILogger logger)
}
catch (Exception e)
{
- logger?.LogError($"Could not find out VisualStudio version: {e.Message}");
+ logger?.LogError(String.Format(Resources.VSVersionMessage, e.Message));
_version = VsVersion.Unknown;
}
return _version.Value;
@@ -75,7 +77,7 @@ private static VsVersion GetVsVersionFromProcess()
{
string pathToBinary = FindVsOrVsTestConsoleExe()?.MainModule.FileName;
if (pathToBinary == null)
- throw new InvalidOperationException("Could not find process");
+ throw new InvalidOperationException(Resources.ProcessNotFound);
FileVersionInfo binaryVersionInfo = FileVersionInfo.GetVersionInfo(pathToBinary);
@@ -114,7 +116,7 @@ private static VsVersion GetVsVersionFromVersionString(string versionString)
return VsVersion.VS2012;
if (version.Major < (int) FirstSupportedVersion || version.Major > (int) LastSupportedVersion)
- throw new InvalidOperationException($"Unknown VisualStudio version: {versionString}");
+ throw new InvalidOperationException(String.Format(Resources.UnknownVisualStudioVersion, versionString));
return (VsVersion) version.Major;
}
diff --git a/GoogleTestAdapter/TestAdapter/Helpers/TestCaseFilter.cs b/GoogleTestAdapter/TestAdapter/Helpers/TestCaseFilter.cs
index 8747f1fa9..0d3378417 100644
--- a/GoogleTestAdapter/TestAdapter/Helpers/TestCaseFilter.cs
+++ b/GoogleTestAdapter/TestAdapter/Helpers/TestCaseFilter.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 System.Text.RegularExpressions;
@@ -60,7 +62,7 @@ private void InitProperties(ISet traitNames)
{
if (_testPropertiesMap.Keys.Contains(traitName))
{
- _logger.LogWarning($"Trait has same name as base test property and will thus be ignored for test case filtering: {traitName}");
+ _logger.LogWarning(String.Format(Resources.TraitIgnoreMessage, traitName));
continue;
}
@@ -105,15 +107,15 @@ private ITestCaseFilterExpression GetFilterExpression()
ITestCaseFilterExpression filterExpression = _runContext.GetTestCaseFilter(_allPropertyNames, PropertyProvider);
string message = filterExpression == null
- ? "No test case filter provided"
- : $"Test case filter: {filterExpression.TestCaseFilterValue}";
+ ? Resources.NoTestCaseFilter
+ : String.Format(Resources.TestCaseFilter, filterExpression.TestCaseFilterValue);
_logger.DebugInfo(message);
return filterExpression;
}
catch (TestPlatformFormatException e)
{
- _logger.LogError($"Test case filter is invalid: {e.Message}");
+ _logger.LogError(String.Format(Resources.FilterInvalid, e.Message));
return null;
}
}
@@ -137,8 +139,8 @@ private bool Matches(TestCase testCase, ITestCaseFilterExpression filterExpressi
filterExpression.MatchTestCase(testCase, propertyName => PropertyValueProvider(testCase, propertyName));
string message = matches
- ? $"{testCase.DisplayName} matches {filterExpression.TestCaseFilterValue}"
- : $"{testCase.DisplayName} does not match {filterExpression.TestCaseFilterValue}";
+ ? String.Format(Resources.Matches, testCase.DisplayName, filterExpression.TestCaseFilterValue)
+ : String.Format(Resources.DoesntMatch, testCase.DisplayName, filterExpression.TestCaseFilterValue);
_logger.DebugInfo(message);
return matches;
diff --git a/GoogleTestAdapter/TestAdapter/Resources.Designer.cs b/GoogleTestAdapter/TestAdapter/Resources.Designer.cs
new file mode 100644
index 000000000..47df7c58f
--- /dev/null
+++ b/GoogleTestAdapter/TestAdapter/Resources.Designer.cs
@@ -0,0 +1,351 @@
+//------------------------------------------------------------------------------
+//
+// 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.TestAdapter {
+ 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.TestAdapter.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 Could not attach debugger to process {0}:{1}{2}.
+ ///
+ internal static string CouldNotAttachMessage {
+ get {
+ return ResourceManager.GetString("CouldNotAttachMessage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not attach debugger to process {0}, no error message available.
+ ///
+ internal static string DebuggerAttachMessage {
+ get {
+ return ResourceManager.GetString("DebuggerAttachMessage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Debugger attached to process {0}, took {1} ms.
+ ///
+ internal static string DebuggerAttachTime {
+ get {
+ return ResourceManager.GetString("DebuggerAttachTime", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Debugging is only possible if GoogleTestAdapter has been installed into Visual Studio - NuGet installation does not support this (and other features such as Visual Studio Options, toolbar, and solution settings)..
+ ///
+ internal static string DebuggingMessage {
+ get {
+ return ResourceManager.GetString("DebuggingMessage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} does not match {1}.
+ ///
+ internal static string DoesntMatch {
+ get {
+ return ResourceManager.GetString("DoesntMatch", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to (enable debug mode for more information).
+ ///
+ internal static string EnableDebugMode {
+ get {
+ return ResourceManager.GetString("EnableDebugMode", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to The following errors and warnings have occured during {0} {1}:{2}.
+ ///
+ internal static string ErrorAndWarning {
+ get {
+ return ResourceManager.GetString("ErrorAndWarning", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to ERROR: {0}.
+ ///
+ internal static string ErrorMessage {
+ get {
+ return ResourceManager.GetString("ErrorMessage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Test case filter is invalid: {0}.
+ ///
+ internal static string FilterInvalid {
+ get {
+ return ResourceManager.GetString("FilterInvalid", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not identify Visual Studio version. {0} requires at least Visual Studio 2012 Update 1..
+ ///
+ internal static string IdentifyVSError {
+ get {
+ return ResourceManager.GetString("IdentifyVSError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Invalid {0}.
+ ///
+ internal static string Invalid {
+ get {
+ return ResourceManager.GetString("Invalid", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} matches {1}.
+ ///
+ internal static string Matches {
+ get {
+ return ResourceManager.GetString("Matches", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to There might be more information on the problem in Visual Studio's ActivityLog.xml (see e.g. https://blogs.msdn.microsoft.com/visualstudio/2010/02/24/troubleshooting-extensions-with-the-activity-log/).
+ ///
+ internal static string MoreInformationMessage {
+ get {
+ return ResourceManager.GetString("MoreInformationMessage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to No test case filter provided.
+ ///
+ internal static string NoTestCaseFilter {
+ get {
+ return ResourceManager.GetString("NoTestCaseFilter", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find process.
+ ///
+ internal static string ProcessNotFound {
+ get {
+ return ResourceManager.GetString("ProcessNotFound", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Solution settings: {0}.
+ ///
+ internal static string Settings {
+ get {
+ return ResourceManager.GetString("Settings", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Test case filter: {0}.
+ ///
+ internal static string TestCaseFilter {
+ get {
+ return ResourceManager.GetString("TestCaseFilter", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to test discovery.
+ ///
+ internal static string TestDiscovery {
+ get {
+ return ResourceManager.GetString("TestDiscovery", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Test discovery completed, overall duration: {0}.
+ ///
+ internal static string TestDiscoveryCompleted {
+ get {
+ return ResourceManager.GetString("TestDiscoveryCompleted", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Exception while discovering tests: {0}.
+ ///
+ internal static string TestDiscoveryExceptionError {
+ get {
+ return ResourceManager.GetString("TestDiscoveryExceptionError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to test execution.
+ ///
+ internal static string TestExecution {
+ get {
+ return ResourceManager.GetString("TestExecution", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Test execution canceled..
+ ///
+ internal static string TestExecutionCancelled {
+ get {
+ return ResourceManager.GetString("TestExecutionCancelled", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Google Test execution completed, overall duration: {0}.
+ ///
+ internal static string TestExecutionCompleted {
+ get {
+ return ResourceManager.GetString("TestExecutionCompleted", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Exception while running tests: {0}.
+ ///
+ internal static string TestRunningException {
+ get {
+ return ResourceManager.GetString("TestRunningException", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Trait has same name as base test property and will thus be ignored for test case filtering: {0}.
+ ///
+ internal static string TraitIgnoreMessage {
+ get {
+ return ResourceManager.GetString("TraitIgnoreMessage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unknown enum literal: {0}.
+ ///
+ internal static string UnknownEnum {
+ get {
+ return ResourceManager.GetString("UnknownEnum", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unknown enum literal: {0}.
+ ///
+ internal static string UnknownLiteral {
+ get {
+ return ResourceManager.GetString("UnknownLiteral", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unknown Visual Studio version: {0}.
+ ///
+ internal static string UnknownVisualStudioVersion {
+ get {
+ return ResourceManager.GetString("UnknownVisualStudioVersion", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to {0} requires at least Visual Studio 2012 Update 1 - please update your Visual Studio installation..
+ ///
+ internal static string VS2012Error {
+ get {
+ return ResourceManager.GetString("VS2012Error", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Visual Studio version: {0}.
+ ///
+ internal static string VSVersion {
+ get {
+ return ResourceManager.GetString("VSVersion", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Could not find out Visual Studio version: {0}.
+ ///
+ internal static string VSVersionMessage {
+ get {
+ return ResourceManager.GetString("VSVersionMessage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Warning: {0}.
+ ///
+ internal static string WarningMessage {
+ get {
+ return ResourceManager.GetString("WarningMessage", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/GoogleTestAdapter/TestAdapter/Resources.resx b/GoogleTestAdapter/TestAdapter/Resources.resx
new file mode 100644
index 000000000..fe6cb3ab7
--- /dev/null
+++ b/GoogleTestAdapter/TestAdapter/Resources.resx
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ Test discovery completed, overall duration: {0}
+ {0} represents unlocalized duration (e.g. "02:14:18")
+
+
+ Exception while discovering tests: {0}
+ {0} represents localized exception message (e.g. "Cannot load file")
+
+
+ Test execution canceled.
+
+
+ Google Test execution completed, overall duration: {0}
+ {0} represents unlocalized duration (e.g. "02:14:18")
+
+
+ Exception while running tests: {0}
+ {0} represents localized exception message (e.g. "Cannot load file")
+
+
+ Could not find out Visual Studio version: {0}
+ {0} represents localized exception message (e.g. "Cannot load file")
+
+
+ (enable debug mode for more information)
+ Optionally used in ErrorAndWarning string
+
+
+ The following errors and warnings have occured during {0} {1}:{2}
+ {0} is TestDiscovery or TestExecution string, {1} is empty or EnableDebugMode string, {2} is line break
+
+
+ {0} does not match {1}
+ {0} represents an unlocalized test name (e.g. "TestSuite1.Test2"), {1} represents an unlocalized test filter value (e.g. "TestCategory=Nightly")
+
+
+ {0} matches {1}
+ {0} represents an unlocalized test name (e.g. "TestSuite1.Test2"), {1} represents an unlocalized test filter value (e.g. "TestCategory=Nightly")
+
+
+ No test case filter provided
+
+
+ Solution settings: {0}
+ {0} is unlocalized list of settings
+
+
+ Test case filter: {0}
+ {0} is the user-specified filter
+
+
+ Visual Studio version: {0}
+ {0} represents a number (e.g. "12" or "14")
+
+
+ test discovery
+
+
+ test execution
+
+
+ ERROR: {0}
+ {0} is the error message
+
+
+ Unknown enum literal: {0}
+ {0} represents a number (e.g. "0" or "1")
+
+
+ Warning: {0}
+ {0} is the warning message
+
+
+ Could not identify Visual Studio version. {0} requires at least Visual Studio 2012 Update 1.
+ {0} is ExtensionName string from Common.Dynamic.TAfGT resources file
+
+
+ {0} requires at least Visual Studio 2012 Update 1 - please update your Visual Studio installation.
+ {0} is ExtensionName string from Common.Dynamic.TAfGT resources file
+
+
+ Debugging is only possible if GoogleTestAdapter has been installed into Visual Studio - NuGet installation does not support this (and other features such as Visual Studio Options, toolbar, and solution settings).
+
+
+ Test case filter is invalid: {0}
+ {0} represents localized exception message (e.g. "Cannot load file")
+
+
+ Trait has same name as base test property and will thus be ignored for test case filtering: {0}
+ {0} represents unlocalized name for trait (e.g. "Test")
+
+
+ Could not attach debugger to process {0}:{1}{2}
+ {0} represents a process id (e.g. "10480"), {1} is a line break, {2} is an exception message
+
+
+ Could not attach debugger to process {0}, no error message available
+ {0} represents a process id (e.g. "10480")
+
+
+ Debugger attached to process {0}, took {1} ms
+ {0} represents a process id (e.g. "10480"), {1} represents a number (e.g. "12" or "14")
+
+
+ There might be more information on the problem in Visual Studio's ActivityLog.xml (see e.g. https://blogs.msdn.microsoft.com/visualstudio/2010/02/24/troubleshooting-extensions-with-the-activity-log/)
+
+
+ Invalid {0}
+ {0} represents unlocalized settings name (e.g. "GoogleTestAdapterSettings")
+
+
+ Could not find process
+
+
+ Unknown enum literal: {0}
+ {0} represents a number (e.g. "0" or "1")
+
+
+ Unknown Visual Studio version: {0}
+ {0} is version number (e.g. "15.0")
+
+
\ No newline at end of file
diff --git a/GoogleTestAdapter/TestAdapter/Settings/RunSettingsContainer.cs b/GoogleTestAdapter/TestAdapter/Settings/RunSettingsContainer.cs
index 4e76d672f..26075ab06 100644
--- a/GoogleTestAdapter/TestAdapter/Settings/RunSettingsContainer.cs
+++ b/GoogleTestAdapter/TestAdapter/Settings/RunSettingsContainer.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.Settings;
@@ -106,7 +106,7 @@ public static RunSettingsContainer LoadFromXml(XPathNavigator rootElement)
}
catch (InvalidOperationException e) when (e.InnerException is XmlSchemaValidationException)
{
- throw new InvalidRunSettingsException($"Invalid {GoogleTestConstants.SettingsName}", e.InnerException);
+ throw new InvalidRunSettingsException(String.Format(Resources.Invalid, GoogleTestConstants.SettingsName), e.InnerException);
}
catch (Exception e)
{
diff --git a/GoogleTestAdapter/TestAdapter/TestAdapter.csproj b/GoogleTestAdapter/TestAdapter/TestAdapter.csproj
index 090cbcc37..fe7bd3752 100644
--- a/GoogleTestAdapter/TestAdapter/TestAdapter.csproj
+++ b/GoogleTestAdapter/TestAdapter/TestAdapter.csproj
@@ -195,6 +195,11 @@
+
+ True
+ True
+ Resources.resx
+
@@ -212,6 +217,11 @@
Designer
GoogleTestAdapterSettings.xsd
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+ Designer
+
Designer
diff --git a/GoogleTestAdapter/TestAdapter/TestDiscoverer.cs b/GoogleTestAdapter/TestAdapter/TestDiscoverer.cs
index 1c0745f15..0d1c792b9 100644
--- a/GoogleTestAdapter/TestAdapter/TestDiscoverer.cs
+++ b/GoogleTestAdapter/TestAdapter/TestDiscoverer.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;
@@ -47,7 +47,7 @@ public void DiscoverTests(IEnumerable executables, IDiscoveryContext dis
CommonFunctions.LogVisualStudioVersion(_logger);
_logger.LogInfo(Strings.Instance.TestDiscoveryStarting);
- _logger.DebugInfo($"Solution settings: {_settings}");
+ _logger.DebugInfo(String.Format(Resources.Settings, _settings));
try
{
@@ -55,14 +55,14 @@ public void DiscoverTests(IEnumerable executables, IDiscoveryContext dis
_discoverer.DiscoverTests(executables, reporter);
stopwatch.Stop();
- _logger.LogInfo($"Test discovery completed, overall duration: {stopwatch.Elapsed}");
+ _logger.LogInfo(String.Format(Resources.TestDiscoveryCompleted, stopwatch.Elapsed));
}
catch (Exception e)
{
- _logger.LogError($"Exception while discovering tests: {e}");
+ _logger.LogError(String.Format(Resources.TestDiscoveryExceptionError, e));
}
- CommonFunctions.ReportErrors(_logger, "test discovery", _settings.DebugMode);
+ CommonFunctions.ReportErrors(_logger, TestPhase.TestDiscovery, _settings.DebugMode);
}
private bool IsSupportedVisualStudioVersion()
@@ -71,10 +71,10 @@ private bool IsSupportedVisualStudioVersion()
switch (version)
{
case VsVersion.Unknown:
- _logger.LogWarning($"Could not identify Visual Studio version. {Strings.Instance.ExtensionName} requires at least Visual Studio 2012 Update 1.");
+ _logger.LogWarning(String.Format(Resources.IdentifyVSError, Strings.Instance.ExtensionName));
return true;
case VsVersion.VS2012:
- _logger.LogError($"{Strings.Instance.ExtensionName} requires at least Visual Studio 2012 Update 1 - please update your Visual Studio installation.");
+ _logger.LogError(String.Format(Resources.VS2012Error, Strings.Instance.ExtensionName));
return false;
default:
return true;
diff --git a/GoogleTestAdapter/TestAdapter/TestExecutor.cs b/GoogleTestAdapter/TestAdapter/TestExecutor.cs
index 804601d83..fcb60e541 100644
--- a/GoogleTestAdapter/TestAdapter/TestExecutor.cs
+++ b/GoogleTestAdapter/TestAdapter/TestExecutor.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.Linq;
@@ -50,10 +50,10 @@ public void RunTests(IEnumerable executables, IRunContext runContext, IF
}
catch (Exception e)
{
- _logger.LogError($"Exception while running tests: {e}");
+ _logger.LogError(String.Format(Resources.TestRunningException, e));
}
- CommonFunctions.ReportErrors(_logger, "test execution", _settings.DebugMode);
+ CommonFunctions.ReportErrors(_logger, TestPhase.TestExecution, _settings.DebugMode);
}
public void RunTests(IEnumerable vsTestCasesToRun, IRunContext runContext, IFrameworkHandle frameworkHandle)
@@ -64,10 +64,10 @@ public void RunTests(IEnumerable vsTestCasesToRun, IRunContext runCo
}
catch (Exception e)
{
- _logger.LogError("Exception while running tests: " + e);
+ _logger.LogError(String.Format(Resources.TestRunningException, e));
}
- CommonFunctions.ReportErrors(_logger, "test execution", _settings.DebugMode);
+ CommonFunctions.ReportErrors(_logger, TestPhase.TestExecution, _settings.DebugMode);
}
public void Cancel()
@@ -79,7 +79,7 @@ public void Cancel()
_canceled = true;
_executor?.Cancel();
- _logger.LogInfo("Test execution canceled.");
+ _logger.LogInfo(Resources.TestExecutionCancelled);
}
}
@@ -103,7 +103,7 @@ private void TryRunTests(IEnumerable executables, IRunContext runContext
DoRunTests(testCasesToRun, runContext, frameworkHandle);
stopwatch.Stop();
- _logger.LogInfo($"Google Test execution completed, overall duration: {stopwatch.Elapsed}.");
+ _logger.LogInfo(String.Format(Resources.TestExecutionCompleted, stopwatch.Elapsed));
}
private void TryRunTests(IEnumerable vsTestCasesToRun, IRunContext runContext, IFrameworkHandle frameworkHandle)
@@ -122,7 +122,7 @@ private void TryRunTests(IEnumerable vsTestCasesToRun, IRunContext r
DoRunTests(testCasesToRun, runContext, frameworkHandle);
stopwatch.Stop();
- _logger.LogInfo($"Google Test execution completed, overall duration: {stopwatch.Elapsed}.");
+ _logger.LogInfo(String.Format(Resources.TestExecutionCompleted, stopwatch.Elapsed));
}
private Stopwatch StartStopWatchAndInitEnvironment(IRunContext runContext, IFrameworkHandle frameworkHandle)
@@ -134,7 +134,7 @@ private Stopwatch StartStopWatchAndInitEnvironment(IRunContext runContext, IFram
CommonFunctions.LogVisualStudioVersion(_logger);
_logger.LogInfo(Strings.Instance.TestExecutionStarting);
- _logger.DebugInfo($"Solution settings: {_settings}");
+ _logger.DebugInfo(String.Format(Resources.Settings, _settings));
return stopwatch;
}
@@ -149,7 +149,7 @@ private bool AbleToRun(IRunContext runContext)
{
if (!IsVisualStudioProcessAvailable() && runContext.IsBeingDebugged)
{
- _logger.LogError("Debugging is only possible if GoogleTestAdapter has been installed into Visual Studio - NuGet installation does not support this (and other features such as Visual Studio Options, toolbar, and solution settings).");
+ _logger.LogError(Resources.DebuggingMessage);
return false;
}