Skip to content
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

Remove obsolete Syntax #812

Merged
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
let flip = { (tuple: (String, String, String)) -> (String, String, String) in
typealias RotationClosure = @Sendable ((String, String, String)) -> (String, String, String)

let flip: RotationClosure = { (tuple: (String, String, String)) -> (String, String, String) in
let (a, b, c) = tuple
return (b, a, c)
}

let rotate = { (tuple: (String, String, String)) -> (String, String, String) in
let rotate: RotationClosure = { (tuple: (String, String, String)) -> (String, String, String) in
let (a, b, c) = tuple
return (b, c, a)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,4 @@ final class BombDefuserTests: XCTestCase {
stringify(expected), stringify(got),
"shuffle(0, (\"Brown\", \"Orange\", \"White\")): Expected \(expected), got \(got)")
}

static var allTests = [
("testFlip", testFlip),
("testRotate", testRotate),
("testShuffle1", testShuffle1),
("testShuffle2", testShuffle2),
("testShuffle3", testShuffle3),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/bomb-defuser/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,4 @@ final class HighScoreBoardTests: XCTestCase {
"Expected: \(expected)\nGot: \(got)\norderByPlayers should return the key/value pairs odered ascending by the player's score."
)
}

static var allTests = [
("testEmptyScores", testEmptyScores),
("testAddPlayerExplicit", testAddPlayerExplicit),
("testAddPlayerDefault", testAddPlayerDefault),
("testRemovePlayer", testRemovePlayer),
("testRemoveNonexistentPlayer", testRemoveNonexistentPlayer),
("testResetScore", testResetScore),
("testUpdateScore", testUpdateScore),
("testOrderByPlayers", testOrderByPlayers),
("testOrderByScores", testOrderByScores),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/high-score-board/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,4 @@ final class LasagnaMasterTests: XCTestCase {
layers: "sauce", "noodles", "béchamel", "meat", "mozzarella", "noodles", "sauce", "ricotta",
"eggplant", "mozzarella", "béchamel", "noodles", "meat", "sauce", "mozzarella"))
}

static var allTests = [
("testRemainingMinutesExplicit", testRemainingMinutesExplicit),
("testRemainingMinutesDefault", testRemainingMinutesDefault),
("testPreparationTime", testPreparationTime),
("testPreparationTimeEmpty", testPreparationTimeEmpty),
("testQuantities", testQuantities),
("testQuantitiesNoSauce", testQuantitiesNoSauce),
("testQuantitiesNoNoodles", testQuantitiesNoNoodles),
("testToOz", testToOz),
("testRedWineRedInequalLayerCount", testRedWineRedInequalLayerCount),
("testRedWineRedEqualLayerCount", testRedWineRedEqualLayerCount),
("testRedWineWhite", testRedWineWhite),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/lasagna-master/Tests/LinuxMain.swift

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/log-lines/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,4 @@ final class LogLinesTests: XCTestCase {
let message = "Wha happon?"
XCTAssertEqual(LogLevel.unknown.shortFormat(message: message), "42:Wha happon?")
}

static var allTests = [
("testInitTrace", testInitTrace),
("testInitDebug", testInitDebug),
("testInitInfo", testInitInfo),
("testInitWarning", testInitWarning),
("testInitError", testInitError),
("testInitFatal", testInitFatal),
("testInitUnknownEmpty", testInitUnknownEmpty),
("testInitUnknownNonStandard", testInitUnknownNonStandard),
("testShortTrace", testShortTrace),
("testShortDebug", testShortDebug),
("testShortInfo", testShortInfo),
("testShortWarning", testShortWarning),
("testShortError", testShortError),
("testShortFatal", testShortFatal),
("testShortUnknownEmpty", testShortUnknownEmpty),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/magician-in-training/Tests/LinuxMain.swift

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/master-mixologist/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,4 @@ final class MasterMixologistTests: XCTestCase {
checkTest(e: expectedBeers, g: got.beer) && checkTest(e: expectedSodas, g: got.soda),
"Expected (beer: nil, soda: nil), got: \(got)")
}

static var allTests = [
("testTimeToPrepare", testTimeToPrepare),
("testMakeWedges", testMakeWedges),
("testMakeWedgesNoNeed", testMakeWedgesNoNeed),
("testMakeWedgesNoLimes", testMakeWedgesNoLimes),
("testMakeWedgesTooFewLimes", testMakeWedgesTooFewLimes),
("testFinishShift", testFinishShift),
("testFinishShiftJustRunOver", testFinishShiftJustRunOver),
("testFinishShiftLeaveEarly", testFinishShiftLeaveEarly),
("testOrderTracker", testOrderTracker),
("testOrderOneEach", testOrderOneEach),
("testOrderTrackerNoBeer", testOrderTrackerNoBeer),
("testOrderTrackerNoSoda", testOrderTrackerNoSoda),
("testOrderTrackerNils", testOrderTrackerNils),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/pizza-slices/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,4 @@ final class PizzaSlicesTests: XCTestCase {
let biggest = biggestSlice(diameterA: "0", slicesA: "8", diameterB: "16 inches", slicesB: "8")
XCTAssertEqual(biggest, "Slice A is bigger")
}

static var allTests = [
("testSliceNormal", testSliceNormal),
("testSliceNilDiameter", testSliceNilDiameter),
("testSliceNilSlices", testSliceNilSlices),
("testSliceBadDiameter", testSliceBadDiameter),
("testSliceBadSlices", testSliceBadSlices),
("testABiggest", testABiggest),
("testBBiggest", testBBiggest),
("testBothSame", testBothSame),
("testANil", testANil),
("testBNil", testBNil),
("testBothNil", testBothNil),
("testZeroIsValid", testZeroIsValid),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/poetry-club/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,4 @@ final class PoetryClubTests: XCTestCase {
try XCTSkipIf(true && !runAll) // change true to false to run this test
XCTAssertEqual(secretRoomPassword("Open Sesame"), "OPEN SESAME!")
}

static var allTests = [
("testSplitNewlines", testSplitNewlines),
("testSplitNoNewlines", testSplitNoNewlines),
("testFirstLetter", testFirstLetter),
("testFirstLetterEmpty", testFirstLetterEmpty),
("testCapitalize", testCapitalize),
("testTrimWithWhitespace", testTrimWithWhitespace),
("testTrimWithoutWhitespace", testTrimWithoutWhitespace),
("testLastLetter", testLastLetter),
("testLastLetterEmpty", testLastLetterEmpty),
("testBackdoorPassword", testBackdoorPassword),
("testIthLetter", testIthLetter),
("testIthLetterInvalid", testIthLetterInvalid),
("testSecretRoomPassword", testSecretRoomPassword),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/santas-helper/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,4 @@ final class SantasHelperTests: XCTestCase {
&& actual.recipients == recipients
)
}
static var allTests = [
("testCartesianToPolar", testCartesianToPolar),
("testCartesianToPolarQ3", testCartesianToPolarQ3),
("testCombineRecords", testCombineRecords),
]
}

This file was deleted.

6 changes: 0 additions & 6 deletions exercises/concept/secret-agent/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,4 @@ final class SecretAgentTests: XCTestCase {
})
XCTAssertTrue(combo == (234, 91, 148))
}

static var allTests = [
("testPasswordSuccess", testPasswordSuccess),
("testPasswordFail", testPasswordFail),
("testCombination1", testCombination1),
("testCombination2", testCombination2),
]
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct Size {
}
}

class Window {
class Window: @unchecked Sendable {
var title = "New Window"
let screenSize = Size(width: 800, height: 600)
var size = Size()
Expand Down
6 changes: 0 additions & 6 deletions exercises/concept/windowing-system/Tests/LinuxMain.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,4 @@ final class WindowingSystemTests: XCTestCase {
window.display(),
"New Window\nPosition: (0, 0), Size: (80 x 60)\n[This window intentionally left blank]\n")
}

static var allTests = [
("testNewWindow", testNewWindow),
("testMainWindow", testMainWindow),
("testMoveValid", testMoveValid),
("testMoveTooFar", testMoveTooFar),
("testMoveNegative", testMoveNegative),
("testResizeValid", testResizeValid),
("testResizeTooFar", testResizeTooFar),
("testResizeNegative", testResizeNegative),
("testUpdateTitle", testUpdateTitle),
("testUpdateText", testUpdateText),
("testUpdateTextNil", testUpdateTextNil),
]
}

This file was deleted.