Commit 4841fdf4 authored by Drew's avatar Drew

Swift preview 3 support

moved from rand to arc4rand, lol
parent 37f46822
......@@ -60,12 +60,17 @@ public class CarolineCoreEngine : CarolineEngine {
}
print("-----------------------")
#if !swift(>=3.0)
srand(UInt32(time(nil)))
let rand_int = rand()
#else
let rand_int = arc4random()
#endif
if failures == 0 {
print(passSnark[Int(rand()) % passSnark.count])
print(passSnark[Int(rand_int) % passSnark.count])
}
else {
print(failSnark[Int(rand()) % failSnark.count])
print(failSnark[Int(rand_int) % failSnark.count])
}
print("Test execution finished with \(tests.count) tests, \(failures) failures, \(skipped) skipped.")
if failures > 0 { return false }
......
//: Playground - noun: a place where people can play
import Cocoa
var str = "Hello, playground"
let u: UnsafeBufferPointer<Int8>
u.baseAddress.ad
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playground version='5.0' target-platform='osx'>
<timeline fileName='timeline.xctimeline'/>
</playground>
\ No newline at end of file
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