swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
713 stars 47 forks source link

Merge test parsing functions into one #706

Closed adam-fowler closed 4 months ago

adam-fowler commented 4 months ago

Added TestItemFinder interface to define how you get a TestItem from the test id extracted from XCTest output Added TestRegex interface which defines the regex to use when parsing the XCTest output. Merge both parseResultDarwin and parseResultNonDarwin into one function parseResult.

I will also need the TestItemFinder when supporting parallel testing

adam-fowler commented 4 months ago

They're not that different but just enough to require all this. The macOS output is more helpful as it includes the target name in the symbol name (something to do with it being Objective C based) while I only get a class and method name for Linux/Windows.

A lot of the work is related to dealing with the edge case where two targets both have a test with the same class name and method name.