INNER CODE UNIT · Swift

processLine

mongodb/mongo-swift-driver · etc/convert-test-results.swift:168

    mutating func processLine(_ line: String) throws {
        let fullRange = NSRange(line.startIndex..<line.endIndex, in: line)

        if let match = Self.testCaseStartedRegex.firstMatch(in: line, range: fullRange) {
            try self.processTestCaseStart(line: line, regexResult: match)
        } else if let match = Self.testCaseStatusRegex.firstMatch(in: line, range: fullRange) {
            try self.processTestCaseStatus(line: line, regexResult: match)
        } else if let match = Self.testSuiteStartedRegex.firstMatch(in: line, range: fullRange) {
            try self.processSuiteStart(line: line, regexResult: match)
        } else if let match = Self.testSuiteStatusRegex.firstMatch(in: line, range: fullRange) {
            try self.processSuiteStatus(line: line, regexResult: match)
        } else if let match = Self.testSuiteDetailsRegex.firstMatch(in: line, range: fullRange) {
            try self.processSuiteDetails(line: line, regexResult: match)
        } else {
            self.processOtherOutput(line)
        }
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…