mirror of
https://github.com/Smaug123/WoofWare.Expect
synced 2025-10-07 05:28:40 +00:00
Compare commits
1 Commits
WoofWare.E
...
WoofWare.E
Author | SHA1 | Date | |
---|---|---|---|
|
6d9dbc59db |
@@ -205,9 +205,15 @@ module internal AstWalker =
|
||||
| ParsedInput.SigFile _ -> failwith "unexpected: signature files can't contain expressions"
|
||||
|
||||
// Find the closest match
|
||||
results
|
||||
|> Seq.filter (fun loc ->
|
||||
loc.KeywordRange.StartLine <= lineNumber
|
||||
&& lineNumber <= loc.KeywordRange.EndLine
|
||||
)
|
||||
|> Seq.exactlyOne
|
||||
let matches =
|
||||
results
|
||||
|> List.filter (fun loc ->
|
||||
loc.KeywordRange.StartLine <= lineNumber
|
||||
&& lineNumber <= loc.KeywordRange.EndLine
|
||||
)
|
||||
|
||||
match matches with
|
||||
| [] ->
|
||||
failwith
|
||||
$"Unexpectedly failed to locate snapshot keyword %s{methodName} at line %i{lineNumber} of file %s{infoFilePath}. Please report this along with the contents of the file."
|
||||
| m :: _ -> m
|
||||
|
Reference in New Issue
Block a user