Skip to content

Commit

Permalink
Update test case to drop swift 3.1 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
ainopara committed Nov 25, 2017
1 parent 7740983 commit 05e45a8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 129 deletions.
55 changes: 0 additions & 55 deletions Tests/SourceKittenFrameworkTests/Fixtures/[email protected]

This file was deleted.

55 changes: 0 additions & 55 deletions Tests/SourceKittenFrameworkTests/Fixtures/[email protected]

This file was deleted.

21 changes: 2 additions & 19 deletions Tests/SourceKittenFrameworkTests/RequestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ import SourceKittenFramework
import XCTest

class RequestTests: XCTestCase {
func testProtocolVersion() {
let version = Request.protocolVersion().send()
compareJSONString(withFixtureNamed: "ProtocolVersion", jsonString: toJSON(toNSDictionary(version)))
}

func testSwiftModuleGroups() {
let groups = Request.moduleGroups(module: "Swift", arguments: ["-sdk", sdkPath()]).send()
compareJSONString(withFixtureNamed: "SwiftModuleGroups", jsonString: toJSON(toNSDictionary(groups)))
Expand All @@ -29,7 +24,6 @@ class RequestTests: XCTestCase {
"_T021SourceKittenFramework7RequestOD",
"_T0s10DictionaryVySS9Structure22SourceKitRepresentable_pGD"
]
#if swift(>=3.2)
let expectedResult: NSDictionary = [
"key.results": [
["key.name": "Swift.String"],
Expand All @@ -39,17 +33,7 @@ class RequestTests: XCTestCase {
["key.name": "Swift.Dictionary<Swift.String, Structure.SourceKitRepresentable>"]
]
]
#else
let expectedResult: NSDictionary = [
"key.results": [
["key.name": "Swift.String"],
["key.name": "__C.NSRange with unmangled suffix \"mD\""],
["key.name": "__ObjC.Process"],
["key.name": "SourceKittenFramework.Request"],
["key.name": "Swift.Dictionary<Swift.String, Structure.SourceKitRepresentable>"]
]
]
#endif

let result = Request.demangle(names: mangledNames).send()
XCTAssertEqual(toNSDictionary(result), expectedResult, "should demange names.")
}
Expand All @@ -58,7 +42,7 @@ class RequestTests: XCTestCase {
let result = Request.editorOpenInterface(
name: UUID().uuidString,
moduleName: "Swift",
group: .name("Assert"), // Choose a relative small group.
group: .name("Assert"), // Choose a relatively small group.
synthesizedExtension: true,
arguments: ["-sdk", sdkPath()]
).send()
Expand All @@ -69,7 +53,6 @@ class RequestTests: XCTestCase {
extension RequestTests {
static var allTests: [(String, (RequestTests) -> () throws -> Void)] {
return [
("testProtocolVersion", testProtocolVersion),
("testSwiftModuleGroups", testSwiftModuleGroups),
("testEditorOpenInterface", testEditorOpenInterface)
]
Expand Down

0 comments on commit 05e45a8

Please sign in to comment.