-
Notifications
You must be signed in to change notification settings - Fork 286
Write warnings outside of appdomain #5371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
6500868
b64cb1c
058b40f
5a13db9
b3c1b8c
eb810bf
b19041e
e9ffc15
1ba17f9
25d855c
82e7751
efa63c3
cfd63aa
aee5219
ea001f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
|
||
| using Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.ObjectModel; | ||
|
|
||
| namespace Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Discovery; | ||
|
|
||
| /// <summary> | ||
| /// Helps us communicate results that were created inside of AppDomain, when AppDomains are available and enabled. | ||
| /// </summary> | ||
| /// <param name="TestElements">The test elements that were discovered.</param> | ||
| /// <param name="Warnings">Warnings that happened during discovery.</param> | ||
| [Serializable] | ||
| internal sealed record AssemblyEnumerationResult(List<UnitTestElement> TestElements, List<string> Warnings); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -62,12 +62,11 @@ | |
| /// Enumerates through all types in the assembly in search of valid test methods. | ||
| /// </summary> | ||
| /// <param name="assemblyFileName">The assembly file name.</param> | ||
| /// <param name="warnings">Contains warnings if any, that need to be passed back to the caller.</param> | ||
|
Check failure on line 65 in src/Adapter/MSTest.TestAdapter/Discovery/AssemblyEnumerator.cs
|
||
| /// <returns>A collection of Test Elements.</returns> | ||
| internal ICollection<UnitTestElement> EnumerateAssembly( | ||
| string assemblyFileName, | ||
| List<string> warnings) | ||
| internal AssemblyEnumerationResult EnumerateAssembly(string assemblyFileName) | ||
| { | ||
| List<string> warnings = new(); | ||
| DebugEx.Assert(!StringEx.IsNullOrWhiteSpace(assemblyFileName), "Invalid assembly file name."); | ||
| var tests = new List<UnitTestElement>(); | ||
| // Contains list of assembly/class names for which we have already added fixture tests. | ||
|
|
@@ -117,7 +116,7 @@ | |
| tests.AddRange(testsInType); | ||
| } | ||
|
|
||
| return tests; | ||
| return new AssemblyEnumerationResult(tests, warnings); | ||
| } | ||
|
|
||
| /// <summary> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.