                                        lineNumber: lineNum + 1) else {
         continue
       }
-      expectations.insert(exp)
+      expectations.append(exp)
     }
     return expectations
   }

  /// provided token stream. This provides the set of expectations that the
  /// real diagnostics will be verified against.
  private static func parseExpectations(
    url: URL, engine: DiagnosticEngine) -> Set<Expectation> {
    var expectations = Set<Expectation>()
    guard let input = try? String(contentsOf: url, encoding: .utf8) else {
      engine.diagnose(.couldNotReadInput(url))
      return []

  }

  /// The set of expected-{severity} comments in the file.
  let expectations: [Expectation]

  /// The set of diagnostics that have been parsed.
  let producedDiagnostics: [(message: Diagnostic.Message, node: Syntax?)]
