Skip to content

Commit eb90176

Browse files
author
Elizabeth Morrow
committed
cleanup, removing diagnostics
1 parent e45f762 commit eb90176

9 files changed

Lines changed: 8 additions & 16 deletions

GoogleTestAdapter/Core/Runners/TestResultCollector.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ bool isFixtureMethodCase(TestCase tc)
3838
CreateFixtureMethodResults(arrFixtureMethods, testResults);
3939

4040
var consoleParser = new StandardOutputTestResultParser(arrTestCasesRun, consoleOutput, _logger);
41-
4241
if (testResults.Count < arrTestCasesRun.Length)
4342
CollectResultsFromConsoleOutput(consoleParser, testResults);
4443

GoogleTestAdapter/Core/Settings/SettingsWrapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ public virtual int NrOfTestRepetitions
476476
}
477477

478478
public static readonly string OptionShowFixtureMethodNode = Resources.OptionShowFixtureMethodNode;
479-
public const bool OptionShowFixtureMethodNodeDefaultValue = false; // TODO set to false
479+
public const bool OptionShowFixtureMethodNodeDefaultValue = false;
480480
public static readonly string OptionShowFixtureMethodNodeDescription = Resources.OptionShowFixtureMethodNodeDescription;
481481

482482
public virtual bool ShowFixtureMethodNode => _currentSettings.ShowFixtureMethodNode ?? OptionShowFixtureMethodNodeDefaultValue;

GoogleTestAdapter/Core/TestCases/ListTestsParser.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ namespace GoogleTestAdapter.TestCases
77
public class ListTestsParser
88
{
99
private readonly string _testNameSeparator;
10-
private readonly bool _showFixtureMethodNode;
1110

12-
public ListTestsParser(string testNameSeparator, bool showFixtureMethodNode)
11+
public ListTestsParser(string testNameSeparator)
1312
{
1413
_testNameSeparator = testNameSeparator;
15-
_showFixtureMethodNode = showFixtureMethodNode;
1614
}
1715

1816
public IList<TestCaseDescriptor> ParseListTestsOutput(IEnumerable<string> consoleOutput)

GoogleTestAdapter/Core/TestCases/StreamingListTestsParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
using System;
44
using System.Text.RegularExpressions;
5-
using System.Xml.Linq;
65

76
namespace GoogleTestAdapter.TestCases
87
{
8+
99
public class StreamingListTestsParser
1010
{
1111
private static readonly Regex SuiteRegex = new Regex($@"(([^.\s]*(?:\.[\S]+)*)|([\w\/]*(?:\.[\w\/]+)*))(?:{Regex.Escape(GoogleTestConstants.TypedTestMarker)}(.*))?", RegexOptions.Compiled);

GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
using System;
44
using System.Collections.Generic;
5-
using System.Diagnostics;
65
using System.IO;
76
using System.Linq;
87
using System.Text.RegularExpressions;
@@ -28,7 +27,6 @@ public class TestCaseFactory
2827
public TestCaseFactory(string executable, ILogger logger, SettingsWrapper settings,
2928
IDiaResolverFactory diaResolverFactory)
3029
{
31-
Debugger.Launch();
3230
_logger = logger;
3331
_settings = settings;
3432
_executable = executable;
@@ -37,7 +35,6 @@ public TestCaseFactory(string executable, ILogger logger, SettingsWrapper settin
3735

3836
public IList<TestCase> CreateTestCases(Action<TestCase> reportTestCase = null)
3937
{
40-
Debugger.Launch();
4138
List<string> standardOutput = new List<string>();
4239
if (_settings.UseNewTestExecutionFramework)
4340
{
@@ -69,7 +66,7 @@ public IList<TestCase> CreateTestCases(Action<TestCase> reportTestCase = null)
6966
return new List<TestCase>();
7067
}
7168

72-
IList<TestCaseDescriptor> testCaseDescriptors = new ListTestsParser(_settings.TestNameSeparator, _settings.ShowFixtureMethodNode).ParseListTestsOutput(standardOutput);
69+
IList<TestCaseDescriptor> testCaseDescriptors = new ListTestsParser(_settings.TestNameSeparator).ParseListTestsOutput(standardOutput);
7370
var testCaseLocations = GetTestCaseLocations(testCaseDescriptors, _settings.GetPathExtension(_executable));
7471

7572
IList<TestCase> testCases = new List<TestCase>();
@@ -99,7 +96,6 @@ public IList<TestCase> CreateTestCases(Action<TestCase> reportTestCase = null)
9996

10097
private IList<TestCase> NewCreateTestcases(Action<TestCase> reportTestCase, List<string> standardOutput)
10198
{
102-
Debugger.Launch();
10399
var testCases = new List<TestCase>();
104100

105101
var resolver = new NewTestCaseResolver(

GoogleTestAdapter/Core/TestResults/StandardOutputTestResultParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
using System;
44
using System.Collections.Generic;
5-
using System.Diagnostics;
65
using System.Globalization;
76
using System.Linq;
87
using System.Text.RegularExpressions;
@@ -16,6 +15,7 @@ public class StandardOutputTestResultParser
1615
private const string Run = "[ RUN ]";
1716
public const string Failed = "[ FAILED ]";
1817
public const string Passed = "[ OK ]";
18+
public const string FailedFixture = "SetUpTestSuite or TearDownTestSuite";
1919

2020
public static readonly string CrashText = Resources.CrashText;
2121

GoogleTestAdapter/Core/TestResults/StreamingStandardOutputTestResultParser.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
using System;
44
using System.Collections.Generic;
5-
using System.Diagnostics;
65
using System.Linq;
76
using System.Text.RegularExpressions;
87
using GoogleTestAdapter.Common;
@@ -31,7 +30,7 @@ static StreamingStandardOutputTestResultParser()
3130
string passedMarker = Regex.Escape(StandardOutputTestResultParser.Passed);
3231
string failedMarker = Regex.Escape(StandardOutputTestResultParser.Failed);
3332
PrefixedLineRegex = new Regex($"(.+)((?:{passedMarker}|{failedMarker}).*)", RegexOptions.Compiled);
34-
FixtureMethodResultRegex = new Regex($@"(?:{failedMarker}\s*)(\w+):(?:\s+SetUpTestSuite or TearDownTestSuite)", RegexOptions.Compiled);
33+
FixtureMethodResultRegex = new Regex($@"(?:{failedMarker}\s*)(\w+):(?:\s+{StandardOutputTestResultParser.FailedFixture})", RegexOptions.Compiled);
3534
}
3635

3736
public StreamingStandardOutputTestResultParser(IEnumerable<TestCase> testCasesRun,
@@ -71,7 +70,7 @@ private void DoReportLine(string line)
7170
}
7271
ReportTestStart(line);
7372
}
74-
else if (StandardOutputTestResultParser.IsFailedLine(line) && line.Contains("TearDownTestSuite"))
73+
else if (StandardOutputTestResultParser.IsFailedLine(line) && line.Contains(StandardOutputTestResultParser.FailedFixture))
7574
{
7675
ReportFixtureMethodFailure(line);
7776
}

GoogleTestAdapter/Resources/AllTestSettings.gta.runsettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<ParallelTestExecution>false</ParallelTestExecution>
1818
<PrintTestOutput>true</PrintTestOutput>
1919
<RunDisabledTests>false</RunDisabledTests>
20+
<ShowFixtureMethodNode>false</ShowFixtureMethodNode>
2021
<ShuffleTests>false</ShuffleTests>
2122
<ShuffleTestsSeed>0</ShuffleTestsSeed>
2223
<TestDiscoveryRegex>.*Tests.*.exe</TestDiscoveryRegex>

GoogleTestAdapter/VsPackage.TAfGT/GoogleTestExtensionOptionsPage.vsct

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545
<Button guid="guidGoogleTestExtensionOptionsPageCmdSet" id="SwitchShowFixtureNodeOptionCommandId" priority="0x0103" type="Button">
4646
<Parent guid="guidGoogleTestExtensionOptionsPageCmdSet" id="ToolbarGroup" />
47-
<!--<Icon guid="toolbaricons" id="show_fixture_node" />-->
4847
<CommandFlag>DefaultInvisible</CommandFlag>
4948
<CommandFlag>DynamicVisibility</CommandFlag>
5049
<Strings>

0 commit comments

Comments
 (0)