Initial Commit
This commit is contained in:
24
swift/hello-world/helloWorldTest/Info.plist
Normal file
24
swift/hello-world/helloWorldTest/Info.plist
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
27
swift/hello-world/helloWorldTest/helloWorldTest.swift
Normal file
27
swift/hello-world/helloWorldTest/helloWorldTest.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
import XCTest
|
||||
|
||||
// Apple Swift version 2.0
|
||||
|
||||
class HelloWorldTest: XCTestCase {
|
||||
|
||||
func testNoName(){
|
||||
let expected = "Hello, World!"
|
||||
XCTAssertEqual(HelloWorld.hello(), expected, "When given no name, we should greet the world!")
|
||||
}
|
||||
|
||||
func testSampleName(){
|
||||
let expected = "Hello, Alice!"
|
||||
XCTAssertEqual(HelloWorld.hello("Alice"), expected, "When given 'Alice' we should greet Alice!")
|
||||
}
|
||||
|
||||
func testOtherSampleName(){
|
||||
let expected = "Hello, Bob!"
|
||||
XCTAssertEqual(HelloWorld.hello("Bob"), expected, "When given 'Bob' we should greet Bob!")
|
||||
}
|
||||
|
||||
func testNoStrangeName(){
|
||||
let expected = "Hello, !"
|
||||
XCTAssertEqual(HelloWorld.hello(""), expected, "When given an empty string, it is strange, but should have a space and punctuation")
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user