This repository was archived by the owner on Jun 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 10
10
- name : Checkout
11
11
uses : actions/checkout@v1
12
12
- name : Build and Test
13
- run : swift test
13
+ run : swift test -c release
14
14
env :
15
15
DEVELOPER_DIR : /Applications/Xcode_11.4.app/Contents/Developer
16
16
28
28
apt-get update
29
29
apt-get install -y libxml2-dev
30
30
- name : Build and Test
31
- run : swift test --enable-test-discovery
31
+ run : swift test -c release - -enable-test-discovery
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ public struct SourceFile: Hashable, Codable {
89
89
visitedImports. append ( `import`)
90
90
}
91
91
92
+ @discardableResult
92
93
func pop( ) -> Contextual ? {
93
94
return context. popLast ( )
94
95
}
@@ -187,27 +188,33 @@ public struct SourceFile: Hashable, Codable {
187
188
// MARK: -
188
189
189
190
override func visitPost( _ node: ClassDeclSyntax ) {
190
- assert ( ( pop ( ) as? Symbol ) ? . api is Class )
191
+ let context = pop ( )
192
+ assert ( ( context as? Symbol ) ? . api is Class )
191
193
}
192
194
193
195
override func visitPost( _ node: EnumDeclSyntax ) {
194
- assert ( ( pop ( ) as? Symbol ) ? . api is Enumeration )
196
+ let context = pop ( )
197
+ assert ( ( context as? Symbol ) ? . api is Enumeration )
195
198
}
196
199
197
200
override func visitPost( _ node: ExtensionDeclSyntax ) {
198
- assert ( pop ( ) is Extension )
201
+ let context = pop ( )
202
+ assert ( context is Extension )
199
203
}
200
204
201
205
override func visitPost( _ node: IfConfigClauseSyntax ) {
202
- assert ( pop ( ) is CompilationCondition )
206
+ let context = pop ( )
207
+ assert ( context is CompilationCondition )
203
208
}
204
209
205
210
override func visitPost( _ node: ProtocolDeclSyntax ) {
206
- assert ( ( pop ( ) as? Symbol ) ? . api is Protocol )
211
+ let context = pop ( )
212
+ assert ( ( context as? Symbol ) ? . api is Protocol )
207
213
}
208
214
209
215
override func visitPost( _ node: StructDeclSyntax ) {
210
- assert ( ( pop ( ) as? Symbol ) ? . api is Structure )
216
+ let context = pop ( )
217
+ assert ( ( context as? Symbol ) ? . api is Structure )
211
218
}
212
219
}
213
220
}
Original file line number Diff line number Diff line change 1
1
import XCTest
2
2
3
- @ testable import SwiftDoc
3
+ import SwiftDoc
4
4
import SwiftSemantics
5
5
import struct SwiftSemantics. Protocol
6
6
import SwiftSyntax
You can’t perform that action at this time.
0 commit comments