Skip to content

Commit c0f6b00

Browse files
authored
Fix
1 parent f0925e4 commit c0f6b00

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/UnitTests/MSTestAdapter.UnitTests/Discovery/AssemblyEnumeratorTests.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,8 @@ public void GetTypesShouldLogWarningsWhenReflectionFailsWithLoaderExceptions()
133133

134134
Type[] types = AssemblyEnumerator.GetTypes(mockAssembly.Object, "DummyAssembly", _warnings);
135135

136-
#if NETFRAMEWORK
137-
Verify(types is null);
138-
#else
139-
Verify(types is not null);
140-
#endif
136+
// Depending on the TFM, .NET either gives us null or empty array.
137+
Verify(types is null || types.Length == 0);
141138

142139
Verify(_warnings.Count == 1);
143140
Verify(_warnings.ToList().Contains(

0 commit comments

Comments
 (0)