(mapEntries: DebugProtocol.Variable[], entry: MapEntry, dc: DartDebugClient)
| 207 | } |
| 208 | |
| 209 | export async function ensureMapEntry(mapEntries: DebugProtocol.Variable[], entry: MapEntry, dc: DartDebugClient) { |
| 210 | assert.ok(mapEntries); |
| 211 | let found = false; |
| 212 | const keyValues: string[] = []; |
| 213 | await Promise.all(mapEntries.map(async (mapEntry) => { |
| 214 | const variable = await dc.getVariables(mapEntry.variablesReference); |
| 215 | |
| 216 | const key = variable[0]; |
| 217 | const value = variable[1]; |
| 218 | assert.ok(key, "Didn't get Key variable"); |
| 219 | assert.ok(value, "Didn't get Value variable"); |
| 220 | if (key.name === entry.key.name |
| 221 | && key.value === entry.key.value |
| 222 | && key.evaluateName === entry.key.evaluateName |
| 223 | && value.evaluateName === entry.value.evaluateName |
| 224 | && value.name === entry.value.name |
| 225 | && value.value === entry.value.value) |
| 226 | found = true; |
| 227 | keyValues.push(`${key.value}=${value.value}`); |
| 228 | })); |
| 229 | assert.ok(found, `Didn't find map entry for ${entry.key.value}=${entry.value.value}\nGot:\n ${keyValues.join("\n ")})`); |
| 230 | } |
| 231 | |
| 232 | export async function getVariablesTree(dc: DartDebugClient, variablesReference: number): Promise<string[]> { |
| 233 | let outputLines: string[] = []; |
no test coverage detected