diff --git a/Tests/SwiftAlgorithmsTests/RotateTests.swift b/Tests/SwiftAlgorithmsTests/RotateTests.swift index 01b47d0..8d369bb 100644 --- a/Tests/SwiftAlgorithmsTests/RotateTests.swift +++ b/Tests/SwiftAlgorithmsTests/RotateTests.swift @@ -10,9 +10,27 @@ //===----------------------------------------------------------------------===// import XCTest -import Algorithms +@testable import Algorithms final class RotateTests: XCTestCase { + /// Tests the example given in `_reverse(subrange:until:)`’s documentation + func testUnderscoreReverse() { + var input = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p"] + let limit: Int = 4 + let (lower, upper) = input._reverse(subrange: input.startIndex..