Skip to content

Commit 79e6707

Browse files
authored
Merge pull request #545 from shabirjan/AVLTree-Swift4
Avl tree swift4
2 parents 2c81b65 + 190cc4e commit 79e6707

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

AVL Tree/AVLTree.playground/Contents.swift

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
//: Playground - noun: a place where people can play
22

3+
// last checked with Xcode 9.0b4
4+
#if swift(>=4.0)
5+
print("Hello, Swift 4!")
6+
#endif
7+
38
let tree = AVLTree<Int, String>()
49

510
tree.insert(key: 5, payload: "five")

AVL Tree/Tests/AVLTreeTests.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
//
88

99
import XCTest
10-
1110
class AVLTreeTests: XCTestCase {
12-
1311
var tree: AVLTree<Int, String>?
1412

13+
func testSwift4() {
14+
// last checked with Xcode 9.0b4
15+
#if swift(>=4.0)
16+
print("Hello, Swift 4!")
17+
#endif
18+
}
1519
override func setUp() {
1620
super.setUp()
1721

AVL Tree/Tests/Tests.xcodeproj/project.pbxproj

+4-2
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@
180180
ONLY_ACTIVE_ARCH = YES;
181181
SDKROOT = macosx;
182182
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
183+
SWIFT_VERSION = 4.0;
183184
};
184185
name = Debug;
185186
};
@@ -219,6 +220,7 @@
219220
MTL_ENABLE_DEBUG_INFO = NO;
220221
SDKROOT = macosx;
221222
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
223+
SWIFT_VERSION = 4.0;
222224
};
223225
name = Release;
224226
};
@@ -230,7 +232,7 @@
230232
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
231233
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
232234
PRODUCT_NAME = "$(TARGET_NAME)";
233-
SWIFT_VERSION = 3.0;
235+
SWIFT_VERSION = 4.0;
234236
};
235237
name = Debug;
236238
};
@@ -242,7 +244,7 @@
242244
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
243245
PRODUCT_BUNDLE_IDENTIFIER = swift.algorithm.club.Tests;
244246
PRODUCT_NAME = "$(TARGET_NAME)";
245-
SWIFT_VERSION = 3.0;
247+
SWIFT_VERSION = 4.0;
246248
};
247249
name = Release;
248250
};

AVL Tree/Tests/TreeNodeTests.swift

+7-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@
99
import XCTest
1010

1111
class TreeNodeTests: XCTestCase {
12-
12+
1313
var root: TreeNode<String, String>?
1414
var left: TreeNode<String, String>?
1515
var right: TreeNode<String, String>?
16-
16+
func testSwift4() {
17+
// last checked with Xcode 9.0b4
18+
#if swift(>=4.0)
19+
print("Hello, Swift 4!")
20+
#endif
21+
}
1722
override func setUp() {
1823
super.setUp()
1924

0 commit comments

Comments
 (0)