mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
Add tests for PBXProductType booleans
This commit is contained in:
parent
5c90d6189c
commit
894f00428a
@ -5,4 +5,5 @@ XCTMain([
|
||||
testCase(GeneratorTests.allTests),
|
||||
testCase(SpecLoadingTests.allTests),
|
||||
testCase(FixtureTests.allTests),
|
||||
testCase(ProjectSpecTests.allTests),
|
||||
])
|
||||
|
28
Tests/XcodeGenKitTests/ProjectSpecTests.swift
Normal file
28
Tests/XcodeGenKitTests/ProjectSpecTests.swift
Normal file
@ -0,0 +1,28 @@
|
||||
import Spectre
|
||||
import XcodeGenKit
|
||||
import xcproj
|
||||
import ProjectSpec
|
||||
|
||||
func projectSpecTests() {
|
||||
|
||||
describe("ProjectSpec") {
|
||||
|
||||
let framework = Target(name: "MyFramework", type: .framework, platform: .iOS,
|
||||
settings: Settings(buildSettings: ["SETTING_2": "VALUE"]))
|
||||
let staticLibrary = Target(name: "MyStaticLibrary", type: .staticLibrary, platform: .iOS,
|
||||
settings: Settings(buildSettings: ["SETTING_2": "VALUE"]))
|
||||
let dynamicLibrary = Target(name: "MyDynamicLibrary", type: .dynamicLibrary, platform: .iOS,
|
||||
settings: Settings(buildSettings: ["SETTING_2": "VALUE"]))
|
||||
|
||||
$0.describe("Types") {
|
||||
$0.it("is a framework when it has the right extension") {
|
||||
try expect(framework.type.isFramework).to.beTrue()
|
||||
}
|
||||
|
||||
$0.it("is a library when it has the right type") {
|
||||
try expect(staticLibrary.type.isLibrary).to.beTrue()
|
||||
try expect(dynamicLibrary.type.isLibrary).to.beTrue()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -7,5 +7,6 @@ class XCodeGenKitTests: XCTestCase {
|
||||
projectGeneratorTests()
|
||||
specLoadingTests()
|
||||
fixtureTests()
|
||||
projectSpecTests()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user