Skip to content

Commit 30049f6

Browse files
committed
Swift: move new code down in tests
1 parent aa54e4b commit 30049f6

File tree

4 files changed

+456
-452
lines changed

4 files changed

+456
-452
lines changed

swift/ql/test/extractor-tests/declarations/all.expected

Lines changed: 127 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -101,165 +101,165 @@
101101
| declarations.swift:50:3:52:3 | +-(_:) |
102102
| declarations.swift:50:22:50:22 | self |
103103
| declarations.swift:50:26:50:33 | other |
104-
| declarations.swift:55:1:55:22 | Derived |
105-
| declarations.swift:55:7:55:7 | deinit() |
106-
| declarations.swift:55:7:55:7 | self |
107-
| declarations.swift:55:21:55:21 | init() |
108-
| declarations.swift:55:21:55:21 | self |
109-
| declarations.swift:57:1:57:28 | var ... = ... |
110-
| declarations.swift:57:1:57:28 | { ... } |
111-
| declarations.swift:57:5:57:5 | d |
112-
| declarations.swift:59:8:59:17 | +- |
113-
| declarations.swift:61:1:66:1 | precedencegroup ... |
114-
| declarations.swift:68:7:68:16 | +++ |
115-
| declarations.swift:70:7:70:21 | *** |
116-
| declarations.swift:72:18:78:1 | ZeroWrapper |
117-
| declarations.swift:72:25:72:25 | init() |
118-
| declarations.swift:72:25:72:25 | self |
119-
| declarations.swift:73:3:77:3 | var ... = ... |
120-
| declarations.swift:73:7:73:7 | wrappedValue |
121-
| declarations.swift:74:5:74:5 | self |
122-
| declarations.swift:74:5:76:5 | get |
123-
| declarations.swift:80:1:83:1 | foo() |
124-
| declarations.swift:81:16:81:23 | var ... = ... |
125-
| declarations.swift:81:20:81:20 | _x |
126-
| declarations.swift:81:20:81:20 | get |
127-
| declarations.swift:81:20:81:20 | x |
128-
| declarations.swift:85:1:140:1 | HasPropertyAndObserver |
129-
| declarations.swift:85:8:85:8 | hasBoth |
130-
| declarations.swift:85:8:85:8 | hasDidSet1 |
131-
| declarations.swift:85:8:85:8 | hasDidSet2 |
132-
| declarations.swift:85:8:85:8 | hasWillSet1 |
133-
| declarations.swift:85:8:85:8 | hasWillSet2 |
134-
| declarations.swift:85:8:85:8 | init(normalField:hasWillSet1:hasWillSet2:hasDidSet1:hasDidSet2:hasBoth:) |
135-
| declarations.swift:85:8:85:8 | normalField |
136-
| declarations.swift:85:8:85:8 | self |
137-
| declarations.swift:86:3:91:3 | var ... = ... |
138-
| declarations.swift:86:7:86:7 | (unnamed function decl) |
139-
| declarations.swift:86:7:86:7 | self |
140-
| declarations.swift:86:7:86:7 | settableField |
141-
| declarations.swift:87:5:87:5 | newValue |
142-
| declarations.swift:87:5:87:5 | self |
143-
| declarations.swift:87:5:87:11 | set |
144-
| declarations.swift:88:5:88:5 | self |
145-
| declarations.swift:88:5:90:5 | get |
146-
| declarations.swift:95:3:97:3 | var ... = ... |
147-
| declarations.swift:95:7:95:7 | readOnlyField1 |
148-
| declarations.swift:95:27:95:27 | self |
149-
| declarations.swift:95:27:97:3 | get |
150-
| declarations.swift:100:3:104:3 | var ... = ... |
151-
| declarations.swift:100:7:100:7 | readOnlyField2 |
152-
| declarations.swift:101:5:101:5 | self |
153-
| declarations.swift:101:5:103:5 | get |
154-
| declarations.swift:106:3:106:21 | var ... = ... |
155-
| declarations.swift:106:7:106:7 | (unnamed function decl) |
156-
| declarations.swift:106:7:106:7 | get |
157-
| declarations.swift:106:7:106:7 | normalField |
158-
| declarations.swift:106:7:106:7 | self |
159-
| declarations.swift:106:7:106:7 | self |
160-
| declarations.swift:106:7:106:7 | self |
161-
| declarations.swift:106:7:106:7 | set |
162-
| declarations.swift:106:7:106:7 | value |
163-
| declarations.swift:108:3:108:3 | (unnamed function decl) |
164-
| declarations.swift:108:3:108:3 | self |
165-
| declarations.swift:108:3:113:3 | subscript ... |
166-
| declarations.swift:108:13:108:13 | x |
167-
| declarations.swift:108:13:108:13 | x |
168-
| declarations.swift:108:13:108:16 | x |
169-
| declarations.swift:109:5:109:5 | self |
170-
| declarations.swift:109:5:111:5 | get |
171-
| declarations.swift:112:5:112:5 | newValue |
172-
| declarations.swift:112:5:112:5 | self |
173-
| declarations.swift:112:5:112:11 | set |
174-
| declarations.swift:115:3:117:3 | subscript ... |
175-
| declarations.swift:115:13:115:13 | x |
176-
| declarations.swift:115:13:115:16 | x |
177-
| declarations.swift:115:21:115:21 | y |
178-
| declarations.swift:115:21:115:25 | y |
179-
| declarations.swift:115:37:115:37 | self |
180-
| declarations.swift:115:37:117:3 | get |
104+
| declarations.swift:55:8:55:17 | +- |
105+
| declarations.swift:57:1:62:1 | precedencegroup ... |
106+
| declarations.swift:64:7:64:16 | +++ |
107+
| declarations.swift:66:7:66:21 | *** |
108+
| declarations.swift:68:18:74:1 | ZeroWrapper |
109+
| declarations.swift:68:25:68:25 | init() |
110+
| declarations.swift:68:25:68:25 | self |
111+
| declarations.swift:69:3:73:3 | var ... = ... |
112+
| declarations.swift:69:7:69:7 | wrappedValue |
113+
| declarations.swift:70:5:70:5 | self |
114+
| declarations.swift:70:5:72:5 | get |
115+
| declarations.swift:76:1:79:1 | foo() |
116+
| declarations.swift:77:16:77:23 | var ... = ... |
117+
| declarations.swift:77:20:77:20 | _x |
118+
| declarations.swift:77:20:77:20 | get |
119+
| declarations.swift:77:20:77:20 | x |
120+
| declarations.swift:81:1:136:1 | HasPropertyAndObserver |
121+
| declarations.swift:81:8:81:8 | hasBoth |
122+
| declarations.swift:81:8:81:8 | hasDidSet1 |
123+
| declarations.swift:81:8:81:8 | hasDidSet2 |
124+
| declarations.swift:81:8:81:8 | hasWillSet1 |
125+
| declarations.swift:81:8:81:8 | hasWillSet2 |
126+
| declarations.swift:81:8:81:8 | init(normalField:hasWillSet1:hasWillSet2:hasDidSet1:hasDidSet2:hasBoth:) |
127+
| declarations.swift:81:8:81:8 | normalField |
128+
| declarations.swift:81:8:81:8 | self |
129+
| declarations.swift:82:3:87:3 | var ... = ... |
130+
| declarations.swift:82:7:82:7 | (unnamed function decl) |
131+
| declarations.swift:82:7:82:7 | self |
132+
| declarations.swift:82:7:82:7 | settableField |
133+
| declarations.swift:83:5:83:5 | newValue |
134+
| declarations.swift:83:5:83:5 | self |
135+
| declarations.swift:83:5:83:11 | set |
136+
| declarations.swift:84:5:84:5 | self |
137+
| declarations.swift:84:5:86:5 | get |
138+
| declarations.swift:91:3:93:3 | var ... = ... |
139+
| declarations.swift:91:7:91:7 | readOnlyField1 |
140+
| declarations.swift:91:27:91:27 | self |
141+
| declarations.swift:91:27:93:3 | get |
142+
| declarations.swift:96:3:100:3 | var ... = ... |
143+
| declarations.swift:96:7:96:7 | readOnlyField2 |
144+
| declarations.swift:97:5:97:5 | self |
145+
| declarations.swift:97:5:99:5 | get |
146+
| declarations.swift:102:3:102:21 | var ... = ... |
147+
| declarations.swift:102:7:102:7 | (unnamed function decl) |
148+
| declarations.swift:102:7:102:7 | get |
149+
| declarations.swift:102:7:102:7 | normalField |
150+
| declarations.swift:102:7:102:7 | self |
151+
| declarations.swift:102:7:102:7 | self |
152+
| declarations.swift:102:7:102:7 | self |
153+
| declarations.swift:102:7:102:7 | set |
154+
| declarations.swift:102:7:102:7 | value |
155+
| declarations.swift:104:3:104:3 | (unnamed function decl) |
156+
| declarations.swift:104:3:104:3 | self |
157+
| declarations.swift:104:3:109:3 | subscript ... |
158+
| declarations.swift:104:13:104:13 | x |
159+
| declarations.swift:104:13:104:13 | x |
160+
| declarations.swift:104:13:104:16 | x |
161+
| declarations.swift:105:5:105:5 | self |
162+
| declarations.swift:105:5:107:5 | get |
163+
| declarations.swift:108:5:108:5 | newValue |
164+
| declarations.swift:108:5:108:5 | self |
165+
| declarations.swift:108:5:108:11 | set |
166+
| declarations.swift:111:3:113:3 | subscript ... |
167+
| declarations.swift:111:13:111:13 | x |
168+
| declarations.swift:111:13:111:16 | x |
169+
| declarations.swift:111:21:111:21 | y |
170+
| declarations.swift:111:21:111:25 | y |
171+
| declarations.swift:111:37:111:37 | self |
172+
| declarations.swift:111:37:113:3 | get |
173+
| declarations.swift:115:3:117:3 | var ... = ... |
174+
| declarations.swift:115:7:115:7 | (unnamed function decl) |
175+
| declarations.swift:115:7:115:7 | get |
176+
| declarations.swift:115:7:115:7 | hasWillSet1 |
177+
| declarations.swift:115:7:115:7 | self |
178+
| declarations.swift:115:7:115:7 | self |
179+
| declarations.swift:115:7:115:7 | self |
180+
| declarations.swift:115:7:115:7 | set |
181+
| declarations.swift:115:7:115:7 | value |
182+
| declarations.swift:116:5:116:5 | self |
183+
| declarations.swift:116:5:116:25 | willSet |
184+
| declarations.swift:116:13:116:13 | newValue |
181185
| declarations.swift:119:3:121:3 | var ... = ... |
182186
| declarations.swift:119:7:119:7 | (unnamed function decl) |
183187
| declarations.swift:119:7:119:7 | get |
184-
| declarations.swift:119:7:119:7 | hasWillSet1 |
188+
| declarations.swift:119:7:119:7 | hasWillSet2 |
185189
| declarations.swift:119:7:119:7 | self |
186190
| declarations.swift:119:7:119:7 | self |
187191
| declarations.swift:119:7:119:7 | self |
188192
| declarations.swift:119:7:119:7 | set |
189193
| declarations.swift:119:7:119:7 | value |
194+
| declarations.swift:120:5:120:5 | newValue |
190195
| declarations.swift:120:5:120:5 | self |
191-
| declarations.swift:120:5:120:25 | willSet |
192-
| declarations.swift:120:13:120:13 | newValue |
196+
| declarations.swift:120:5:120:15 | willSet |
193197
| declarations.swift:123:3:125:3 | var ... = ... |
194198
| declarations.swift:123:7:123:7 | (unnamed function decl) |
195199
| declarations.swift:123:7:123:7 | get |
196-
| declarations.swift:123:7:123:7 | hasWillSet2 |
200+
| declarations.swift:123:7:123:7 | hasDidSet1 |
197201
| declarations.swift:123:7:123:7 | self |
198202
| declarations.swift:123:7:123:7 | self |
199203
| declarations.swift:123:7:123:7 | self |
200204
| declarations.swift:123:7:123:7 | set |
201205
| declarations.swift:123:7:123:7 | value |
202-
| declarations.swift:124:5:124:5 | newValue |
203206
| declarations.swift:124:5:124:5 | self |
204-
| declarations.swift:124:5:124:15 | willSet |
207+
| declarations.swift:124:5:124:24 | didSet |
208+
| declarations.swift:124:12:124:12 | oldValue |
205209
| declarations.swift:127:3:129:3 | var ... = ... |
206210
| declarations.swift:127:7:127:7 | (unnamed function decl) |
207211
| declarations.swift:127:7:127:7 | get |
208-
| declarations.swift:127:7:127:7 | hasDidSet1 |
212+
| declarations.swift:127:7:127:7 | hasDidSet2 |
209213
| declarations.swift:127:7:127:7 | self |
210214
| declarations.swift:127:7:127:7 | self |
211215
| declarations.swift:127:7:127:7 | self |
212216
| declarations.swift:127:7:127:7 | set |
213217
| declarations.swift:127:7:127:7 | value |
214218
| declarations.swift:128:5:128:5 | self |
215-
| declarations.swift:128:5:128:24 | didSet |
216-
| declarations.swift:128:12:128:12 | oldValue |
217-
| declarations.swift:131:3:133:3 | var ... = ... |
219+
| declarations.swift:128:5:128:14 | didSet |
220+
| declarations.swift:131:3:135:3 | var ... = ... |
218221
| declarations.swift:131:7:131:7 | (unnamed function decl) |
219222
| declarations.swift:131:7:131:7 | get |
220-
| declarations.swift:131:7:131:7 | hasDidSet2 |
223+
| declarations.swift:131:7:131:7 | hasBoth |
221224
| declarations.swift:131:7:131:7 | self |
222225
| declarations.swift:131:7:131:7 | self |
223226
| declarations.swift:131:7:131:7 | self |
224227
| declarations.swift:131:7:131:7 | set |
225228
| declarations.swift:131:7:131:7 | value |
229+
| declarations.swift:132:5:132:5 | newValue |
226230
| declarations.swift:132:5:132:5 | self |
227-
| declarations.swift:132:5:132:14 | didSet |
228-
| declarations.swift:135:3:139:3 | var ... = ... |
229-
| declarations.swift:135:7:135:7 | (unnamed function decl) |
230-
| declarations.swift:135:7:135:7 | get |
231-
| declarations.swift:135:7:135:7 | hasBoth |
232-
| declarations.swift:135:7:135:7 | self |
233-
| declarations.swift:135:7:135:7 | self |
234-
| declarations.swift:135:7:135:7 | self |
235-
| declarations.swift:135:7:135:7 | set |
236-
| declarations.swift:135:7:135:7 | value |
237-
| declarations.swift:136:5:136:5 | newValue |
238-
| declarations.swift:136:5:136:5 | self |
239-
| declarations.swift:136:5:136:15 | willSet |
240-
| declarations.swift:138:5:138:5 | self |
241-
| declarations.swift:138:5:138:14 | didSet |
242-
| declarations.swift:142:1:146:1 | extension |
243-
| declarations.swift:143:3:145:3 | id() |
244-
| declarations.swift:143:8:143:8 | self |
245-
| declarations.swift:148:1:148:7 | { ... } |
246-
| declarations.swift:150:1:152:1 | GenericClass |
247-
| declarations.swift:150:7:150:7 | deinit() |
248-
| declarations.swift:150:7:150:7 | init() |
249-
| declarations.swift:150:7:150:7 | self |
250-
| declarations.swift:150:7:150:7 | self |
251-
| declarations.swift:150:20:150:20 | A |
252-
| declarations.swift:150:23:150:26 | B |
253-
| declarations.swift:150:31:150:34 | C |
254-
| declarations.swift:151:3:151:41 | genericMethod(_:_:_:) |
255-
| declarations.swift:151:8:151:8 | self |
256-
| declarations.swift:151:22:151:25 | _ |
257-
| declarations.swift:151:28:151:31 | _ |
258-
| declarations.swift:151:34:151:37 | _ |
259-
| declarations.swift:154:1:154:63 | genericFunc(_:_:_:) |
260-
| declarations.swift:154:18:154:18 | A |
261-
| declarations.swift:154:21:154:24 | B |
262-
| declarations.swift:154:29:154:32 | C |
263-
| declarations.swift:154:44:154:47 | _ |
264-
| declarations.swift:154:50:154:53 | _ |
265-
| declarations.swift:154:56:154:59 | _ |
231+
| declarations.swift:132:5:132:15 | willSet |
232+
| declarations.swift:134:5:134:5 | self |
233+
| declarations.swift:134:5:134:14 | didSet |
234+
| declarations.swift:138:1:142:1 | extension |
235+
| declarations.swift:139:3:141:3 | id() |
236+
| declarations.swift:139:8:139:8 | self |
237+
| declarations.swift:144:1:144:7 | { ... } |
238+
| declarations.swift:146:1:148:1 | GenericClass |
239+
| declarations.swift:146:7:146:7 | deinit() |
240+
| declarations.swift:146:7:146:7 | init() |
241+
| declarations.swift:146:7:146:7 | self |
242+
| declarations.swift:146:7:146:7 | self |
243+
| declarations.swift:146:20:146:20 | A |
244+
| declarations.swift:146:23:146:26 | B |
245+
| declarations.swift:146:31:146:34 | C |
246+
| declarations.swift:147:3:147:41 | genericMethod(_:_:_:) |
247+
| declarations.swift:147:8:147:8 | self |
248+
| declarations.swift:147:22:147:25 | _ |
249+
| declarations.swift:147:28:147:31 | _ |
250+
| declarations.swift:147:34:147:37 | _ |
251+
| declarations.swift:150:1:150:63 | genericFunc(_:_:_:) |
252+
| declarations.swift:150:18:150:18 | A |
253+
| declarations.swift:150:21:150:24 | B |
254+
| declarations.swift:150:29:150:32 | C |
255+
| declarations.swift:150:44:150:47 | _ |
256+
| declarations.swift:150:50:150:53 | _ |
257+
| declarations.swift:150:56:150:59 | _ |
258+
| declarations.swift:152:1:152:22 | Derived |
259+
| declarations.swift:152:7:152:7 | deinit() |
260+
| declarations.swift:152:7:152:7 | self |
261+
| declarations.swift:152:21:152:21 | init() |
262+
| declarations.swift:152:21:152:21 | self |
263+
| declarations.swift:155:1:155:28 | var ... = ... |
264+
| declarations.swift:155:1:155:28 | { ... } |
265+
| declarations.swift:155:5:155:5 | d |

swift/ql/test/extractor-tests/declarations/declarations.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ class Baz {
5252
}
5353
}
5454

55-
class Derived : Baz {}
56-
57-
var d: Baz? = Derived() as Baz
58-
5955
prefix operator +-
6056

6157
precedencegroup NewPrecedence {
@@ -152,3 +148,8 @@ class GenericClass<A, B: Baz, C: MyProtocol> {
152148
}
153149

154150
func genericFunc<A, B: Baz, C: MyProtocol>(_: A, _: B, _: C) {}
151+
152+
class Derived : Baz {}
153+
154+
// multiple conversions
155+
var d: Baz? = Derived() as Baz

0 commit comments

Comments
 (0)