Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 7ed8366

Browse files
committed
Test for GetNamespaceDefinition crash
1 parent 4d96146 commit 7ed8366

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/System.Reflection.Metadata/tests/Resources/Namespace/NamespaceTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,19 @@ public class Namespace
131131
{ }
132132
}
133133

134+
// Same suffix shared by different namespaces
135+
namespace FxResources.Microsoft.CSharp
136+
{
137+
public class Resources
138+
{ }
139+
}
140+
141+
namespace Microsoft.CSharp
142+
{
143+
public class Program
144+
{ }
145+
}
146+
134147
// EXCEPTION: Forwarder namespace has a type forwarder: Forwarder.FwdType. This can be found in NamespaceForwardedCS.cs.
135148
namespace Forwarder
136149
{
Binary file not shown.

src/System.Reflection.Metadata/tests/Resources/Namespace/compile.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
tf edit NamespaceForwardedCS.dll
33
csc /target:library NamespaceForwardedCS.cs
44
tf edit NamespaceTests.dll
5-
csc /r:NamespaceForwardedCS.dll /target:library /out:NamespaceTests.dll NamespaceTestingCS.cs
5+
csc /r:NamespaceForwardedCS.dll /target:library /out:NamespaceTests.dll NamespaceTests.cs

0 commit comments

Comments
 (0)