Commit e3a7a9f4 authored by Drew's avatar Drew

Update to swift-DEVELOPMENT-SNAPSHOT-2016-04-12-a

parent 487f4835
......@@ -32,11 +32,11 @@ import Glibc
#endif
protocol CarolineEngine {
func testAll(tests: [CarolineTest])
func testAll(_ tests: [CarolineTest])
}
public class CarolineCoreEngine : CarolineEngine {
public func testAll(tests: [CarolineTest]) {
public func testAll(_ tests: [CarolineTest]) {
setvbuf(stdout, nil, _IOLBF, 0)
for test in tests {
if test.skip {
......
......@@ -27,7 +27,7 @@ POSSIBILITY OF SUCH DAMAGE.*/
//MARK: Functions
extension CarolineTest {
public final func assert(@autoclosure condition: () -> Bool, @autoclosure _ message: () -> String = "Test failed", file: String = #file, line: Int = #line) {
public final func assert(@autoclosure _ condition: () -> Bool, @autoclosure _ message: () -> String = "Test failed", file: String = #file, line: Int = #line) {
if !condition() {
var state = CarolineState(test: self)
state.outcome = .Failed
......
......@@ -27,7 +27,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
func findTests(sourceFiles: [String]) -> [String] {
func findTests(_ sourceFiles: [String]) -> [String] {
var tests: [String] = []
for file in sourceFiles {
let sourceText = try! String(file: file)
......
......@@ -32,7 +32,7 @@ import Glibc
import Darwin
#endif
func env_(variable: String) -> String? {
func env_(_ variable: String) -> String? {
let env = getenv(variable)
if env == nil { return nil }
return String(validatingUTF8: env)
......@@ -59,7 +59,7 @@ func performXcodeIntegration() -> Bool {
xcTestFile += "\n"
xcTestFile += "class CarolineEngineTests: XCTestCase {\n"
xcTestFile += " func testAllCarolineTests() {\n"
xcTestFile += allTestsDeclaration(tests, indentation: 8) + "\n"
xcTestFile += allTestsDeclaration(tests: tests, indentation: 8) + "\n"
xcTestFile += " let engine = CarolineCoreEngine()\n"
xcTestFile += " engine.testAll(allTests)\n"
xcTestFile += " }\n"
......@@ -76,7 +76,7 @@ func performXcodeIntegration() -> Bool {
return true
}
func parseXcodeProj(fileName: String, targetName: String) -> [String] {
func parseXcodeProj(_ fileName: String, targetName: String) -> [String] {
let pathToXcodeProject = fileName.directoryPath
let file = try! String(file: fileName + "/project.pbxproj")
let plistCharacters = "[[:space:][:alnum:]/\\*={};_\"\\(\\),\\.\\-]"
......
......@@ -54,7 +54,7 @@ print()
print("// This file is automatically generated by Caroline and should not be edited by hand.")
print ("import CarolineCore")
print(allTestsDeclaration(findTests(fileNames), indentation:0))
print(allTestsDeclaration(tests: findTests(fileNames), indentation:0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment