Skip to content

Commit c3c6aca

Browse files
add some comments
1 parent c99cd2f commit c3c6aca

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

GoogleTestAdapter/Core/TestCases/TestCaseFactory.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ private TestCase CreateTestCase(TestCaseDescriptor descriptor)
234234
var testCase = new TestCase(
235235
descriptor.FullyQualifiedName, descriptor.FullyQualifiedName, _executable, descriptor.DisplayName, "", 0);
236236
testCase.Traits.AddRange(GetFinalTraits(descriptor.DisplayName, new List<Trait>()));
237+
238+
// Add the TestType for use in the executor when constructing the test key.
237239
testCase.Traits.Add(new Trait(nameof(TestCaseDescriptor.TestType), descriptor.TestType.ToString()));
238240
return testCase;
239241
}
@@ -262,12 +264,16 @@ private TestCase CreateTestCase(TestCaseDescriptor descriptor, TestCaseLocation
262264
var testCase = new TestCase(
263265
descriptor.FullyQualifiedName, ns + descriptor.FullyQualifiedName, _executable, descriptor.DisplayName, location.Sourcefile, (int)location.Line);
264266
testCase.Traits.AddRange(GetFinalTraits(descriptor.DisplayName, location.Traits));
267+
268+
// Add the TestType for use in the executor when constructing the test key.
265269
testCase.Traits.Add(new Trait(nameof(TestCaseDescriptor.TestType), descriptor.TestType.ToString()));
266270
return testCase;
267271
}
268272

269273
var returnTest = new TestCase(
270274
descriptor.FullyQualifiedName, descriptor.FullyQualifiedName, _executable, descriptor.DisplayName, "", 0);
275+
276+
// Add the TestType for use in the executor when constructing the test key.
271277
returnTest.Traits.Add(new Trait(nameof(TestCaseDescriptor.TestType), descriptor.TestType.ToString()));
272278
_logger.LogWarning(String.Format(Resources.LocationNotFoundError, descriptor.FullyQualifiedName));
273279
return returnTest;

0 commit comments

Comments
 (0)