Browse Source

Format.

pull/113/head
Abhishek 3 years ago
parent
commit
e71acf3506
  1. 2
      Clocker/Clocker/LocationController.swift
  2. 4
      Clocker/ClockerUnitTests/EventInfoTests.swift
  3. 2
      Clocker/ClockerUnitTests/ReviewControllerTests.swift
  4. 2
      Clocker/Onboarding/OnboardingSearchController.swift
  5. 2
      Clocker/Overall App/AppDefaults.swift

2
Clocker/Clocker/LocationController.swift

@ -7,7 +7,7 @@ import CoreModelKit
class LocationController: NSObject { class LocationController: NSObject {
private let store: DataStore private let store: DataStore
init(withStore dataStore: DataStore) { init(withStore dataStore: DataStore) {
store = dataStore store = dataStore
super.init() super.init()

4
Clocker/ClockerUnitTests/EventInfoTests.swift

@ -76,7 +76,7 @@ class EventInfoTests: XCTestCase {
XCTAssert(mockEventInfo.metadataForMeeting() == "in 25h", XCTAssert(mockEventInfo.metadataForMeeting() == "in 25h",
"Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation") "Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation")
} }
func testMetadataForEventHappeningAfterAnHour() throws { func testMetadataForEventHappeningAfterAnHour() throws {
let pastChunk = TimeChunk(seconds: 10, minutes: 10, hours: 1, days: 0, weeks: 0, months: 0, years: 0) let pastChunk = TimeChunk(seconds: 10, minutes: 10, hours: 1, days: 0, weeks: 0, months: 0, years: 0)
let mockEvent = EKEvent(eventStore: eventStore) let mockEvent = EKEvent(eventStore: eventStore)
@ -90,7 +90,7 @@ class EventInfoTests: XCTestCase {
XCTAssert(mockEventInfo.metadataForMeeting() == "in 1h", XCTAssert(mockEventInfo.metadataForMeeting() == "in 1h",
"Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation") "Metadata for meeting: \(mockEventInfo.metadataForMeeting()) doesn't match expectation")
} }
func testMetadataForEventHappeningAfterThreeHours() throws { func testMetadataForEventHappeningAfterThreeHours() throws {
let pastChunk = TimeChunk(seconds: 10, minutes: 10, hours: 3, days: 0, weeks: 0, months: 0, years: 0) let pastChunk = TimeChunk(seconds: 10, minutes: 10, hours: 3, days: 0, weeks: 0, months: 0, years: 0)
let mockEvent = EKEvent(eventStore: eventStore) let mockEvent = EKEvent(eventStore: eventStore)

2
Clocker/ClockerUnitTests/ReviewControllerTests.swift

@ -140,7 +140,7 @@ class ReviewControllerTests: XCTestCase {
XCTAssertNotNil(mockDefaults.object(forKey: "last-version")) XCTAssertNotNil(mockDefaults.object(forKey: "last-version"))
mockDefaults.removeSuite(named: mockSuite) mockDefaults.removeSuite(named: mockSuite)
} }
private func randomLetter() -> String { private func randomLetter() -> String {
let alphabet: [String] = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] let alphabet: [String] = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
return alphabet[Int(arc4random_uniform(26))] return alphabet[Int(arc4random_uniform(26))]

2
Clocker/Onboarding/OnboardingSearchController.swift

@ -40,7 +40,7 @@ class OnboardingSearchController: NSViewController {
super.viewDidLoad() super.viewDidLoad()
view.wantsLayer = true view.wantsLayer = true
searchResultsDataSource = SearchDataSource(with: searchBar, location: .onboarding) searchResultsDataSource = SearchDataSource(with: searchBar, location: .onboarding)
resultsTableView.isHidden = true resultsTableView.isHidden = true

2
Clocker/Overall App/AppDefaults.swift

@ -45,7 +45,7 @@ class AppDefaults {
Themer.shared().set(theme: 0) Themer.shared().set(theme: 0)
} }
} }
private class func defaultsDictionary() -> [String: Any] { private class func defaultsDictionary() -> [String: Any] {
return [CLThemeKey: 0, return [CLThemeKey: 0,
CLDisplayFutureSliderKey: 0, CLDisplayFutureSliderKey: 0,

Loading…
Cancel
Save