Skip to content

Commit 577f3ce

Browse files
committed
Fix SwiftPM tests
1 parent a4e994a commit 577f3ce

5 files changed

Lines changed: 12 additions & 17 deletions

File tree

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ let package = Package(
77
.library(name: "NaiveDate", targets: ["NaiveDate"]),
88
],
99
targets: [
10-
.target(name: "NaiveDate", path: "Sources")
10+
.target(name: "NaiveDate", path: "Sources"),
11+
.testTarget(name: "NaiveDateTests", dependencies: ["NaiveDate"], path: "Tests")
1112
]
1213
)

Sources/NaiveDate.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import Foundation
66

7-
8-
// MARK: - NaiveDate -
7+
// MARK: - NaiveDate
98

109
/// Calendar date without a timezone.
1110
public struct NaiveDate: Equatable, Hashable, Comparable, LosslessStringConvertible, Codable, _DateComponentsConvertible {
@@ -55,8 +54,7 @@ public struct NaiveDate: Equatable, Hashable, Comparable, LosslessStringConverti
5554
}
5655
}
5756

58-
59-
// MARK: - NaiveTime -
57+
// MARK: - NaiveTime
6058

6159
/// Time without a timezone. Allows for second precision.
6260
public struct NaiveTime: Equatable, Hashable, Comparable, LosslessStringConvertible, Codable, _DateComponentsConvertible {
@@ -119,7 +117,7 @@ public struct NaiveTime: Equatable, Hashable, Comparable, LosslessStringConverti
119117
}
120118

121119

122-
// MARK: - NaiveDateTime -
120+
// MARK: - NaiveDateTime
123121

124122
/// Combined date and time without timezone.
125123
public struct NaiveDateTime: Equatable, Hashable, Comparable, LosslessStringConvertible, Codable, _DateComponentsConvertible {
@@ -181,7 +179,7 @@ public struct NaiveDateTime: Equatable, Hashable, Comparable, LosslessStringConv
181179
}
182180

183181

184-
// MARK: - Calendar Extensions -
182+
// MARK: - Calendar Extensions
185183

186184
public extension Calendar {
187185
// MARK: Naive* -> Date
@@ -234,8 +232,7 @@ public extension Calendar {
234232
}
235233
}
236234

237-
238-
// MARK: - Private -
235+
// MARK: - Private
239236

240237
/// A type that can be converted to DateComponents (and in turn to Date).
241238
internal protocol _DateComponentsConvertible {

Sources/NaiveDateFormatter.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import Foundation
66

7-
8-
// MARK: - NaiveDateFormatter -
7+
// MARK: - NaiveDateFormatter
98

109
/// Formatting without time zones.
1110
public final class NaiveDateFormatter {
@@ -41,8 +40,7 @@ public final class NaiveDateFormatter {
4140
}
4241
}
4342

44-
45-
// MARK: - NaiveDateRangeFormatter -
43+
// MARK: - NaiveDateRangeFormatter
4644

4745
/// Formatting without time zones.
4846
public final class NaiveDateRangeFormatter {
@@ -78,8 +76,7 @@ public final class NaiveDateRangeFormatter {
7876
}
7977
}
8078

81-
82-
// MARK: - Private -
79+
// MARK: - Private
8380

8481
private extension Calendar {
8582
func _dateRange<T: _DateComponentsConvertible>(from start: T, to end: T) -> (Date, Date)? {

Tests/NaiveDateFormatterTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
//
33
// Copyright (c) 2017-2019 Alexander Grebenyuk (github.com/kean).
44

5+
import Foundation
56
import XCTest
67
import NaiveDate
78

8-
99
class NaiveDateFormatterTest: XCTestCase {
1010
func testNaiveTimeFormatter_enUS() {
1111
let formatter = NaiveDateFormatter {

Tests/NaiveDateTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
//
33
// Copyright (c) 2017-2019 Alexander Grebenyuk (github.com/kean).
44

5+
import Foundation
56
import XCTest
67
import NaiveDate
78

8-
99
// MARK: - NaiveDate -
1010

1111
class NaiveDateTest: XCTestCase {

0 commit comments

Comments
 (0)