Skip to content

Fix warnings in SandboxTests #3580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Tests/BasicsTests/SandboxTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class SandboxTest: XCTestCase {

func testNetworkNotAllowed() throws {
#if !os(macOS)
throw XCTSkip()
try XCTSkipIf(true, "test is only supported on macOS")
#endif

let command = Sandbox.apply(command: ["ping", "-t", "1", "localhost"], writableDirectories: [], strictness: .default)
Expand All @@ -38,7 +38,7 @@ final class SandboxTest: XCTestCase {

func testWritableAllowed() throws {
#if !os(macOS)
throw XCTSkip()
try XCTSkipIf(true, "test is only supported on macOS")
#endif

try withTemporaryDirectory { path in
Expand All @@ -49,7 +49,7 @@ final class SandboxTest: XCTestCase {

func testWritableNotAllowed() throws {
#if !os(macOS)
throw XCTSkip()
try XCTSkipIf(true, "test is only supported on macOS")
#endif

try withTemporaryDirectory { path in
Expand All @@ -65,7 +65,7 @@ final class SandboxTest: XCTestCase {

func testRemoveNotAllowed() throws {
#if !os(macOS)
throw XCTSkip()
try XCTSkipIf(true, "test is only supported on macOS")
#endif

try withTemporaryDirectory { path in
Expand All @@ -85,7 +85,7 @@ final class SandboxTest: XCTestCase {
// FIXME: rdar://75707545 this should not be allowed outside very specific read locations
func testReadAllowed() throws {
#if !os(macOS)
throw XCTSkip()
try XCTSkipIf(true, "test is only supported on macOS")
#endif

try withTemporaryDirectory { path in
Expand All @@ -100,7 +100,7 @@ final class SandboxTest: XCTestCase {
// FIXME: rdar://75707545 this should not be allowed outside very specific programs
func testExecuteAllowed() throws {
#if !os(macOS)
throw XCTSkip()
try XCTSkipIf(true, "test is only supported on macOS")
#endif

try withTemporaryDirectory { path in
Expand Down