Skip to content

Commit c3720e2

Browse files
committed
Add a CONTRIBUTING.md, fix indent
... beautz is in the eye of the beholder.
1 parent 1a55bd2 commit c3720e2

File tree

5 files changed

+45
-34
lines changed

5 files changed

+45
-34
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
By submitting a pull request, you represent that you have the right to license
2+
your contribution to the community, and agree by submitting the patch
3+
that your contributions are licensed under the Apache 2.0 license (see
4+
`LICENSE.txt`).
5+

Tests/NIORedisTests/RESPValueTests.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@ import XCTest
22
@testable import NIORedis
33

44
final class RESPValueTests: XCTestCase {
5-
func testDescription() throws {
6-
XCTAssert(String(describing: RESPValue(1)) == "1")
7-
}
5+
6+
func testDescription() throws {
7+
XCTAssert(String(describing: RESPValue(1)) == "1")
8+
}
89

9-
static var allTests = [
10-
("testDescription", testDescription)
11-
]
10+
static var allTests = [
11+
("testDescription", testDescription)
12+
]
1213
}

Tests/NIORedisTests/XCTestManifests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import XCTest
22

33
#if !os(macOS)
44
public func allTests() -> [XCTestCaseEntry] {
5-
return [
6-
testCase(RESPValueTests.allTests),
7-
]
5+
return [
6+
testCase(RESPValueTests.allTests),
7+
]
88
}
99
#endif
Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,37 @@
11
import XCTest
2-
@testable import Redis
32
import NIO
3+
@testable import Redis
44

55
final class RedisClientTests: XCTestCase {
6-
func testCreateClientWithDefaultArguments() throws {
7-
let redisClient = Redis.createClient()
6+
7+
func testCreateClientWithDefaultArguments() throws {
8+
let redisClient = Redis.createClient()
89

9-
XCTAssert(redisClient.options.hostname! == "127.0.0.1")
10-
XCTAssert(redisClient.options.port == 6379)
11-
XCTAssert(redisClient.options.password == nil)
12-
XCTAssert(redisClient.options.database == nil)
13-
}
10+
XCTAssert(redisClient.options.hostname! == "127.0.0.1")
11+
XCTAssert(redisClient.options.port == 6379)
12+
XCTAssert(redisClient.options.password == nil)
13+
XCTAssert(redisClient.options.database == nil)
14+
}
1415

15-
func testCreateClientWithSpecifiedArguments() throws {
16-
let eventLoop = MultiThreadedEventLoopGroup(numberOfThreads: 1).next()
16+
func testCreateClientWithSpecifiedArguments() throws {
17+
let eventLoop = MultiThreadedEventLoopGroup(numberOfThreads: 1).next()
1718

18-
let redisClient = Redis.createClient(port: 6380, host: "localhost", password: "password", db: 1, eventLoopGroup: eventLoop)
19+
let redisClient = Redis.createClient(port: 6380, host: "localhost",
20+
password: "password", db: 1,
21+
eventLoopGroup: eventLoop)
1922

20-
XCTAssert(redisClient.options.hostname! == "localhost")
21-
XCTAssert(redisClient.options.port == 6380)
22-
XCTAssert(redisClient.options.password == "password")
23-
XCTAssert(redisClient.options.database == 1)
24-
XCTAssert(redisClient.options.eventLoopGroup === eventLoop)
25-
XCTAssert(redisClient.eventLoop === eventLoop)
26-
}
23+
XCTAssert(redisClient.options.hostname! == "localhost")
24+
XCTAssert(redisClient.options.port == 6380)
25+
XCTAssert(redisClient.options.password == "password")
26+
XCTAssert(redisClient.options.database == 1)
27+
XCTAssert(redisClient.options.eventLoopGroup === eventLoop)
28+
XCTAssert(redisClient.eventLoop === eventLoop)
29+
}
2730

28-
static var allTests = [
29-
("testCreateClientWithDefaultArguments", testCreateClientWithDefaultArguments),
30-
("testCreateClientWithSpecifiedArguments", testCreateClientWithSpecifiedArguments),
31-
]
31+
static var allTests = [
32+
( "testCreateClientWithDefaultArguments",
33+
testCreateClientWithDefaultArguments. ),
34+
( "testCreateClientWithSpecifiedArguments",
35+
testCreateClientWithSpecifiedArguments ),
36+
]
3237
}

Tests/RedisTests/XCTestManifests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import XCTest
22

33
#if !os(macOS)
44
public func allTests() -> [XCTestCaseEntry] {
5-
return [
6-
testCase(RedisClientTests.allTests),
7-
]
5+
return [
6+
testCase(RedisClientTests.allTests),
7+
]
88
}
99
#endif

0 commit comments

Comments
 (0)