             if let root = root {
                 XCTAssertEqual(module.sources.root, AbsolutePath(root), file: file, line: line)
             }
-            var sources = self.sources
-
-            for path in paths.lazy.map(RelativePath.init) {
-                let contains = sources.contains(path)
-                XCTAssert(contains, "\(path) not found in module \(module.name)", file: file, line: line)
-                if contains {
-                    sources.remove(path)
-                }
-            }
-
-            guard sources.isEmpty else {
-                return XCTFail("Unchecked sources in package \(self): \(sources)", file: file, line: line)
-            }
+            let sources = Set(self.module.sources.relativePaths.map{$0.asString})
+            XCTAssertEqual(sources, Set(paths), "unexpected source files in \(module.name)", file: file, line: line)
         }
 
         func checkSources(root: String? = nil, paths: String..., file: StaticString = #file, line: UInt = #line) {

        }

        func check(dependencies depsToCheck: [String], file: StaticString = #file, line: UInt = #line) {
            let dependencies = Set(module.dependencies.map{$0.name})
            var uncheckedDeps = dependencies

            for depToCheck in depsToCheck {
                let contains = dependencies.contains(depToCheck)
                XCTAssert(contains, "\(depToCheck) dependency not found in \(module.name)", file: file, line: line)
                if contains {
                    uncheckedDeps.remove(depToCheck)
                }
            }

            guard uncheckedDeps.isEmpty else {
                return XCTFail("Unchecked dependencies in \(self)'s module '\(module.name)':  \(uncheckedDeps)", file: file, line: line)
            }
        }

        func check(recursiveDependencies: [String], file: StaticString = #file, line: UInt = #line) {


    final class ModuleResult {
        private let module: Module

        fileprivate init(_ module: Module) {
            self.module = module
