From c6cd30c00f29f40572a409384384c0f6dcb7a941 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Wed, 19 Apr 2023 17:40:49 +0100 Subject: [PATCH] ToolchainRegistryTests: don't do identity check for `localFileSystem` We'd like to remove `AnyObject` requirement from `FileSystem`, which will make identity checks on `any FileSystem` impossible. These checks were an anti-pattern anyway, especially in tests, which should be flexible enough to support an arbitrary file system implementation. If certain behavior is not available on `FileSystem` we should modify that protocol instead. --- Tests/SKCoreTests/ToolchainRegistryTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/SKCoreTests/ToolchainRegistryTests.swift b/Tests/SKCoreTests/ToolchainRegistryTests.swift index 5aa94e0aa..7be2f89a8 100644 --- a/Tests/SKCoreTests/ToolchainRegistryTests.swift +++ b/Tests/SKCoreTests/ToolchainRegistryTests.swift @@ -520,7 +520,7 @@ private func makeToolchain( sourcekitdInProc: Bool = false, libIndexStore: Bool = false ) { - precondition(!clang && !swiftc && !clangd || fs === localFileSystem || !shouldChmod, + precondition(!clang && !swiftc && !clangd || !shouldChmod, "Cannot make toolchain binaries exectuable with InMemoryFileSystem") // tiny PE binary from: https://archive.is/w01DO