Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GoogleTestAdapter/Core/GoogleTestConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static class GoogleTestConstants
public const string NrOfRepetitionsOption = " --gtest_repeat";
public const string CatchExceptions = " --gtest_catch_exceptions";
public const string BreakOnFailure = " --gtest_break_on_failure";
public const string Utf8OutputOption = " --gtest_print_utf8=1";

public const int ShuffleTestsSeedDefaultValue = 0;
public const string ShuffleTestsSeedMaxValueAsString = "99999";
Expand Down
2 changes: 1 addition & 1 deletion GoogleTestAdapter/Core/Runners/CommandLineGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class CommandLineGenerator
public class Args
{
public IList<TestCase> TestCases { get; }
public string CommandLine { get; }
public string CommandLine { get; set; }

internal Args(IList<TestCase> testCases, string commandLine)
{
Expand Down
4 changes: 4 additions & 0 deletions GoogleTestAdapter/Core/Runners/SequentialTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ private void RunTestsFromExecutable(string executable, string workingDir, IDicti
{
break;
}

// Enable UTF-8 output for Google Test.
arguments.CommandLine += " --gtest_print_utf8=1";

var streamingParser = new StreamingStandardOutputTestResultParser(arguments.TestCases, _logger, _frameworkReporter);
var results = RunTests(executable, workingDir, envVars, isBeingDebugged, debuggedLauncher, arguments, executor, streamingParser).ToArray();

Expand Down
2 changes: 1 addition & 1 deletion GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private IList<TestCase> NewCreateTestcases(Action<TestCase> reportTestCase, List
parser.ReportLine(s);
};

string cmdLine = GoogleTestConstants.ListTestsOption;
string cmdLine = GoogleTestConstants.ListTestsOption + GoogleTestContants.Utf8OutputOption;
if (!string.IsNullOrEmpty(_settings.AdditionalTestDiscoveryParam))
{
cmdLine = string.Format("{0} {1}", _settings.AdditionalTestDiscoveryParam, cmdLine);
Expand Down