@@ -237,7 +237,7 @@ public func __checkEscapedCondition(
237237 sourceLocation: SourceLocation
238238) -> Result < Void , any Error > {
239239 var expectationContext = __ExpectationContext ( )
240- expectationContext. sourceCode [ " " ] = sourceCode
240+ expectationContext. sourceCode [ . root ] = sourceCode
241241
242242 return check (
243243 condition,
@@ -266,7 +266,7 @@ public func __checkEscapedCondition<T>(
266266 sourceLocation: SourceLocation
267267) -> Result < T , any Error > where T: ~ Copyable {
268268 var expectationContext = __ExpectationContext ( )
269- expectationContext. sourceCode [ " " ] = sourceCode
269+ expectationContext. sourceCode [ . root ] = sourceCode
270270
271271 let result = check (
272272 optionalValue != nil ,
@@ -393,7 +393,7 @@ public func __checkClosureCall(
393393 }
394394
395395 var expectationContext = __ExpectationContext ( )
396- expectationContext. sourceCode [ " " ] = sourceCode
396+ expectationContext. sourceCode [ . root ] = sourceCode
397397 return check (
398398 success,
399399 expectationContext: expectationContext,
@@ -433,7 +433,7 @@ public func __checkClosureCall(
433433 }
434434
435435 var expectationContext = __ExpectationContext ( )
436- expectationContext. sourceCode [ " " ] = sourceCode
436+ expectationContext. sourceCode [ . root ] = sourceCode
437437 return check (
438438 success,
439439 expectationContext: expectationContext,
@@ -519,7 +519,7 @@ public func __checkClosureCall<R>(
519519 sourceLocation: SourceLocation
520520) -> Result < Void , any Error > {
521521 var expectationContext = __ExpectationContext ( )
522- expectationContext. sourceCode [ " " ] = sourceCode
522+ expectationContext. sourceCode [ . root ] = sourceCode
523523
524524 var errorMatches = false
525525 var mismatchExplanationValue : String ? = nil
@@ -532,7 +532,7 @@ public func __checkClosureCall<R>(
532532 }
533533 mismatchExplanationValue = explanation
534534 } catch {
535- expectationContext. runtimeValues [ " " ] = { Expression . Value ( reflecting: error) }
535+ expectationContext. runtimeValues [ . root ] = { Expression . Value ( reflecting: error) }
536536 let secondError = Issue . withErrorRecording ( at: sourceLocation) {
537537 errorMatches = try errorMatcher ( error)
538538 }
@@ -571,7 +571,7 @@ public func __checkClosureCall<R>(
571571 sourceLocation: SourceLocation
572572) async -> Result < Void , any Error > {
573573 var expectationContext = __ExpectationContext ( )
574- expectationContext. sourceCode [ " " ] = sourceCode
574+ expectationContext. sourceCode [ . root ] = sourceCode
575575
576576 var errorMatches = false
577577 var mismatchExplanationValue : String ? = nil
@@ -584,7 +584,7 @@ public func __checkClosureCall<R>(
584584 }
585585 mismatchExplanationValue = explanation
586586 } catch {
587- expectationContext. runtimeValues [ " " ] = { Expression . Value ( reflecting: error) }
587+ expectationContext. runtimeValues [ . root ] = { Expression . Value ( reflecting: error) }
588588 let secondError = await Issue . withErrorRecording ( at: sourceLocation) {
589589 errorMatches = try await errorMatcher ( error)
590590 }
0 commit comments