   func parseTestTarget(yaml: Yaml) -> ParsingError? {
     let testTarget = TestTarget()
 
-    if let hasSources = yaml["sources"].array {
-      testTarget.sources = hasSources.map { (s) in
-        return s.string!
-      }
-    } else {
+    guard let sources = yaml["sources"].array else {
       return ParsingError(message: "Missing `sources` array in test target")
     }
+
+    var testTargetSources = [String]()
+    for s in sources {
+      if let s = s.string {
+        testTargetSources.append(s)
+      } else {
+        return ParsingError(message: "Invalid test target source; expected string")
+      }
+    }
+    testTarget.sources = testTargetSources
 
     if let options = yaml["compiler_options"].string {
       testCompilerOptions = options

  }

  func parseCompilerOptions(yaml: Yaml) -> ParsingError? {
    let options = yaml.string

    if options == nil {
      return ParsingError(message: "Invalid (non-string) compiler options")
    }

    self.compilerOptions = options!
    return nil
  }
  func parseLinkerOptions(yaml: Yaml) -> ParsingError? {
    if let options = yaml.string {
      self.linkerOptions = options
      return nil
    } else {
      return ParsingError(message: "Invalid (non-string) compiler options")
    }
  }



  }

  func parseSources(yaml: Yaml) -> ParsingError? {
    guard let sourcesYaml = yaml.array else {
      return ParsingError(message: "Cannot parse sources")
    }

    sources = sourcesYaml.map { (s) in
      return s.string!
    }
    return nil
  }

  func parseModules(yaml: Yaml) -> ParsingError? {
