Skip to content

Commit

Permalink
Refactored RuriLib.Parallelization.Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
openbullet committed Sep 7, 2024
1 parent edbd635 commit 915e32b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions RuriLib.Parallelization.Tests/ParallelizerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ private readonly Func<int, CancellationToken, Task<bool>> _longTask
private int _progressCount;
private bool _lastResult;
private bool _completedFlag;
private Exception _lastException;
private Exception? _lastException;

private void OnProgress(object sender, float value) => _progressCount++;
private void OnProgress(object? sender, float value) => _progressCount++;

private void OnResult(object sender, ResultDetails<int, bool> value) => _lastResult = value.Result;
private void OnResult(object? sender, ResultDetails<int, bool> value) => _lastResult = value.Result;

private void OnCompleted(object sender, EventArgs e) => _completedFlag = true;
private void OnCompleted(object? sender, EventArgs e) => _completedFlag = true;

private void OnException(object sender, Exception ex) => _lastException = ex;
private void OnException(object? sender, Exception ex) => _lastException = ex;

[Fact]
public async Task Run_QuickTasks_CompleteAndCall()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 915e32b

Please sign in to comment.