-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add edge case with referencing enums in another assembly
- Dependency crawler now properly finds usage of enums from other assemblies. - Add edge case to Unit Test test app. - Update dumper unit test because of new types added.
- Loading branch information
1 parent
d9180d3
commit 5556e88
Showing
7 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
MetadataProcessor.Tests/TestNFApp/TestEnumInAnotherAssembly.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// Copyright (c) .NET Foundation and Contributors | ||
// See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace System.IO | ||
{ | ||
public class TestEnumInAnotherAssembly | ||
{ | ||
public void CallTestEnumInAnotherAssembly() | ||
{ | ||
// This test checks if MDP can minimize the assembly using an enum that is defined in another assembly | ||
// and the class calling it is in a different assembly BUT in the same namespace. | ||
var ioException = new IOException( | ||
string.Empty, | ||
(int)IOException.IOExceptionErrorCode.DirectoryNotFound); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
MetadataProcessor.Tests/TestNFClassLibrary/TestNFClassLibrary/IAmAClassWithAnEnum.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// Copyright (c) .NET Foundation and Contributors | ||
// See LICENSE file in the project root for full license information. | ||
// | ||
|
||
namespace TestNFClassLibrary | ||
{ | ||
public class IAmAClassWithAnEnum | ||
{ | ||
public enum EnumA | ||
{ | ||
Test = 1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters