Skip to content

Commit efc986e

Browse files
nirbheekjpakkane
authored andcommitted
swift tests: Port to Swift 3
Should remain compatible with Swift 2.2
1 parent 62ec92c commit efc986e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
printSomething("String from main")
1+
printSomething(text:"String from main")

test cases/swift/4 generate/gen/main.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
import Glibc
55
#endif
66

7+
#if swift(>=3.0)
8+
let fname = CommandLine.arguments[1]
9+
#else
710
let fname = Process.arguments[1]
11+
#endif
812
let code = "public func getGenerated() -> Int {\n return 42\n}\n"
913

1014
let f = fopen(fname, "w")

0 commit comments

Comments
 (0)