File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Tests/FoundationEssentialsTests/ProgressManager Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -365,14 +365,18 @@ import Testing
365
365
properties. estimatedTimeRemaining = Duration . seconds ( 200 )
366
366
}
367
367
368
- let child = manager. subprogress ( assigningCount: 1 ) . start ( totalCount: 2 )
369
- child. withProperties { properties in
368
+ var child : ProgressManager ? = manager. subprogress ( assigningCount: 1 ) . start ( totalCount: 2 )
369
+ child? . withProperties { properties in
370
370
properties. completedCount = 1
371
371
properties. estimatedTimeRemaining = Duration . seconds ( 80000 )
372
372
}
373
373
374
374
#expect( manager. fractionCompleted == 0.75 )
375
375
#expect( manager. summary ( of: ProgressManager . Properties. EstimatedTimeRemaining. self) == Duration . seconds ( 80000 ) )
376
+
377
+ child = nil
378
+ #expect( manager. fractionCompleted == 1.0 )
379
+ #expect( manager. summary ( of: ProgressManager . Properties. EstimatedTimeRemaining. self) == Duration . seconds ( 200 ) )
376
380
}
377
381
378
382
}
You can’t perform that action at this time.
0 commit comments