小编Gus*_*avo的帖子

在 Xcode 9.3 中测试 macOS 命令行项目时出现“架构 x86_64 的未定义符号”

我正在为 macOS 开发命令行应用程序,但遇到以下问题:我在 Xcode 中有以下测试用例

import XCTest
@testable import Assembler

class ParserTests: XCTestCase {

override func setUp() {
    super.setUp()
}

override func tearDown() {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    super.tearDown()
}

func test_commandType_returnRightTypeForAcommands() {
    let parser = Parser()

    // Invocation
    let commandType = "A_COMMAND"

    // Assertion
    XCTAssertEqual(commandType, "A_COMMAND")
}

}
Run Code Online (Sandbox Code Playgroud)

这是Parser班级:

import Foundation

class Parser {

    func commandType(for command: String) -> String {
        return …
Run Code Online (Sandbox Code Playgroud)

macos xcode swift swift4 xcode9.3

5
推荐指数
0
解决办法
340
查看次数

标签 统计

macos ×1

swift ×1

swift4 ×1

xcode ×1

xcode9.3 ×1