private async ValueTask TestDriver(TestUtils.AllocatorType allocatorType, [Values] bool isAsync) { ValueTask task; switch (allocatorType) { case TestUtils.AllocatorType.FixedBlittable: task = RunTest <long>(Populate, Read, Recover, isAsync); break; case TestUtils.AllocatorType.VarLenBlittable: this.varLenStructObj = new VLValue(); task = RunTest <VLValue>(Populate, Read, Recover, isAsync); break; case TestUtils.AllocatorType.Generic: this.serializerSettingsObj = new MyValueSerializer(); task = RunTest <MyValue>(Populate, Read, Recover, isAsync); break; default: throw new ApplicationException("Unknown allocator type"); } ; await task; }
public async ValueTask RecoveryTestFailOnSectorSize([Values] TestUtils.AllocatorType allocatorType, [Values] bool isAsync) { this.smallSector = true; await TestDriver(allocatorType, isAsync); }
public async ValueTask RecoveryTestByAllocatorType([Values] TestUtils.AllocatorType allocatorType, [Values] bool isAsync) { await TestDriver(allocatorType, isAsync); }