@@ -71,13 +71,13 @@ struct SymbolQueries:UnidocDatabaseTestBattery
71
71
/// We should be able to resolve the ``Dictionary.Keys`` type without hashes.
72
72
if let tests: TestGroup = tests / " Dictionary " / " Keys "
73
73
{
74
- let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > = . init(
74
+ let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent > = . init(
75
75
" swift " , [ " swift " , " dictionary " , " keys " ] )
76
76
await tests. do
77
77
{
78
78
79
- if let output: Unidoc . VertexOutput < Any > = tests. expect (
80
- value: try await unidoc . execute ( query: query , with: session ) ) ,
79
+ if let output: Unidoc . VertexOutput = tests. expect (
80
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
81
81
let vertex: Unidoc . Vertex . Decl = tests. expect (
82
82
value: output. principal? . vertex? . decl)
83
83
{
@@ -89,13 +89,13 @@ struct SymbolQueries:UnidocDatabaseTestBattery
89
89
/// We should be able to get multiple results back for an ambiguous query.
90
90
if let tests: TestGroup = tests / " Int " / " init "
91
91
{
92
- let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > = . init(
92
+ let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent > = . init(
93
93
" swift " , [ " swift " , " int.init(_:) " ] )
94
94
await tests. do
95
95
{
96
96
97
- if let output: Unidoc . VertexOutput < Any > = tests. expect (
98
- value: try await unidoc . execute ( query: query , with: session ) ) ,
97
+ if let output: Unidoc . VertexOutput = tests. expect (
98
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
99
99
let principal: Unidoc . PrincipalOutput = tests. expect (
100
100
value: output. principal) ,
101
101
tests. expect ( principal. matches. count >? 1 ) ,
@@ -108,14 +108,14 @@ struct SymbolQueries:UnidocDatabaseTestBattery
108
108
/// We should be able to disambiguate the previous query with an FNV-1 hash.
109
109
if let tests: TestGroup = tests / " Int " / " init " / " hashed "
110
110
{
111
- let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > = . init(
111
+ let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent > = . init(
112
112
" swift " , [ " swift " , " int.init(_:) " ] ,
113
113
hash: . init( " 8VBWO " ) )
114
114
await tests. do
115
115
{
116
116
117
- if let output: Unidoc . VertexOutput < Any > = tests. expect (
118
- value: try await unidoc . execute ( query: query , with: session ) ) ,
117
+ if let output: Unidoc . VertexOutput = tests. expect (
118
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
119
119
let principal: Unidoc . PrincipalOutput = tests. expect (
120
120
value: output. principal) ,
121
121
let _: Unidoc . Vertex = tests. expect ( value: principal. vertex)
@@ -134,7 +134,7 @@ struct SymbolQueries:UnidocDatabaseTestBattery
134
134
await tests. do
135
135
{
136
136
if let output: Unidoc . RedirectOutput = tests. expect (
137
- value: try await unidoc . execute ( query: query , with: session ) ) ,
137
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
138
138
let vertex: Unidoc . Vertex . Decl = tests. expect (
139
139
value: output. matches. first? . decl)
140
140
{
@@ -145,7 +145,7 @@ struct SymbolQueries:UnidocDatabaseTestBattery
145
145
146
146
if let tests: TestGroup = tests / " Parentheses "
147
147
{
148
- for (name, query) : ( String , Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > ) in
148
+ for (name, query) : ( String , Unidoc . VertexQuery < Unidoc . LookupAdjacent > ) in
149
149
[
150
150
(
151
151
" None " ,
@@ -159,16 +159,16 @@ struct SymbolQueries:UnidocDatabaseTestBattery
159
159
{
160
160
guard
161
161
let tests: TestGroup = tests / name,
162
- let query: Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > = tests. expect (
162
+ let query: Unidoc . VertexQuery < Unidoc . LookupAdjacent > = tests. expect (
163
163
value: query)
164
164
else
165
165
{
166
166
continue
167
167
}
168
168
await tests. do
169
169
{
170
- if let output: Unidoc . VertexOutput < Any > = tests. expect (
171
- value: try await unidoc . execute ( query: query , with: session ) ) ,
170
+ if let output: Unidoc . VertexOutput = tests. expect (
171
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
172
172
let _: Unidoc . Vertex = tests. expect ( value: output. principal? . vertex)
173
173
{
174
174
}
@@ -178,12 +178,12 @@ struct SymbolQueries:UnidocDatabaseTestBattery
178
178
179
179
if let tests: TestGroup = tests / " BarbieCore "
180
180
{
181
- let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > = . init(
181
+ let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent > = . init(
182
182
" swift-malibu " , [ " barbiecore " ] )
183
183
await tests. do
184
184
{
185
- if let output: Unidoc . VertexOutput < Any > = tests. expect (
186
- value: try await unidoc . execute ( query: query , with: session ) ) ,
185
+ if let output: Unidoc . VertexOutput = tests. expect (
186
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
187
187
let vertex: Unidoc . Vertex . Culture = tests. expect (
188
188
value: output. principal? . vertex? . culture) ,
189
189
let tree: Unidoc . TypeTree = tests. expect (
@@ -208,12 +208,12 @@ struct SymbolQueries:UnidocDatabaseTestBattery
208
208
/// namespace.
209
209
if let tests: TestGroup = tests / " Barbie " / " Dreamhouse "
210
210
{
211
- let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > = . init(
211
+ let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent > = . init(
212
212
" swift-malibu " , [ " barbiecore " , " barbie " , " dreamhouse " ] )
213
213
await tests. do
214
214
{
215
- if let output: Unidoc . VertexOutput < Any > = tests. expect (
216
- value: try await unidoc . execute ( query: query , with: session ) ) ,
215
+ if let output: Unidoc . VertexOutput = tests. expect (
216
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
217
217
let vertex: Unidoc . Vertex = tests. expect (
218
218
value: output. principal? . vertex) ,
219
219
let tree: Unidoc . TypeTree = tests. expect (
@@ -274,13 +274,13 @@ struct SymbolQueries:UnidocDatabaseTestBattery
274
274
/// into a hyphen.
275
275
if let tests: TestGroup = tests / " Barbie " / " GettingStarted "
276
276
{
277
- let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent , Any > = . init(
277
+ let query : Unidoc . VertexQuery < Unidoc . LookupAdjacent > = . init(
278
278
" swift-malibu " , [ " barbiecore " , " getting-started " ] )
279
279
await tests. do
280
280
{
281
281
282
- if let output: Unidoc . VertexOutput < Any > = tests. expect (
283
- value: try await unidoc . execute ( query: query , with: session ) ) ,
282
+ if let output: Unidoc . VertexOutput = tests. expect (
283
+ value: try await session . query ( database : unidoc . id , with: query ) ) ,
284
284
let _: Unidoc . Vertex = tests. expect (
285
285
value: output. principal? . vertex)
286
286
{
0 commit comments