     }
 
     func testCompetitionClassHeader() {
-        let header = IGCHeaderField.parseHLine(hLine: competitionClassString)
+        guard let header = IGCHeaderField.parseHLine(hLine: competitionClassString) else { XCTFail("expecting a class header but got nil"); return }
         switch header {
         case .competitionClass(let cClass):
             print("competition class \(cClass)")

    // MARK: - Tests for line parsing

    func testDateHeader() {
        let dateHeader = IGCHeaderField.parseHLine(hLine: dateHeaderString)
        switch dateHeader {
        case .date(let d):
            print("date \(d)")

    }

    func testAccuracyHeader() {
        guard let accuracyHeader = IGCHeaderField.parseHLine(hLine: accuracyHeaderString) else { XCTFail("expecting a accuracy header but got nil"); return }
        switch accuracyHeader {
        case .accuracy(let acc):
            print("accuracy \(acc)")
