Skip to content

Commit aebd254

Browse files
committed
Update TestDateInterval to use camel case
1 parent 168e018 commit aebd254

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

TestFoundation/TestDateInterval.swift

+18-18
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,41 @@
1010
class TestDateInterval: XCTestCase {
1111
static var allTests: [(String, (TestDateInterval) -> () throws -> Void)] {
1212
return [
13-
("test_default_constructor", test_default_constructor),
14-
("test_start_end_constructor", test_start_end_constructor),
15-
("test_start_duration_constructor", test_start_duration_constructor),
16-
("test_compare_different_starts", test_compare_different_starts),
17-
("test_compare_different_durations", test_compare_different_durations),
18-
("test_compare_same", test_compare_same),
19-
("test_comparison_operators", test_comparison_operators),
13+
("test_defaultConstructor", test_defaultConstructor),
14+
("test_startEndConstructor", test_startEndConstructor),
15+
("test_startDurationConstructor", test_startDurationConstructor),
16+
("test_compareDifferentStarts", test_compareDifferentStarts),
17+
("test_compareDifferentDurations", test_compareDifferentDurations),
18+
("test_compareSame", test_compareSame),
19+
("test_comparisonOperators", test_comparisonOperators),
2020
("test_intersects", test_intersects),
2121
("test_intersection", test_intersection),
22-
("test_intersection_zero_duration", test_intersection_zero_duration),
23-
("test_intersection_nil", test_intersection_nil),
22+
("test_intersectionZeroDuration", test_intersectionZeroDuration),
23+
("test_intersectionNil", test_intersectionNil),
2424
("test_contains", test_contains),
2525
("test_hashing", test_hashing),
2626
]
2727
}
2828

29-
func test_default_constructor() {
29+
func test_defaultConstructor() {
3030
let dateInterval = DateInterval()
3131
XCTAssertEqual(dateInterval.duration, 0)
3232
}
3333

34-
func test_start_end_constructor() {
34+
func test_startEndConstructor() {
3535
let date1 = dateWithString("2019-04-04 17:09:23 -0700")
3636
let date2 = dateWithString("2019-04-04 18:09:23 -0700")
3737
let dateInterval = DateInterval(start: date1, end: date2)
3838
XCTAssertEqual(dateInterval.duration, 60 * 60)
3939
}
4040

41-
func test_start_duration_constructor() {
41+
func test_startDurationConstructor() {
4242
let date = dateWithString("2019-04-04 17:09:23 -0700")
4343
let dateInterval = DateInterval(start: date, duration: 60)
4444
XCTAssertEqual(dateInterval.duration, 60)
4545
}
4646

47-
func test_compare_different_starts() {
47+
func test_compareDifferentStarts() {
4848
let date1 = dateWithString("2019-04-04 17:09:23 -0700")
4949
let date2 = dateWithString("2019-04-04 18:09:23 -0700")
5050
let dateInterval1 = DateInterval(start: date1, duration: 100)
@@ -53,23 +53,23 @@ class TestDateInterval: XCTestCase {
5353
XCTAssertEqual(dateInterval2.compare(dateInterval1), .orderedDescending)
5454
}
5555

56-
func test_compare_different_durations() {
56+
func test_compareDifferentDurations() {
5757
let date = dateWithString("2019-04-04 17:09:23 -0700")
5858
let dateInterval1 = DateInterval(start: date, duration: 60)
5959
let dateInterval2 = DateInterval(start: date, duration: 90)
6060
XCTAssertEqual(dateInterval1.compare(dateInterval2), .orderedAscending)
6161
XCTAssertEqual(dateInterval2.compare(dateInterval1), .orderedDescending)
6262
}
6363

64-
func test_compare_same() {
64+
func test_compareSame() {
6565
let date = dateWithString("2019-04-04 17:09:23 -0700")
6666
let dateInterval1 = DateInterval(start: date, duration: 60)
6767
let dateInterval2 = DateInterval(start: date, duration: 60)
6868
XCTAssertEqual(dateInterval1.compare(dateInterval2), .orderedSame)
6969
XCTAssertEqual(dateInterval2.compare(dateInterval1), .orderedSame)
7070
}
7171

72-
func test_comparison_operators() {
72+
func test_comparisonOperators() {
7373
let date1 = dateWithString("2019-04-04 17:00:00 -0700")
7474
let date2 = dateWithString("2019-04-04 17:30:00 -0700")
7575
let dateInterval1 = DateInterval(start: date1, duration: 60)
@@ -99,7 +99,7 @@ class TestDateInterval: XCTestCase {
9999
XCTAssertEqual(intersection!.duration, 60 * 15)
100100
}
101101

102-
func test_intersection_zero_duration() {
102+
func test_intersectionZeroDuration() {
103103
let date1 = dateWithString("2019-04-04 17:00:00 -0700")
104104
let date2 = dateWithString("2019-04-04 17:30:00 -0700")
105105
let dateInterval1 = DateInterval(start: date1, duration: 60 * 30)
@@ -109,7 +109,7 @@ class TestDateInterval: XCTestCase {
109109
XCTAssertEqual(intersection!.duration, 0)
110110
}
111111

112-
func test_intersection_nil() {
112+
func test_intersectionNil() {
113113
let date1 = dateWithString("2019-04-04 17:00:00 -0700")
114114
let date2 = dateWithString("2019-04-04 17:30:01 -0700")
115115
let dateInterval1 = DateInterval(start: date1, duration: 60 * 30)

0 commit comments

Comments
 (0)