File tree Expand file tree Collapse file tree 3 files changed +24
-24
lines changed Expand file tree Collapse file tree 3 files changed +24
-24
lines changed Original file line number Diff line number Diff line change 1
1
#if compiler(<6.1)
2
- package let testValuesByTestID = LockIsolated < [ AnyHashable : DependencyValues ] > ( [ : ] )
2
+ package let testValuesByTestID = LockIsolated < [ AnyHashable : DependencyValues ] > ( [ : ] )
3
3
#endif
Original file line number Diff line number Diff line change 60
60
public static var dependencies : Self {
61
61
Self { _ in }
62
62
}
63
-
63
+
64
64
/// A trait that overrides a test's or suite's dependency.
65
65
///
66
66
/// Useful for overriding a dependency in a test without incurring the nesting and
Original file line number Diff line number Diff line change 4
4
import Testing
5
5
6
6
@Suite struct PrepareDependenciesTests {
7
- #if swift(>=6.1)
8
- @Test (
9
- . serialized,
10
- . dependency( \. uuid, . incrementing) ,
11
- arguments: [ 1 , 2 , 3 ]
12
- )
13
- func uuid( value: Int ) {
14
- @Dependency ( \. uuid) var uuid
15
- #expect( uuid ( ) == UUID ( 0 ) )
16
- }
17
- #else
18
- @Test (
19
- . serialized,
20
- . dependency( \. uuid, . incrementing) ,
21
- arguments: [ 1 , 2 , 3 ]
22
- )
23
- func uuid( value: Int ) {
24
- @Dependency ( \. uuid) var uuid
25
- if value == 1 {
7
+ #if swift(>=6.1)
8
+ @Test (
9
+ . serialized,
10
+ . dependency( \. uuid, . incrementing) ,
11
+ arguments: [ 1 , 2 , 3 ]
12
+ )
13
+ func uuid( value: Int ) {
14
+ @Dependency ( \. uuid) var uuid
26
15
#expect( uuid ( ) == UUID ( 0 ) )
27
- } else {
28
- withKnownIssue {
16
+ }
17
+ #else
18
+ @Test (
19
+ . serialized,
20
+ . dependency( \. uuid, . incrementing) ,
21
+ arguments: [ 1 , 2 , 3 ]
22
+ )
23
+ func uuid( value: Int ) {
24
+ @Dependency ( \. uuid) var uuid
25
+ if value == 1 {
29
26
#expect( uuid ( ) == UUID ( 0 ) )
27
+ } else {
28
+ withKnownIssue {
29
+ #expect( uuid ( ) == UUID ( 0 ) )
30
+ }
30
31
}
31
32
}
32
- }
33
33
#endif
34
34
35
35
@Test func isolation1( ) {
You can’t perform that action at this time.
0 commit comments