Skip to content

Commit

Permalink
Skip verification and execution where appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
333fred committed Jan 28, 2021
1 parent 5544fcf commit d8000fb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5338,7 +5338,7 @@ public unsafe class C

verifySymbolNullabilities(comp.GetTypeByMetadataName("C")!);

CompileAndVerify(comp, symbolValidator: symbolValidator);
CompileAndVerify(comp, symbolValidator: symbolValidator, verify: Verification.Skipped);

static void symbolValidator(ModuleSymbol module)
{
Expand Down Expand Up @@ -6205,13 +6205,21 @@ unsafe class Derived2 : Base

var allSourceComp = CreateCompilationWithFunctionPointers(new[] { executableCode, source1, source2 }, options: TestOptions.UnsafeReleaseExe);

CompileAndVerify(allSourceComp, expectedOutput: expectedOutput, symbolValidator: getSymbolValidator(separateAssembly: false));
CompileAndVerify(
allSourceComp,
expectedOutput: RuntimeUtilities.IsCoreClrRuntime ? expectedOutput : null,
symbolValidator: getSymbolValidator(separateAssembly: false),
verify: Verification.Skipped);

var baseComp = CreateCompilationWithFunctionPointers(source1);
var metadataRef = baseComp.EmitToImageReference();

var derivedComp = CreateCompilationWithFunctionPointers(new[] { executableCode, source2 }, references: new[] { metadataRef }, options: TestOptions.UnsafeReleaseExe);
CompileAndVerify(derivedComp, expectedOutput: expectedOutput, symbolValidator: getSymbolValidator(separateAssembly: true));
CompileAndVerify(
derivedComp,
expectedOutput: RuntimeUtilities.IsCoreClrRuntime ? expectedOutput : null,
symbolValidator: getSymbolValidator(separateAssembly: true),
verify: Verification.Skipped);

static Action<ModuleSymbol> getSymbolValidator(bool separateAssembly)
{
Expand Down Expand Up @@ -6442,7 +6450,7 @@ protected override void M7(delegate*<dynamic, void> ptr) {}
);

assertMethods(comp.SourceModule);
CompileAndVerify(comp, symbolValidator: assertMethods);
CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped);

static void assertMethods(ModuleSymbol module)
{
Expand Down Expand Up @@ -6566,7 +6574,7 @@ protected override void M7(delegate*<string?, void> ptr) {}
);

assertMethods(comp.SourceModule);
CompileAndVerify(comp, symbolValidator: assertMethods);
CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped);

static void assertMethods(ModuleSymbol module)
{
Expand Down Expand Up @@ -6644,7 +6652,7 @@ protected override void M7(delegate*<ref string?, void> ptr) {}
);

assertMethods(comp.SourceModule);
CompileAndVerify(comp, symbolValidator: assertMethods);
CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped);

static void assertMethods(ModuleSymbol module)
{
Expand Down Expand Up @@ -6722,7 +6730,7 @@ public override void M7(ref delegate*<string?, void> ptr) {}
);

assertMethods(comp.SourceModule);
CompileAndVerify(comp, symbolValidator: assertMethods);
CompileAndVerify(comp, symbolValidator: assertMethods, verify: Verification.Skipped);

static void assertMethods(ModuleSymbol module)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ void M(delegate* unmanaged[Stdcall, Thiscall]<void> param1)
}
}", targetFramework: TargetFramework.NetCoreApp);

CompileAndVerify(comp);
CompileAndVerify(comp, verify: Verification.Skipped);

var tree = comp.SyntaxTrees[0];
var model = comp.GetSemanticModel(tree);
Expand Down

0 comments on commit d8000fb

Please sign in to comment.