update code to Swift 4.1

This commit is contained in:
Yonas Kolb
2018-09-10 20:59:02 +10:00
parent adb443229d
commit 420c0eacd7
7 changed files with 18 additions and 18 deletions

View File

@@ -189,7 +189,7 @@ func testForNode() {
let template = Template(templateString: templateString)
let result = try template.render(context)
let sortedResult = result.characters.split(separator: ",").map(String.init).sorted(by: <)
let sortedResult = result.split(separator: ",").map(String.init).sorted(by: <)
try expect(sortedResult) == ["one: I", "two: II"]
}
@@ -202,7 +202,7 @@ func testForNode() {
let node = ForNode(resolvable: Variable("dict"), loopVariables: ["key"], nodes: nodes, emptyNodes: emptyNodes, where: nil)
let result = try node.render(context)
let sortedResult = result.characters.split(separator: ",").map(String.init).sorted(by: <)
let sortedResult = result.split(separator: ",").map(String.init).sorted(by: <)
try expect(sortedResult) == ["one", "two"]
}
@@ -218,7 +218,7 @@ func testForNode() {
let result = try node.render(context)
let sortedResult = result.characters.split(separator: ",").map(String.init).sorted(by: <)
let sortedResult = result.split(separator: ",").map(String.init).sorted(by: <)
try expect(sortedResult) == ["one=I", "two=II"]
}