Skip to content

Commit

Permalink
Verify that a module initializer is emitted for an extern method
Browse files Browse the repository at this point in the history
  • Loading branch information
jnm2 committed May 8, 2020
1 parent 5d9c8d8 commit 64269a9
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,16 @@ class C
namespace System.Runtime.CompilerServices { class ModuleInitializerAttribute : System.Attribute { } }
";
CompileAndVerify(source, parseOptions: s_parseOptions);
CompileAndVerify(
source,
parseOptions: s_parseOptions,
options: TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All),
symbolValidator: module =>
{
Assert.Equal(MetadataImportOptions.All, ((PEModuleSymbol)module).ImportOptions);
var rootModuleType = module.ContainingAssembly.GetTypeByMetadataName("<Module>");
Assert.NotNull(rootModuleType.GetMember(".cctor"));
});
}

[Fact]
Expand Down

0 comments on commit 64269a9

Please sign in to comment.